sidekiq-unique-jobs 4.0.18 → 5.0.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of sidekiq-unique-jobs might be problematic. Click here for more details.

Files changed (88) hide show
  1. checksums.yaml +4 -4
  2. data/.codeclimate.yml +42 -7
  3. data/.csslintrc +2 -0
  4. data/.eslintignore +1 -0
  5. data/.eslintrc +213 -0
  6. data/.gitignore +2 -0
  7. data/.rspec +1 -2
  8. data/.rubocop.yml +19 -0
  9. data/.simplecov +2 -1
  10. data/.travis.yml +8 -12
  11. data/Appraisals +10 -20
  12. data/CHANGELOG.md +4 -0
  13. data/Gemfile +10 -6
  14. data/README.md +16 -2
  15. data/Rakefile +1 -0
  16. data/bin/bench +1 -0
  17. data/bin/jobs +1 -0
  18. data/circle.yml +6 -3
  19. data/gemfiles/sidekiq_4.0.gemfile +8 -5
  20. data/gemfiles/sidekiq_4.1.gemfile +8 -5
  21. data/gemfiles/{sidekiq_3.1.gemfile → sidekiq_4.2.gemfile} +9 -6
  22. data/gemfiles/{sidekiq_3.2.gemfile → sidekiq_5.0.gemfile} +9 -6
  23. data/gemfiles/sidekiq_develop.gemfile +8 -5
  24. data/lib/sidekiq-unique-jobs.rb +1 -1
  25. data/lib/sidekiq_unique_jobs/config.rb +1 -9
  26. data/lib/sidekiq_unique_jobs/constants.rb +1 -0
  27. data/lib/sidekiq_unique_jobs/core_ext.rb +44 -34
  28. data/lib/sidekiq_unique_jobs/lock/while_executing.rb +1 -1
  29. data/lib/sidekiq_unique_jobs/script_mock.rb +4 -7
  30. data/lib/sidekiq_unique_jobs/scripts.rb +9 -8
  31. data/lib/sidekiq_unique_jobs/testing/sidekiq_overrides.rb +23 -17
  32. data/lib/sidekiq_unique_jobs/unique_args.rb +1 -1
  33. data/lib/sidekiq_unique_jobs/unlockable.rb +8 -15
  34. data/lib/sidekiq_unique_jobs/util.rb +7 -0
  35. data/lib/sidekiq_unique_jobs/version.rb +1 -1
  36. data/rails_example/.env.test +12 -0
  37. data/rails_example/.rspec +1 -1
  38. data/rails_example/Gemfile +12 -9
  39. data/rails_example/app/controllers/work_controller.rb +16 -2
  40. data/rails_example/app/models/guest.rb +8 -11
  41. data/rails_example/app/workers/simple_worker.rb +4 -1
  42. data/rails_example/app/workers/slow_until_executing_worker.rb +15 -0
  43. data/rails_example/app/workers/spawn_simple_worker.rb +3 -0
  44. data/rails_example/app/workers/without_argument_worker.rb +12 -0
  45. data/rails_example/bin/check_or_setup_db +0 -1
  46. data/rails_example/common-services.yml +2 -0
  47. data/rails_example/config/database.yml +2 -2
  48. data/rails_example/config/environments/development.rb +1 -1
  49. data/rails_example/config/environments/test.rb +1 -1
  50. data/rails_example/config/initializers/sidekiq.rb +1 -1
  51. data/rails_example/config/routes.rb +1 -0
  52. data/rails_example/config/spring.rb +2 -2
  53. data/rails_example/docker-compose.yml +19 -38
  54. data/rails_example/spec/controllers/work_controller_mock_spec.rb +91 -0
  55. data/rails_example/spec/controllers/work_controller_spec.rb +46 -141
  56. data/rails_example/spec/rails_helper.rb +1 -2
  57. data/sidekiq-unique-jobs.gemspec +6 -4
  58. data/spec/jobs/custom_queue_job.rb +1 -2
  59. data/spec/jobs/just_a_worker.rb +1 -2
  60. data/spec/jobs/long_running_job.rb +1 -2
  61. data/spec/jobs/main_job.rb +1 -2
  62. data/spec/jobs/my_unique_job.rb +1 -2
  63. data/spec/jobs/plain_class.rb +1 -2
  64. data/spec/jobs/test_class.rb +1 -2
  65. data/spec/jobs/until_and_while_executing_job.rb +1 -2
  66. data/spec/jobs/until_executing_job.rb +1 -2
  67. data/spec/jobs/without_argument_job.rb +9 -0
  68. data/spec/lib/sidekiq_unique_jobs/client/middleware_spec.rb +6 -3
  69. data/spec/lib/sidekiq_unique_jobs/config_spec.rb +84 -0
  70. data/spec/lib/sidekiq_unique_jobs/lock/until_and_while_executing_spec.rb +2 -1
  71. data/spec/lib/sidekiq_unique_jobs/lock/while_executing_spec.rb +2 -2
  72. data/spec/lib/sidekiq_unique_jobs/script_mock_spec.rb +12 -6
  73. data/spec/lib/sidekiq_unique_jobs/scripts_spec.rb +0 -5
  74. data/spec/lib/sidekiq_unique_jobs/sidekiq_testing_enabled_spec.rb +5 -3
  75. data/spec/lib/sidekiq_unique_jobs/sidekiq_unique_ext_spec.rb +2 -2
  76. data/spec/lib/sidekiq_unique_jobs/unique_args_spec.rb +23 -7
  77. data/spec/lib/sidekiq_unique_jobs/unlockable_spec.rb +34 -0
  78. data/spec/lib/sidekiq_unique_jobs/util_spec.rb +1 -1
  79. data/spec/spec_helper.rb +3 -14
  80. data/spec/support/ruby_meta.rb +10 -3
  81. data/spec/support/sidekiq_meta.rb +2 -3
  82. metadata +33 -16
  83. data/gemfiles/sidekiq_2.15.gemfile +0 -9
  84. data/gemfiles/sidekiq_2.16.gemfile +0 -9
  85. data/gemfiles/sidekiq_2.17.gemfile +0 -19
  86. data/gemfiles/sidekiq_3.0.gemfile +0 -19
  87. data/gemfiles/sidekiq_3.3.gemfile +0 -19
  88. data/spec/celluloid_with_fallback.rb +0 -18
