Skip to content

Commit

Permalink
[5.2.0 with Ruby 3.0 support] Fix ruby 2.7 warnings in rake tasks (to…
Browse files Browse the repository at this point in the history
  • Loading branch information
aglushkov authored and tjozwik committed Nov 26, 2021
1 parent 8967c24 commit f43355b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
9 changes: 6 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,21 @@
* Add support for Ruby 3 (@lowang, #734)

* Correct deprecation warning for Elasticsearch 5.6 to 6: empty query for`_delete_by_query`, delete by alias, `index_already_exists_exception` renaming (@bhacaz, #735)
* [#765](https://github.com/toptal/chewy/pull/765): Fix ruby 2.7 warnings in rake tasks ([@aglushkov][])

### Bugs Fixed

* Update gemspec dependencies for Rails. Update CI gemfiles and matrix to tests against current LTS Rails versions. (@bhacaz, #733)

* Tweak some wording and formatting; add a note about compatibility; update copyright; remove broken logo; update the CI badge (@bbatsov)

* Update instructions for AWS ElasticSearch (@olancheg, #714)

* Fix more ruby 2.7 keyword params deprecation warnings (@aglushkov, #728)

* Fixed all deprecation warnings in Ruby 2.7 (@gseddon, #715)

* Added Ruby 2.7 to CircleCI config (@mrzasa, #718)
* Added Ruby 2.7 to CircleCI config (@mrzasa, #718)

* Allow configuration of Active Job queue name (@mrzasa, #707)

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 f43355b

Please sign in to comment.