Skip to content

Commit

Permalink
Fix ruby 2.7 warnings in rake tasks (#765)
Browse files Browse the repository at this point in the history
  • Loading branch information
aglushkov authored Mar 1, 2021
1 parent 3c8fc7f commit f8ff5d3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
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

0 comments on commit f8ff5d3

Please sign in to comment.