@@ -1,9 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source 'http://rubygems.org'
4
-
5
- gem 'appraisal', '~> 1.0.0'
6
- gem 'pry', platform: :mri
7
- gem 'sidekiq', '2.15'
8
-
9
- gemspec path: '../'
@@ -1,9 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source 'http://rubygems.org'
4
-
5
- gem 'appraisal', '~> 1.0.0'
6
- gem 'pry', platform: :mri
7
- gem 'sidekiq', '2.16'
8
-
9
- gemspec path: '../'
@@ -1,19 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "http://rubygems.org"
4
-
5
- gem "appraisal", "~> 2.0.0"
6
- gem "rspec-its", :require => false
7
- gem "rspec-wait", :require => false
8
- gem "sidekiq", "~> 2.17.4"
9
-
10
- platforms :mri_23 do
11
- gem "fasterer", :require => false
12
- gem "benchmark-ips", :require => false
13
- gem "pry-byebug", :require => false
14
- gem "simplecov-json", :require => false
15
- gem "memory_profiler", :require => false
16
- gem "codeclimate-test-reporter", :require => false
17
- end
18
-
19
- gemspec :path => "../"
@@ -1,19 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "http://rubygems.org"
4
-
5
- gem "appraisal", "~> 2.0.0"
6
- gem "rspec-its", :require => false
7
- gem "rspec-wait", :require => false
8
- gem "sidekiq", "~> 3.0.0"
9
-
10
- platforms :mri_23 do
11
- gem "fasterer", :require => false
12
- gem "benchmark-ips", :require => false
13
- gem "pry-byebug", :require => false
14
- gem "simplecov-json", :require => false
15
- gem "memory_profiler", :require => false
16
- gem "codeclimate-test-reporter", :require => false
17
- end
18
-
19
- gemspec :path => "../"
@@ -1,19 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "http://rubygems.org"
4
-
5
- gem "appraisal", "~> 2.0.0"
6
- gem "rspec-its", :require => false
7
- gem "rspec-wait", :require => false
8
- gem "sidekiq", "~> 3.3.0"
9
-
10
- platforms :mri_23 do
11
- gem "fasterer", :require => false
12
- gem "benchmark-ips", :require => false
13
- gem "pry-byebug", :require => false
14
- gem "simplecov-json", :require => false
15
- gem "memory_profiler", :require => false
16
- gem "codeclimate-test-reporter", :require => false
17
- end
18
-
19
- gemspec :path => "../"
@@ -1,18 +0,0 @@
1
- begin
2
- require 'celluloid/current'
3
- rescue LoadError
4
- warn 'Celluloid is old require the old way'
5
-
6
- begin
7
- require 'celluloid'
8
- rescue LoadError
9
- warn 'Sidekiq removed dependency on celluloid'
10
- end
11
- end
12
-
13
- begin
14
- require 'celluloid/test'
15
- Celluloid.boot
16
- rescue LoadError # rubocop:disable Lint/HandleExceptions
17
- # do nothing we already know celluloid is not in use
18
- end