Skip to content

Commit

Permalink
Update rubocop requirement from 1.48 to 1.60.0 (#921)
Browse files Browse the repository at this point in the history
Updates the requirements on [rubocop](https://github.com/rubocop/rubocop) to permit the latest version.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](rubocop/rubocop@v1.48.0...v1.60.0)

---
updated-dependencies:
- dependency-name: rubocop
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
dependabot[bot] authored Jan 18, 2024
1 parent f383e47 commit 8954835
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,6 @@ Metrics/ModuleLength:
Exclude:
- 'lib/chewy/rake_helper.rb'
- '**/*_spec.rb'

Style/ArgumentsForwarding:
Enabled: false
2 changes: 1 addition & 1 deletion gemfiles/base.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ gem 'rake'
gem 'rspec', '>= 3.7.0'
gem 'rspec-collection_matchers'
gem 'rspec-its'
gem 'rubocop', '1.48'
gem 'rubocop', '1.60.0'
gem 'sqlite3'
gem 'timecop'
gem 'unparser'
4 changes: 2 additions & 2 deletions lib/chewy/errors.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class UndefinedIndex < Error

class UndefinedUpdateStrategy < Error
def initialize(_type)
super <<-MESSAGE
super(<<-MESSAGE)
Index update strategy is undefined for current context.
Please wrap your code with `Chewy.strategy(:strategy_name) block.`
MESSAGE
Expand All @@ -27,7 +27,7 @@ def initialize(type, import_errors)
message << " on #{documents.count} documents: #{documents}\n"
end
end
super message
super(message)
end
end

Expand Down
6 changes: 1 addition & 5 deletions lib/chewy/rake_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -320,11 +320,7 @@ def indexes_from(only: nil, except: nil)
all_indexes
end

indexes = if except.present?
indexes - normalize_indexes(Array.wrap(except))
else
indexes
end
indexes -= normalize_indexes(Array.wrap(except)) if except.present?

indexes.sort_by(&:derivable_name)
end
Expand Down

0 comments on commit 8954835

Please sign in to comment.