sidekiq-unique-jobs 6.0.13 → 6.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


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

Files changed (76) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/sidekiq_unique_jobs.rb +1 -0
  4. data/lib/sidekiq_unique_jobs/cli.rb +3 -1
  5. data/lib/sidekiq_unique_jobs/constants.rb +1 -0
  6. data/lib/sidekiq_unique_jobs/lock/until_and_while_executing.rb +20 -4
  7. data/lib/sidekiq_unique_jobs/locksmith.rb +2 -2
  8. data/lib/sidekiq_unique_jobs/logging.rb +5 -0
  9. data/lib/sidekiq_unique_jobs/middleware.rb +1 -1
  10. data/lib/sidekiq_unique_jobs/sidekiq_unique_jobs.rb +7 -3
  11. data/lib/sidekiq_unique_jobs/version.rb +1 -1
  12. data/lib/sidekiq_unique_jobs/version_check.rb +95 -0
  13. data/lib/sidekiq_unique_jobs/web.rb +4 -4
  14. data/lib/sidekiq_unique_jobs/web/helpers.rb +4 -4
  15. metadata +32 -74
  16. data/.codeclimate.yml +0 -32
  17. data/.editorconfig +0 -14
  18. data/.fasterer.yml +0 -23
  19. data/.github/ISSUE_TEMPLATE/bug_report.md +0 -31
  20. data/.github/ISSUE_TEMPLATE/feature_request.md +0 -17
  21. data/.gitignore +0 -17
  22. data/.mdlrc +0 -1
  23. data/.reek.yml +0 -88
  24. data/.rspec +0 -2
  25. data/.rubocop.yml +0 -159
  26. data/.simplecov +0 -20
  27. data/.travis.yml +0 -57
  28. data/.yardopts +0 -1
  29. data/Appraisals +0 -33
  30. data/CODE_OF_CONDUCT.md +0 -74
  31. data/Gemfile +0 -29
  32. data/Guardfile +0 -26
  33. data/Rakefile +0 -29
  34. data/_config.yml +0 -1
  35. data/assets/unique_digests_1.png +0 -0
  36. data/assets/unique_digests_2.png +0 -0
  37. data/bin/bench +0 -36
  38. data/examples/another_unique_job.rb +0 -15
  39. data/examples/custom_queue_job.rb +0 -12
  40. data/examples/custom_queue_job_with_filter_method.rb +0 -13
  41. data/examples/custom_queue_job_with_filter_proc.rb +0 -16
  42. data/examples/expiring_job.rb +0 -12
  43. data/examples/inline_worker.rb +0 -12
  44. data/examples/just_a_worker.rb +0 -13
  45. data/examples/long_running_job.rb +0 -14
  46. data/examples/main_job.rb +0 -14
  47. data/examples/my_job.rb +0 -12
  48. data/examples/my_unique_job.rb +0 -15
  49. data/examples/my_unique_job_with_filter_method.rb +0 -21
  50. data/examples/my_unique_job_with_filter_proc.rb +0 -19
  51. data/examples/notify_worker.rb +0 -14
  52. data/examples/plain_class.rb +0 -13
  53. data/examples/simple_worker.rb +0 -15
  54. data/examples/spawn_simple_worker.rb +0 -12
  55. data/examples/test_class.rb +0 -9
  56. data/examples/unique_across_workers_job.rb +0 -20
  57. data/examples/unique_job_on_conflict_raise.rb +0 -14
  58. data/examples/unique_job_on_conflict_reject.rb +0 -14
  59. data/examples/unique_job_on_conflict_reschedule.rb +0 -14
  60. data/examples/unique_job_with_conditional_parameter.rb +0 -18
  61. data/examples/unique_job_with_filter_method.rb +0 -21
  62. data/examples/unique_job_with_nil_unique_args.rb +0 -20
  63. data/examples/unique_job_with_no_unique_args_method.rb +0 -16
  64. data/examples/unique_job_withthout_unique_args_parameter.rb +0 -18
  65. data/examples/unique_on_all_queues_job.rb +0 -16
  66. data/examples/until_and_while_executing_job.rb +0 -17
  67. data/examples/until_executed_2_job.rb +0 -24
  68. data/examples/until_executed_job.rb +0 -25
  69. data/examples/until_executing_job.rb +0 -11
  70. data/examples/until_expired_job.rb +0 -12
  71. data/examples/until_global_expired_job.rb +0 -12
  72. data/examples/while_executing_job.rb +0 -15
  73. data/examples/while_executing_reject_job.rb +0 -14
  74. data/examples/without_argument_job.rb +0 -13
  75. data/sidekiq-unique-jobs.gemspec +0 -63
  76. data/update_docs.sh +0 -37
