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

Update rubocop requirement from 1.48 to 1.60.0 #921

Merged
merged 1 commit into from
Jan 18, 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
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