From 7d00d437725d4cd7fbdc156d2eb9015b41973364 Mon Sep 17 00:00:00 2001 From: "Daniel (dB.) Doubrovkine" Date: Tue, 14 May 2024 10:53:39 -0400 Subject: [PATCH] Upgraded RuboCop to 1.63.5. --- .rspec | 5 +++++ Gemfile | 2 +- .../strategies/figures_converter/languages/lv.rb | 2 +- .../strategies/figures_converter/languages/pt-BR.rb | 4 ++-- lib/numbers_and_words/translations/es.rb | 2 +- lib/numbers_and_words/translations/et.rb | 2 +- lib/numbers_and_words/translations/fr.rb | 4 ++-- lib/numbers_and_words/translations/hu.rb | 2 +- lib/numbers_and_words/translations/it.rb | 2 +- lib/numbers_and_words/translations/nl.rb | 2 +- lib/numbers_and_words/translations/pt.rb | 2 +- lib/numbers_and_words/translations/se.rb | 2 +- 12 files changed, 18 insertions(+), 13 deletions(-) create mode 100644 .rspec diff --git a/.rspec b/.rspec new file mode 100644 index 00000000..27a9fb77 --- /dev/null +++ b/.rspec @@ -0,0 +1,5 @@ +--require spec_helper +--color +--format=documentation +--order=rand +--warnings diff --git a/Gemfile b/Gemfile index 3ab7e70b..bcbdb4e2 100644 --- a/Gemfile +++ b/Gemfile @@ -12,7 +12,7 @@ end group :test do gem 'coveralls', require: false gem 'rspec', '~> 3' - gem 'rubocop', require: false + gem 'rubocop', '~> 1.63.5', require: false gem 'rubocop-performance', require: false gem 'rubocop-rake', require: false gem 'rubocop-rspec', require: false diff --git a/lib/numbers_and_words/strategies/figures_converter/languages/lv.rb b/lib/numbers_and_words/strategies/figures_converter/languages/lv.rb index 2a3ad28a..1708605d 100644 --- a/lib/numbers_and_words/strategies/figures_converter/languages/lv.rb +++ b/lib/numbers_and_words/strategies/figures_converter/languages/lv.rb @@ -6,7 +6,7 @@ module FiguresConverter module Languages class Lv < Base def tens_with_ones - super separator: ' ' + super(separator: ' ') end def megs diff --git a/lib/numbers_and_words/strategies/figures_converter/languages/pt-BR.rb b/lib/numbers_and_words/strategies/figures_converter/languages/pt-BR.rb index fd4ec6d1..63a59844 100644 --- a/lib/numbers_and_words/strategies/figures_converter/languages/pt-BR.rb +++ b/lib/numbers_and_words/strategies/figures_converter/languages/pt-BR.rb @@ -31,7 +31,7 @@ def capacity_iteration end def ones - super internal_options.merge(is_one_thousand: one_thousand?) + super(internal_options.merge(is_one_thousand: one_thousand?)) end def hundreds @@ -56,7 +56,7 @@ def maybe_ordinal end def gender - return (options.gender.result || :male) if maybe_ordinal + return options.gender.result || :male if maybe_ordinal if current_capacity&.positive? && figures[0] == 1 :male diff --git a/lib/numbers_and_words/translations/es.rb b/lib/numbers_and_words/translations/es.rb index 3786c6dc..0bebd97b 100644 --- a/lib/numbers_and_words/translations/es.rb +++ b/lib/numbers_and_words/translations/es.rb @@ -19,7 +19,7 @@ def ones(number, options = {}) end def tens_with_ones(numbers, options = {}) - super numbers, options.merge(separator: " #{union} ") + super(numbers, options.merge(separator: " #{union} ")) end def twenties_with_ones(numbers, options = {}) diff --git a/lib/numbers_and_words/translations/et.rb b/lib/numbers_and_words/translations/et.rb index 44c138a9..7fcc37ab 100644 --- a/lib/numbers_and_words/translations/et.rb +++ b/lib/numbers_and_words/translations/et.rb @@ -6,7 +6,7 @@ class Et < Base include NumbersAndWords::Translations::Families::Latin def hundreds(number, _options = {}) - super number, separator: '' + super(number, separator: '') end end end diff --git a/lib/numbers_and_words/translations/fr.rb b/lib/numbers_and_words/translations/fr.rb index 742a6066..11f31114 100644 --- a/lib/numbers_and_words/translations/fr.rb +++ b/lib/numbers_and_words/translations/fr.rb @@ -11,14 +11,14 @@ class Fr < Base def tens(number, options = {}) return t(:eighty) if number == SPECIAL_TENS_CASE && options[:alone].nil? - super number, options + super(number, options) end def tens_with_ones(numbers, options = {}) return [tens(numbers[1] - 1, alone: false), teens(numbers)].join('-') if [7, 9].include? numbers[1] separator = numbers[0] == 1 ? " #{union} " : '-' - super numbers, options.merge(separator: separator) + super(numbers, options.merge(separator: separator)) end def hundreds(number, options = {}) diff --git a/lib/numbers_and_words/translations/hu.rb b/lib/numbers_and_words/translations/hu.rb index db697c62..ed58516c 100644 --- a/lib/numbers_and_words/translations/hu.rb +++ b/lib/numbers_and_words/translations/hu.rb @@ -12,7 +12,7 @@ def tens_with_ones(numbers, options = {}) end def hundreds(number, options = {}) - super number, options.merge(separator: '') + super(number, options.merge(separator: '')) end end end diff --git a/lib/numbers_and_words/translations/it.rb b/lib/numbers_and_words/translations/it.rb index f7b875f8..518f9e6d 100644 --- a/lib/numbers_and_words/translations/it.rb +++ b/lib/numbers_and_words/translations/it.rb @@ -6,7 +6,7 @@ class It < Base include NumbersAndWords::Translations::Families::Latin def tens_with_ones(numbers, _options = {}) - super numbers, separator: '' + super(numbers, separator: '') end def hundreds(number, _options = {}) diff --git a/lib/numbers_and_words/translations/nl.rb b/lib/numbers_and_words/translations/nl.rb index 3298e9dd..f2e6318e 100644 --- a/lib/numbers_and_words/translations/nl.rb +++ b/lib/numbers_and_words/translations/nl.rb @@ -12,7 +12,7 @@ def tens_with_ones(numbers, _options = {}) def hundreds(number, _options = {}) return t(:hundreds) if number == 1 - super number, separator: '' + super(number, separator: '') end private diff --git a/lib/numbers_and_words/translations/pt.rb b/lib/numbers_and_words/translations/pt.rb index 51069faa..20a6ac03 100644 --- a/lib/numbers_and_words/translations/pt.rb +++ b/lib/numbers_and_words/translations/pt.rb @@ -6,7 +6,7 @@ class Pt < Base include NumbersAndWords::Translations::Families::Latin def tens_with_ones(numbers, _options = {}) - super numbers, separator: " #{union} " + super(numbers, separator: " #{union} ") end def hundreds(number, options = {}) diff --git a/lib/numbers_and_words/translations/se.rb b/lib/numbers_and_words/translations/se.rb index 6677810a..fcf6071f 100644 --- a/lib/numbers_and_words/translations/se.rb +++ b/lib/numbers_and_words/translations/se.rb @@ -6,7 +6,7 @@ class Se < Base include NumbersAndWords::Translations::Families::Latin def tens_with_ones(numbers, _options = {}) - super numbers, separator: '-' + super(numbers, separator: '-') end end end