@@ -1,32 +0,0 @@
1
- ---
2
- version: '2'
3
- plugins:
4
- duplication:
5
- enabled: true
6
- config:
7
- languages:
8
- - ruby
9
- fixme:
10
- enabled: true
11
- flog:
12
- enabled: true
13
- markdownlint:
14
- enabled: true
15
- reek:
16
- enabled: true
17
- config:
18
- file: .reek.yml
19
- rubocop:
20
- enabled: true
21
- channel: rubocop-0-63
22
- config:
23
- file: .rubocop.yml
24
-
25
- exclude_patterns:
26
- - "Gemfile"
27
- - "*.gemspec"
28
- - "Appraisals"
29
- - "gemfiles/"
30
- - "rails_example/"
31
- - "redis/"
32
- - "tmp/"
@@ -1,14 +0,0 @@
1
- # This file is for unifying the coding style for different editors and IDEs
2
- # editorconfig.org
3
-
4
- root = true
5
-
6
- [*]
7
- charset = utf-8
8
- trim_trailing_whitespace = true
9
- insert_final_newline = true
10
- indent_style = space
11
- indent_size = 2
12
-
13
- [*.{md,slim,haml}]
14
- trim_trailing_whitespace = true
@@ -1,23 +0,0 @@
1
- speedups:
2
- parallel_assignment: false
3
- rescue_vs_respond_to: true
4
- module_eval: true
5
- shuffle_first_vs_sample: true
6
- for_loop_vs_each: true
7
- each_with_index_vs_while: false
8
- map_flatten_vs_flat_map: true
9
- reverse_each_vs_reverse_each: true
10
- select_first_vs_detect: true
11
- sort_vs_sort_by: true
12
- fetch_with_argument_vs_block: true
13
- keys_each_vs_each_key: true
14
- hash_merge_bang_vs_hash_brackets: true
15
- block_vs_symbol_to_proc: true
16
- proc_call_vs_yield: true
17
- gsub_vs_tr: true
18
- select_last_vs_reverse_detect: true
19
- getter_vs_attr_reader: true
20
- setter_vs_attr_writer: true
21
-
22
- exclude_paths:
23
- - 'spec/**/*.rb'
@@ -1,31 +0,0 @@
1
- ---
2
- name: Bug report
3
- about: Create a report to help us improve
4
-
5
- ---
6
-
7
- **Describe the bug**
8
- A clear and concise description of what the bug is.
9
-
10
- **Expected behavior**
11
- A clear and concise description of what you expected to happen.
12
-
13
- **Current behavior**
14
- What happens instead of the expected behavior?
15
-
16
- **Worker class**
17
-
18
- ```ruby
19
- class MyWorker
20
- include Sidekiq::Worker
21
- sidekiq_options lock: :until_executed, queue: :undefault
22
- def perform(args); end
23
-
24
- def self.unique_args(args)
25
- # the way you consider unique arguments
26
- end
27
- end
28
- ```
29
-
30
- **Additional context**
31
- Add any other context about the problem here.
@@ -1,17 +0,0 @@
1
- ---
2
- name: Feature request
3
- about: Suggest an idea for this project
4
-
5
- ---
6
-
7
- **Is your feature request related to a problem? Please describe.**
8
- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
9
-
10
- **Describe the solution you'd like**
11
- A clear and concise description of what you want to happen.
12
-
13
- **Describe alternatives you've considered**
14
- A clear and concise description of any alternative solutions or features you've considered.
15
-
16
- **Additional context**
17
- Add any other context or screenshots about the feature request here.
data/.gitignore DELETED
@@ -1,17 +0,0 @@
1
- *.gem
2
- *.sublime-*
3
- *.sw?
4
- .DS_Store
5
- .idea/
6
- .rspec_status
7
- .ruby-version
8
- /.byebug_history
9
- /.yardoc/
10
- /doc*/
11
- /gemfiles/.bundle/
12
- /sidekiq/
13
- coverage/
14
- Gemfile.lock
15
- gemfiles/*.lock
16
- rails_example/spec/examples.txt
17
- tmp/
data/.mdlrc DELETED
@@ -1 +0,0 @@
1
- rules "~MD013"
data/.reek.yml DELETED
@@ -1,88 +0,0 @@
1
- ---
2
- exclude_paths:
3
- - rails_example
4
- - redis
5
- - spec
6
- - tmp
7
- - gemfiles
8
- - examples
9
- - vendor/bundle
10
- detectors:
11
- DuplicateMethodCall:
12
- exclude:
13
- - Sidekiq#self.use_options
14
- - SidekiqUniqueJobs::Web#self.registered
15
- IrresponsibleModule:
16
- enabled: false
17
- LongParameterList:
18
- enabled: true
19
- exclude:
20
- - initialize
21
- - Hash#slice
22
- - SidekiqUniqueJobs::Locksmith#create_lock
23
- - SidekiqUniqueJobs::Locksmith#expire_when_necessary
24
- - SidekiqUniqueJobs::Client::Middleware#call
25
- TooManyStatements:
26
- exclude:
27
- - initialize
28
- - Hash#slice
29
- - SidekiqUniqueJobs::Locksmith#create_lock
30
- - SidekiqUniqueJobs::Locksmith#expire_when_necessary
31
- - SidekiqUniqueJobs::Middleware#configure_server_middleware
32
- - SidekiqUniqueJobs::Server::Middleware#call
33
- - SidekiqUniqueJobs::UniqueArgs#filtered_args
34
- - SidekiqUniqueJobs::Util#del
35
- - SidekiqUniqueJobs::Digests#batch_delete
36
- - SidekiqUniqueJobs::Digests#delete_by_pattern
37
- - SidekiqUniqueJobs::Web#self.registered
38
- UncommunicativeVariableName:
39
- exclude:
40
- - Hash#slice
41
- BooleanParameter:
42
- exclude:
43
- - SidekiqUniqueJobs::Cli#self.banner
44
- UtilityFunction:
45
- enabled: false
46
- TooManyConstants:
47
- exclude:
48
- - SidekiqUniqueJobs
49
- ManualDispatch:
50
- enabled: true
51
- exclude:
52
- - Hash#slice
53
- - Hash#slice!
54
- - SidekiqUniqueJobs::OnConflict::Reject#deadset_kill?
55
- - SidekiqUniqueJobs::SidekiqWorkerMethods#worker_method_defined?
56
- - SidekiqUniqueJobs::Web::Helpers#redirect_to
57
- MissingSafeMethod:
58
- exclude:
59
- - Array
60
- NilCheck:
61
- enabled: false
62
- DataClump:
63
- enabled: true
64
- exclude:
65
- - SidekiqUniqueJobs::Util
66
- FeatureEnvy:
67
- exclude:
68
- - SidekiqUniqueJobs::Digests#batch_delete
69
- - SidekiqUniqueJobs::Digests#page
70
- - SidekiqUniqueJobs::Logging#debug_item
71
- - SidekiqUniqueJobs::OnConflict::Reject#push_to_deadset
72
- - SidekiqUniqueJobs::Util#batch_delete
73
- - SidekiqUniqueJobs::Web::Helpers#cparams
74
- NestedIterators:
75
- exclude:
76
- - SidekiqUniqueJobs::Digests#batch_delete
77
- - SidekiqUniqueJobs::Locksmith#create_lock
78
- - SidekiqUniqueJobs::Middleware#configure_client_middleware
79
- - SidekiqUniqueJobs::Middleware#configure_server_middleware
80
- - SidekiqUniqueJobs::Util#batch_delete
81
- - SidekiqUniqueJobs::Util#keys_with_ttl
82
- TooManyInstanceVariables:
83
- exclude:
84
- - SidekiqUniqueJobs::Locksmith
85
- TooManyMethods:
86
- exclude:
87
- - SidekiqUniqueJobs::Locksmith
88
- - SidekiqUniqueJobs::Lock::BaseLock
data/.rspec DELETED
@@ -1,2 +0,0 @@
1
- --color
2
- --require spec_helper
@@ -1,159 +0,0 @@
1
- require:
2
- - rubocop-performance
3
- - rubocop-rspec
4
-
5
- inherit_mode:
6
- merge:
7
- - Exclude
8
-
9
- AllCops:
10
- TargetRubyVersion: 2.3
11
- Include:
12
- - "**/Rakefile"
13
- - "**/Gemfile"
14
- - "*.gemspec"
15
- - "lib/**/*.rb"
16
- - "bin/**/*.rb"
17
- - "spec/**/*.rb"
18
- - "examples/**/*.rb"
19
- Exclude:
20
- - "Gemfile.lock"
21
- - "**/*.erb"
22
- - "gemfiles/**/*"
23
-
24
- Lint/AmbiguousBlockAssociation:
25
- Exclude:
26
- - "spec/**/*"
27
-
28
- Lint/HandleExceptions:
29
- Enabled: true
30
-
31
- Lint/UselessAssignment:
32
- Enabled: true
33
-
34
- Metrics/AbcSize:
35
- Max: 38
36
-
37
- Metrics/CyclomaticComplexity:
38
- Max: 7
39
-
40
- Metrics/LineLength:
41
- Max: 120
42
-
43
- Metrics/MethodLength:
44
- Max: 13
45
-
46
- Metrics/BlockLength:
47
- Enabled: true
48
- Exclude:
49
- - "**/spec/**/*.rb"
50
- - "**/*.rake"
51
- - "Rakefile"
52
- - "*.gemspec"
53
-
54
- Metrics/PerceivedComplexity:
55
- Max: 8
56
-
57
- Naming/AccessorMethodName:
58
- Enabled: true
59
-
60
- Naming/ConstantName:
61
- Enabled: true
62
-
63
- Naming/FileName:
64
- Enabled: true
65
- Exclude:
66
- - lib/sidekiq-unique-jobs.rb
67
-
68
- Naming/RescuedExceptionsVariableName:
69
- PreferredName: ex
70
-
71
- Naming/UncommunicativeMethodParamName:
72
- AllowedNames:
73
- - ex
74
-
75
- RSpec/AlignLeftLetBrace:
76
- Enabled: true
77
-
78
- RSpec/DescribeClass:
79
- Exclude:
80
- - spec/unit/sidekiq_unique_jobs/sidekiq/api_spec.rb
81
- - spec/unit/sidekiq_unique_jobs/core_ext_spec.rb
82
-
83
- RSpec/ExampleLength:
84
- Enabled: false
85
-
86
- RSpec/ExpectActual:
87
- Enabled: false
88
-
89
- RSpec/ExpectChange:
90
- Exclude:
91
- - spec/integration/sidekiq_unique_jobs/lock/**/*_spec.rb
92
-
93
- RSpec/FilePath:
94
- Enabled: true
95
- RSpec/MessageSpies:
96
- Exclude:
97
- - spec/unit/sidekiq_unique_jobs/scripts_spec.rb
98
-
99
- RSpec/MultipleExpectations:
100
- Enabled: false
101
-
102
- RSpec/NestedGroups:
103
- Max: 4
104
- Enabled: true
105
-
106
- RSpec/RepeatedExample:
107
- Exclude:
108
- - spec/unit/sidekiq_unique_jobs/unique_args_spec.rb
109
-
110
- Style/Documentation:
111
- Enabled: true
112
- Exclude:
113
- - "examples/**/*.rb"
114
- - "rails_example/**/*.rb"
115
- - "bin/**/*.rb"
116
- - "lib/sidekiq_unique_jobs/testing.rb"
117
- - "lib/sidekiq_unique_jobs/core_ext.rb"
118
- - "lib/sidekiq_unique_jobs/sidekiq_unique_ext.rb"
119
- - "lib/sidekiq_unique_jobs/web/**/*"
120
- - "lib/sidekiq_unique_jobs/on_conflict.rb"
121
- - "lib/sidekiq_unique_jobs/timeout.rb"
122
-
123
- Style/FrozenStringLiteralComment:
124
- Enabled: true
125
-
126
- Style/GlobalVars:
127
- Enabled: true
128
-
129
- Style/ModuleFunction:
130
- Enabled: false
131
-
132
- Style/StringLiterals:
133
- Enabled: true
134
- EnforcedStyle: double_quotes
135
- ConsistentQuotesInMultiline: true
136
-
137
- Style/StringLiteralsInInterpolation:
138
- Enabled: true
139
-
140
- Style/SymbolArray:
141
- Enabled: true
142
- EnforcedStyle: brackets
143
-
144
- Style/TernaryParentheses:
145
- Enabled: true
146
- EnforcedStyle: require_parentheses_when_complex
147
- AllowSafeAssignment: true
148
-
149
- Style/TrailingCommaInArguments:
150
- Enabled: true
151
- EnforcedStyleForMultiline: comma
152
-
153
- Style/TrailingCommaInArrayLiteral:
154
- Enabled: true
155
- EnforcedStyleForMultiline: comma
156
-
157
- Style/TrailingCommaInHashLiteral:
158
- Enabled: true
159
- EnforcedStyleForMultiline: comma
data/.simplecov DELETED
@@ -1,20 +0,0 @@
1
- require 'simplecov-json'
2
-
3
- SimpleCov.command_name 'RSpec'
4
- # SimpleCov.refuse_coverage_drop
5
- SimpleCov.formatters = [
6
- SimpleCov::Formatter::HTMLFormatter,
7
- SimpleCov::Formatter::JSONFormatter,
8
- ]
9
-
10
- SimpleCov.start do
11
- add_filter '/spec/'
12
- add_filter '/bin/'
13
- add_filter '/gemfiles/'
14
- add_filter '/examples/'
15
-
16
- add_group 'Client', 'lib/sidekiq_unique_jobs/client'
17
- add_group 'Locks', 'lib/sidekiq_unique_jobs/lock'
18
- add_group 'Server', 'lib/sidekiq_unique_jobs/server'
19
- add_group 'Timeout', 'lib/sidekiq_unique_jobs/timeout'
20
- end
@@ -1,57 +0,0 @@
1
- env:
2
- matrix:
3
- - COV=false
4
- global:
5
- - CC_TEST_REPORTER_ID=88e524e8f638efe690def7a6e2c72b1a9db5cdfa74548921b734d609a5858ee5
6
- - GIT_COMMITTED_AT=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then git log -1 --pretty=format:%ct; else git log -1 --skip 1 --pretty=format:%ct; fi)
7
- dist: trusty
8
- sudo: required
9
- language: ruby
10
- cache: bundler
11
- services:
12
- - redis-server
13
-
14
- before_install:
15
- - gem install bundler -v 2.0.1
16
- - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
17
- - chmod +x ./cc-test-reporter
18
-
19
- before_script:
20
- - if [[ "${COV}" = "true" ]]; then ./cc-test-reporter before-build; fi;
21
-
22
- script:
23
- - if [[ "${COV}" = "true" ]]; then bundle exec rubocop -P; fi;
24
- - bundle exec rspec --require spec_helper
25
-
26
- after_script:
27
- - if [[ "${COV}" = "true" ]]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT; fi;
28
- rvm:
29
- - 2.6.2
30
- - 2.4.5
31
- - 2.3.8
32
- - jruby-9.2.7.0
33
-
34
- matrix:
35
- fast_finish: true
36
- include:
37
- - rvm: 2.5.5
38
- gemfile: gemfiles/sidekiq_develop.gemfile
39
- env: COV=true
40
- - rvm: 2.6.2
41
- gemfile: gemfiles/sidekiq_6.0.gemfile
42
- - rvm: 2.5.5
43
- gemfile: gemfiles/sidekiq_6.0.gemfile
44
-
45
- gemfile:
46
- - gemfiles/sidekiq_develop.gemfile
47
- - gemfiles/sidekiq_4.0.gemfile
48
- - gemfiles/sidekiq_4.1.gemfile
49
- - gemfiles/sidekiq_4.2.gemfile
50
- - gemfiles/sidekiq_5.0.gemfile
51
- - gemfiles/sidekiq_5.1.gemfile
52
- - gemfiles/sidekiq_5.2.gemfile
53
-
54
- notifications:
55
- email:
56
- recipients:
57
- - mikael@zoolutions.se