-
Notifications
You must be signed in to change notification settings - Fork 83
Feature/pretty json #132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Feature/pretty json #132
Conversation
| expected_json = File.read("test/data/" + expected_json_filename) | ||
| converter = Babelish::CSV2JSON.new(csv_file, | ||
| { "English" => "en" }, | ||
| output_basename: "output", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/AlignParameters: Align the parameters of a method call if they span more than one line.
Layout/TrailingWhitespace: Trailing whitespace detected.
|
|
||
| expected_json = File.read("test/data/" + expected_json_filename) | ||
| converter = Babelish::CSV2JSON.new(csv_file, | ||
| { "English" => "en" }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/AlignParameters: Align the parameters of a method call if they span more than one line.
Layout/TrailingWhitespace: Trailing whitespace detected.
| given_json_filename = "output.json" | ||
|
|
||
| expected_json = File.read("test/data/" + expected_json_filename) | ||
| converter = Babelish::CSV2JSON.new(csv_file, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/TrailingWhitespace: Trailing whitespace detected.
| expected_json = File.read("test/data/" + expected_json_filename) | ||
| converter = Babelish::CSV2JSON.new(csv_file, | ||
| { "English" => "en" }, | ||
| output_basename: "output", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/AlignParameters: Align the parameters of a method call if they span more than one line.
Layout/TrailingWhitespace: Trailing whitespace detected.
|
|
||
| expected_json = File.read("test/data/" + expected_json_filename) | ||
| converter = Babelish::CSV2JSON.new(csv_file, | ||
| { "English" => "en" }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/AlignParameters: Align the parameters of a method call if they span more than one line.
Layout/TrailingWhitespace: Trailing whitespace detected.
| given_json_filename = "output.json" | ||
|
|
||
| expected_json = File.read("test/data/" + expected_json_filename) | ||
| converter = Babelish::CSV2JSON.new(csv_file, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/TrailingWhitespace: Trailing whitespace detected.
| @@ -1,3 +1,3 @@ | |||
| module Babelish | |||
| VERSION = "0.6.5" | |||
| VERSION = "0.6.4" | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/MutableConstant: Freeze mutable objects assigned to constants.
lib/babelish/commandline.rb
Outdated
| method_option :ignore_lang_path, :type => :boolean, :aliases => "-I", :lazy_default => false, :desc => "Ignore the path component of langs" | ||
| method_option :fetch, :type => :boolean, :desc => "Download file from Google Drive" | ||
| method_option :sheet, :type => :numeric, :desc => "Index of worksheet to download. First index is 0" | ||
| method_option :pretty_json, :type => :boolean, aliases: "-p", desc: "Prettify your json output files" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/HashSyntax: Use the new Ruby 1.9 hash syntax.
Metrics/LineLength: Line is too long. [105/80]
| :filenames => filenames }) | ||
| csv_filename: csv_filename, | ||
| headers: headers, | ||
| filenames: filenames }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/MultilineHashBraceLayout: Closing hash brace must be on the line after the last hash element when opening brace is on a separate line from the first hash element.
| :csv_filename => csv_filename, | ||
| :headers => headers, | ||
| :filenames => filenames }) | ||
| csv_filename: csv_filename, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/IndentHash: Use 2 spaces for indentation in a hash, relative to the first position after the preceding left parenthesis.
| strings = {filename => {"ERROR_HANDLER_WARNING_DISMISS" => "OK", "ANOTHER_STRING" => "hello"}} | ||
|
|
||
| converter = Babelish::Strings2CSV.new(:headers => %w{variables english}, :filenames => [filename]) | ||
| converter = Babelish::Strings2CSV.new(headers: %w{variables english}, filenames: [filename]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Metrics/LineLength: Line is too long. [96/80]
|
|
||
| def test_dotstrings_to_csv | ||
| converter = Babelish::Strings2CSV.new(:filenames => ["test/data/test_data.strings"]) | ||
| converter = Babelish::Strings2CSV.new(filenames: ["test/data/test_data.strings"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Metrics/LineLength: Line is too long. [85/80]
| :filenames => filenames }) | ||
| csv_filename: csv_filename, | ||
| headers: headers, | ||
| filenames: filenames }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/MultilineHashBraceLayout: Closing hash brace must be on the line after the last hash element when opening brace is on a separate line from the first hash element.
| converter = Babelish::CSV2Strings.new(csv_file, | ||
| {'English' => [:en], "French" => "fr", "German" => "de", "Spanish" => "es"}, | ||
| :default_lang => "variables") | ||
| default_lang: "variables") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/AlignParameters: Align the parameters of a method call if they span more than one line.
| converter = Babelish::CSV2Strings.new(csv_file, | ||
| {'English' => [:en], "French" => "fr", "German" => "de", "Spanish" => "es"}, | ||
| :default_lang => "English") | ||
| default_lang: "English") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/AlignParameters: Align the parameters of a method call if they span more than one line.
| {'English' => [:en]}, | ||
| :output_basename => 'myApp', | ||
| :ignore_lang_path => true) | ||
| output_basename: 'myApp', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/AlignParameters: Align the parameters of a method call if they span more than one line.
Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
| {'English' => "en"}, | ||
| :output_basename => 'myApp', | ||
| :ignore_lang_path => true) | ||
| output_basename: 'myApp', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/AlignParameters: Align the parameters of a method call if they span more than one line.
Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
| {'English' => "en"}, | ||
| :output_basename => 'myfile', | ||
| :ignore_lang_path => true) | ||
| output_basename: 'myfile', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/AlignParameters: Align the parameters of a method call if they span more than one line.
Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
Superseeds #109. rebased with master