Skip to content

Conversation

@netbe
Copy link
Owner

@netbe netbe commented Jun 8, 2020

Superseeds #109. rebased with master

expected_json = File.read("test/data/" + expected_json_filename)
converter = Babelish::CSV2JSON.new(csv_file,
{ "English" => "en" },
output_basename: "output",
Copy link
Collaborator

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" },
Copy link
Collaborator

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,
Copy link
Collaborator

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",
Copy link
Collaborator

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" },
Copy link
Collaborator

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,
Copy link
Collaborator

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"
Copy link
Collaborator

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.

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"
Copy link
Collaborator

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 })
Copy link
Collaborator

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,
Copy link
Collaborator

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])
Copy link
Collaborator

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"])
Copy link
Collaborator

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 })
Copy link
Collaborator

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")
Copy link
Collaborator

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")
Copy link
Collaborator

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',
Copy link
Collaborator

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',
Copy link
Collaborator

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',
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants