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

Fix ruby 2.7 warnings in rake tasks #765

Merged
merged 1 commit into from
Mar 1, 2021
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

### Changes

* [#765](https://github.com/toptal/chewy/pull/765): Fix ruby 2.7 warnings in rake tasks ([@aglushkov][])

### Bugs Fixed

* [#722](https://github.com/toptal/chewy/issues/722): Remove alias_method_chain, use Module#prepend instead ([@dalthon][])
Expand Down
20 changes: 10 additions & 10 deletions lib/tasks/chewy.rake
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,22 @@ end
namespace :chewy do
desc 'Destroys, recreates and imports data for the specified indexes or all of them'
task reset: :environment do |_task, args|
Chewy::RakeHelper.reset(parse_classes(args.extras))
Chewy::RakeHelper.reset(**parse_classes(args.extras))
end

desc 'Resets data for the specified indexes or all of them only if the index specification is changed'
task upgrade: :environment do |_task, args|
Chewy::RakeHelper.upgrade(parse_classes(args.extras))
Chewy::RakeHelper.upgrade(**parse_classes(args.extras))
end

desc 'Updates data for the specified indexes/types or all of them'
task update: :environment do |_task, args|
Chewy::RakeHelper.update(parse_classes(args.extras))
Chewy::RakeHelper.update(**parse_classes(args.extras))
end

desc 'Synchronizes data for the specified indexes/types or all of them'
task sync: :environment do |_task, args|
Chewy::RakeHelper.sync(parse_classes(args.extras))
Chewy::RakeHelper.sync(**parse_classes(args.extras))
end

desc 'Resets all the indexes with the specification changed and synchronizes the rest of them'
Expand All @@ -50,22 +50,22 @@ namespace :chewy do
namespace :parallel do
desc 'Parallel version of `rake chewy:reset`'
task reset: :environment do |_task, args|
Chewy::RakeHelper.reset(parse_parallel_args(args.extras))
Chewy::RakeHelper.reset(**parse_parallel_args(args.extras))
end

desc 'Parallel version of `rake chewy:upgrade`'
task upgrade: :environment do |_task, args|
Chewy::RakeHelper.upgrade(parse_parallel_args(args.extras))
Chewy::RakeHelper.upgrade(**parse_parallel_args(args.extras))
end

desc 'Parallel version of `rake chewy:update`'
task update: :environment do |_task, args|
Chewy::RakeHelper.update(parse_parallel_args(args.extras))
Chewy::RakeHelper.update(**parse_parallel_args(args.extras))
end

desc 'Parallel version of `rake chewy:sync`'
task sync: :environment do |_task, args|
Chewy::RakeHelper.sync(parse_parallel_args(args.extras))
Chewy::RakeHelper.sync(**parse_parallel_args(args.extras))
end

desc 'Parallel version of `rake chewy:deploy`'
Expand All @@ -79,12 +79,12 @@ namespace :chewy do
namespace :journal do
desc 'Applies changes that were done after the specified time for the specified indexes/types or all of them'
task apply: :environment do |_task, args|
Chewy::RakeHelper.journal_apply(parse_journal_args(args.extras))
Chewy::RakeHelper.journal_apply(**parse_journal_args(args.extras))
end

desc 'Removes journal records created before the specified timestamp for the specified indexes/types or all of them'
task clean: :environment do |_task, args|
Chewy::RakeHelper.journal_clean(parse_journal_args(args.extras))
Chewy::RakeHelper.journal_clean(**parse_journal_args(args.extras))
end
end

Expand Down