Skip to content
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

Upgraded RuboCop to 1.63.5. #198

Merged
merged 1 commit into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ jobs:
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.image }}
bundler-cache: true
- name: Run tests
run: |
gem install -g
rake
bundle install
bundle exec rake
5 changes: 5 additions & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
--require spec_helper
--color
--format=documentation
--order=rand
--warnings
1 change: 1 addition & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ AllCops:
TargetRubyVersion: 2.7
Exclude:
- 'numbers_and_words.gemspec'
- vendor/bundle/**/*

Layout/EmptyLinesAroundAttributeAccessor:
Enabled: true
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## 0.11.13 (Next)

### Features
* Upgrade RuboCop to 1.63.5. \[[#198](https://github.com/kslazarev/numbers_and_words/pull/198)\]
* Your contribution here.

## 0.11.12 (April 22, 2023)
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module FiguresConverter
module Languages
class Lv < Base
def tens_with_ones
super separator: ' '
super(separator: ' ')
end

def megs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/numbers_and_words/translations/es.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {})
Expand Down
2 changes: 1 addition & 1 deletion lib/numbers_and_words/translations/et.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions lib/numbers_and_words/translations/fr.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {})
Expand Down
2 changes: 1 addition & 1 deletion lib/numbers_and_words/translations/hu.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/numbers_and_words/translations/it.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {})
Expand Down
2 changes: 1 addition & 1 deletion lib/numbers_and_words/translations/nl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/numbers_and_words/translations/pt.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {})
Expand Down
2 changes: 1 addition & 1 deletion lib/numbers_and_words/translations/se.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading