From 063df4c67302fbf66fa71a0be903177b368bb357 Mon Sep 17 00:00:00 2001 From: Gleb Mazovetskiy Date: Fri, 10 May 2024 11:37:28 +0900 Subject: [PATCH] Fix rubocop --- .../tasks/translators/google_translator.rb | 1 - spec/google_translate_spec.rb | 4 +- spec/yaml_spec.rb | 52 +++++++++---------- 3 files changed, 28 insertions(+), 29 deletions(-) diff --git a/lib/i18n/tasks/translators/google_translator.rb b/lib/i18n/tasks/translators/google_translator.rb index 0651a6ec..0890e922 100644 --- a/lib/i18n/tasks/translators/google_translator.rb +++ b/lib/i18n/tasks/translators/google_translator.rb @@ -25,7 +25,6 @@ def translate_values(list, **options) ), options[:html] ) - end def options_for_translate_values(from:, to:, **options) diff --git a/spec/google_translate_spec.rb b/spec/google_translate_spec.rb index 6f9f5ba2..4ecb867e 100644 --- a/spec/google_translate_spec.rb +++ b/spec/google_translate_spec.rb @@ -12,7 +12,7 @@ html_test_plrl = ['html-key.html.one', 'Hello %{count}', 'Hola %{count}'] html_test_multiline = ['html-key.html.multiline', "Hello\n%{user}", "Hola\n%{user}"] array_test = ['array-key', ['Hello.', nil, '', 'Goodbye.'], ['Hola.', nil, '', 'AdiĆ³s.']] - fixnum_test = ['numeric-key', 1, 1] + fixnum_test = ['numeric-key', 1, 1] ref_key_test = ['ref-key', :reference, :reference] describe 'real world test' do @@ -29,7 +29,7 @@ context 'command' do let(:task) { i18n_task } - it 'works' do + it 'works' do # rubocop:disable RSpec/MultipleExpectations skip 'temporarily disabled on JRuby due to https://github.com/jruby/jruby/issues/4802' if RUBY_ENGINE == 'jruby' skip 'GOOGLE_TRANSLATE_API_KEY env var not set' unless ENV['GOOGLE_TRANSLATE_API_KEY'] skip 'GOOGLE_TRANSLATE_API_KEY env var is empty' if ENV['GOOGLE_TRANSLATE_API_KEY'].empty? diff --git a/spec/yaml_spec.rb b/spec/yaml_spec.rb index 05acef50..ea91c04d 100644 --- a/spec/yaml_spec.rb +++ b/spec/yaml_spec.rb @@ -74,32 +74,32 @@ expect(parsed.dig('en', 'folded_keep')).to eq("hello world\nnewline\n") expected = <<~YAML - --- - en: - literal: | - hello - world - - newline - literal_strip: |- - hello - world - - newline - literal_keep: | - hello - world - - newline - folded: | - hello world - newline - folded_strip: |- - hello world - newline - folded_keep: | - hello world - newline + --- + en: + literal: | + hello + world + + newline + literal_strip: |- + hello + world + + newline + literal_keep: | + hello + world + + newline + folded: | + hello world + newline + folded_strip: |- + hello world + newline + folded_keep: | + hello world + newline YAML dumped = I18n::Tasks::Data::Adapter::YamlAdapter.dump(parsed, {})