sidekiq-unique-jobs 6.0.8 → 6.0.9

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 (60) hide show
  1. checksums.yaml +4 -4
  2. data/.codeclimate.yml +10 -13
  3. data/.editorconfig +1 -1
  4. data/.gitignore +11 -22
  5. data/.mdlrc +1 -0
  6. data/.reek.yml +1 -0
  7. data/.rspec +1 -1
  8. data/.rubocop.yml +58 -30
  9. data/.travis.yml +14 -7
  10. data/.yardopts +1 -7
  11. data/CHANGELOG.md +704 -160
  12. data/Gemfile +19 -17
  13. data/Guardfile +0 -29
  14. data/README.md +77 -65
  15. data/Rakefile +22 -5
  16. data/bin/bench +5 -5
  17. data/bin/uniquejobs +2 -2
  18. data/examples/custom_queue_job.rb +1 -1
  19. data/examples/custom_queue_job_with_filter_method.rb +1 -1
  20. data/examples/custom_queue_job_with_filter_proc.rb +2 -2
  21. data/examples/my_unique_job_with_filter_method.rb +1 -1
  22. data/examples/my_unique_job_with_filter_proc.rb +1 -1
  23. data/examples/unique_job_with_filter_method.rb +1 -1
  24. data/lib/sidekiq-unique-jobs.rb +1 -1
  25. data/lib/sidekiq_unique_jobs.rb +32 -107
  26. data/lib/sidekiq_unique_jobs/cli.rb +15 -10
  27. data/lib/sidekiq_unique_jobs/client/middleware.rb +1 -1
  28. data/lib/sidekiq_unique_jobs/constants.rb +25 -20
  29. data/lib/sidekiq_unique_jobs/digests.rb +5 -4
  30. data/lib/sidekiq_unique_jobs/lock/base_lock.rb +3 -3
  31. data/lib/sidekiq_unique_jobs/lock/until_executed.rb +1 -1
  32. data/lib/sidekiq_unique_jobs/lock/while_executing.rb +1 -1
  33. data/lib/sidekiq_unique_jobs/locksmith.rb +4 -4
  34. data/lib/sidekiq_unique_jobs/logging.rb +1 -1
  35. data/lib/sidekiq_unique_jobs/middleware.rb +9 -4
  36. data/lib/sidekiq_unique_jobs/normalizer.rb +1 -1
  37. data/lib/sidekiq_unique_jobs/on_conflict.rb +12 -7
  38. data/lib/sidekiq_unique_jobs/on_conflict/raise.rb +1 -1
  39. data/lib/sidekiq_unique_jobs/on_conflict/reject.rb +3 -3
  40. data/lib/sidekiq_unique_jobs/on_conflict/strategy.rb +1 -1
  41. data/lib/sidekiq_unique_jobs/options_with_fallback.rb +1 -1
  42. data/lib/sidekiq_unique_jobs/scripts.rb +5 -5
  43. data/lib/sidekiq_unique_jobs/sidekiq_unique_ext.rb +1 -1
  44. data/lib/sidekiq_unique_jobs/sidekiq_unique_jobs.rb +75 -0
  45. data/lib/sidekiq_unique_jobs/testing.rb +3 -3
  46. data/lib/sidekiq_unique_jobs/timeout.rb +1 -1
  47. data/lib/sidekiq_unique_jobs/unique_args.rb +2 -2
  48. data/lib/sidekiq_unique_jobs/util.rb +3 -3
  49. data/lib/sidekiq_unique_jobs/version.rb +1 -1
  50. data/lib/sidekiq_unique_jobs/web.rb +13 -8
  51. data/lib/sidekiq_unique_jobs/web/helpers.rb +2 -2
  52. data/lib/sidekiq_unique_jobs/web/views/unique_digests.erb +4 -0
  53. data/lib/tasks/changelog.rake +23 -0
  54. data/sidekiq-unique-jobs.gemspec +48 -27
  55. data/update_docs.sh +37 -0
  56. metadata +68 -33
  57. data/.csslintrc +0 -2
  58. data/.dockerignore +0 -4
  59. data/.eslintignore +0 -1
  60. data/.eslintrc +0 -213
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq-unique-jobs
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.8
4
+ version: 6.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mikael Henriksson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-10 00:00:00.000000000 Z
11
+ date: 2019-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -70,28 +70,28 @@ dependencies:
70
70
  requirements:
71
71
  - - ">="
72
72
  - !ruby/object:Gem::Version
73
- version: '1.16'
73
+ version: '2.0'
74
74
  type: :development
75
75
  prerelease: false
76
76
  version_requirements: !ruby/object:Gem::Requirement
77
77
  requirements:
78
78
  - - ">="
79
79
  - !ruby/object:Gem::Version
80
- version: '1.16'
80
+ version: '2.0'
81
81
  - !ruby/object:Gem::Dependency
82
- name: rspec
82
+ name: rack-test
83
83
  requirement: !ruby/object:Gem::Requirement
84
84
  requirements:
85
- - - "~>"
85
+ - - ">="
86
86
  - !ruby/object:Gem::Version
87
- version: '3.7'
87
+ version: '0'
88
88
  type: :development
89
89
  prerelease: false
90
90
  version_requirements: !ruby/object:Gem::Requirement
91
91
  requirements:
92
- - - "~>"
92
+ - - ">="
93
93
  - !ruby/object:Gem::Version
94
- version: '3.7'
94
+ version: '0'
95
95
  - !ruby/object:Gem::Dependency
96
96
  name: rake
97
97
  requirement: !ruby/object:Gem::Requirement
@@ -106,6 +106,34 @@ dependencies:
106
106
  - - "~>"
107
107
  - !ruby/object:Gem::Version
108
108
  version: '12.3'
109
+ - !ruby/object:Gem::Dependency
110
+ name: rspec
111
+ requirement: !ruby/object:Gem::Requirement
112
+ requirements:
113
+ - - "~>"
114
+ - !ruby/object:Gem::Version
115
+ version: '3.7'
116
+ type: :development
117
+ prerelease: false
118
+ version_requirements: !ruby/object:Gem::Requirement
119
+ requirements:
120
+ - - "~>"
121
+ - !ruby/object:Gem::Version
122
+ version: '3.7'
123
+ - !ruby/object:Gem::Dependency
124
+ name: sinatra
125
+ requirement: !ruby/object:Gem::Requirement
126
+ requirements:
127
+ - - ">="
128
+ - !ruby/object:Gem::Version
129
+ version: '0'
130
+ type: :development
131
+ prerelease: false
132
+ version_requirements: !ruby/object:Gem::Requirement
133
+ requirements:
134
+ - - ">="
135
+ - !ruby/object:Gem::Version
136
+ version: '0'
109
137
  - !ruby/object:Gem::Dependency
110
138
  name: timecop
111
139
  requirement: !ruby/object:Gem::Requirement
@@ -126,71 +154,73 @@ dependencies:
126
154
  requirements:
127
155
  - - "~>"
128
156
  - !ruby/object:Gem::Version
129
- version: '0.9'
157
+ version: 0.9.18
130
158
  type: :development
131
159
  prerelease: false
132
160
  version_requirements: !ruby/object:Gem::Requirement
133
161
  requirements:
134
162
  - - "~>"
135
163
  - !ruby/object:Gem::Version
136
- version: '0.9'
164
+ version: 0.9.18
137
165
  - !ruby/object:Gem::Dependency
138
- name: gem-release
166
+ name: redcarpet
139
167
  requirement: !ruby/object:Gem::Requirement
140
168
  requirements:
141
169
  - - "~>"
142
170
  - !ruby/object:Gem::Version
143
- version: '1.0'
171
+ version: '3.4'
144
172
  type: :development
145
173
  prerelease: false
146
174
  version_requirements: !ruby/object:Gem::Requirement
147
175
  requirements:
148
176
  - - "~>"
149
177
  - !ruby/object:Gem::Version
150
- version: '1.0'
178
+ version: '3.4'
151
179
  - !ruby/object:Gem::Dependency
152
- name: awesome_print
180
+ name: github-markup
153
181
  requirement: !ruby/object:Gem::Requirement
154
182
  requirements:
155
183
  - - "~>"
156
184
  - !ruby/object:Gem::Version
157
- version: '1.8'
185
+ version: '3.0'
158
186
  type: :development
159
187
  prerelease: false
160
188
  version_requirements: !ruby/object:Gem::Requirement
161
189
  requirements:
162
190
  - - "~>"
163
191
  - !ruby/object:Gem::Version
164
- version: '1.8'
192
+ version: '3.0'
165
193
  - !ruby/object:Gem::Dependency
166
- name: rack-test
194
+ name: github_changelog_generator
167
195
  requirement: !ruby/object:Gem::Requirement
168
196
  requirements:
169
- - - ">="
197
+ - - "~>"
170
198
  - !ruby/object:Gem::Version
171
- version: '0'
199
+ version: '1.14'
172
200
  type: :development
173
201
  prerelease: false
174
202
  version_requirements: !ruby/object:Gem::Requirement
175
203
  requirements:
176
- - - ">="
204
+ - - "~>"
177
205
  - !ruby/object:Gem::Version
178
- version: '0'
206
+ version: '1.14'
179
207
  - !ruby/object:Gem::Dependency
180
- name: sinatra
208
+ name: gem-release
181
209
  requirement: !ruby/object:Gem::Requirement
182
210
  requirements:
183
211
  - - ">="
184
212
  - !ruby/object:Gem::Version
185
- version: '0'
213
+ version: '2.0'
186
214
  type: :development
187
215
  prerelease: false
188
216
  version_requirements: !ruby/object:Gem::Requirement
189
217
  requirements:
190
218
  - - ">="
191
219
  - !ruby/object:Gem::Version
192
- version: '0'
193
- description: Handles various types of unique jobs for Sidekiq
220
+ version: '2.0'
221
+ description: |
222
+ Prevents simultaneous Sidekiq jobs with the same unique arguments to run.
223
+ Highly configurable to suite your specific needs.
194
224
  email:
195
225
  - mikael@zoolutions.se
196
226
  executables:
@@ -199,15 +229,12 @@ extensions: []
199
229
  extra_rdoc_files: []
200
230
  files:
201
231
  - ".codeclimate.yml"
202
- - ".csslintrc"
203
- - ".dockerignore"
204
232
  - ".editorconfig"
205
- - ".eslintignore"
206
- - ".eslintrc"
207
233
  - ".fasterer.yml"
208
234
  - ".github/ISSUE_TEMPLATE/bug_report.md"
209
235
  - ".github/ISSUE_TEMPLATE/feature_request.md"
210
236
  - ".gitignore"
237
+ - ".mdlrc"
211
238
  - ".reek.yml"
212
239
  - ".rspec"
213
240
  - ".rubocop.yml"
@@ -297,6 +324,7 @@ files:
297
324
  - lib/sidekiq_unique_jobs/scripts.rb
298
325
  - lib/sidekiq_unique_jobs/server/middleware.rb
299
326
  - lib/sidekiq_unique_jobs/sidekiq_unique_ext.rb
327
+ - lib/sidekiq_unique_jobs/sidekiq_unique_jobs.rb
300
328
  - lib/sidekiq_unique_jobs/sidekiq_worker_methods.rb
301
329
  - lib/sidekiq_unique_jobs/testing.rb
302
330
  - lib/sidekiq_unique_jobs/timeout.rb
@@ -310,6 +338,7 @@ files:
310
338
  - lib/sidekiq_unique_jobs/web/views/_paging.erb
311
339
  - lib/sidekiq_unique_jobs/web/views/unique_digest.erb
312
340
  - lib/sidekiq_unique_jobs/web/views/unique_digests.erb
341
+ - lib/tasks/changelog.rake
313
342
  - redis/acquire_lock.lua
314
343
  - redis/delete.lua
315
344
  - redis/delete_by_digest.lua
@@ -318,10 +347,16 @@ files:
318
347
  - redis/release_stale_locks.lua
319
348
  - redis/unlock.lua
320
349
  - sidekiq-unique-jobs.gemspec
321
- homepage: https://github.com/mhenrixon/sidekiq-unique-jobs
350
+ - update_docs.sh
351
+ homepage: https://mhenrixon.github.io/sidekiq-unique-jobs
322
352
  licenses:
323
353
  - MIT
324
- metadata: {}
354
+ metadata:
355
+ homepage_uri: https://mhenrixon.github.io/sidekiq-unique-jobs
356
+ bug_tracker_uri: https://github.com/mhenrixon/sidekiq-unique-jobs/issues
357
+ documentation_uri: https://mhenrixon.github.io/sidekiq-unique-jobs
358
+ source_code_uri: https://github.com/mhenrixon/sidekiq-unique-jobs
359
+ changelog_uri: https://github.com/mhenrixon/sidekiq-unique-jobs/CHANGELOG.md
325
360
  post_install_message:
326
361
  rdoc_options: []
327
362
  require_paths:
@@ -340,5 +375,5 @@ requirements: []
340
375
  rubygems_version: 3.0.2
341
376
  signing_key:
342
377
  specification_version: 4
343
- summary: Uniqueness for Sidekiq Jobs
378
+ summary: Sidekiq middleware that prevents duplicates jobs
344
379
  test_files: []
data/.csslintrc DELETED
@@ -1,2 +0,0 @@
1
- --exclude-exts=.min.css
2
- --ignore=adjoining-classes,box-model,ids,order-alphabetical,unqualified-attributes
data/.dockerignore DELETED
@@ -1,4 +0,0 @@
1
- .dockerignore
2
- .byebug_history
3
- log/*
4
- tmp/*
data/.eslintignore DELETED
@@ -1 +0,0 @@
1
- **/*{.,-}min.js
data/.eslintrc DELETED
@@ -1,213 +0,0 @@
1
- ecmaFeatures:
2
- modules: true
3
- jsx: true
4
-
5
- env:
6
- amd: true
7
- browser: true
8
- es6: true
9
- jquery: true
10
- node: true
11
-
12
- # http://eslint.org/docs/rules/
13
- rules:
14
- # Possible Errors
15
- comma-dangle: [2, never]
16
- no-cond-assign: 2
17
- no-console: 0
18
- no-constant-condition: 2
19
- no-control-regex: 2
20
- no-debugger: 2
21
- no-dupe-args: 2
22
- no-dupe-keys: 2
23
- no-duplicate-case: 2
24
- no-empty: 2
25
- no-empty-character-class: 2
26
- no-ex-assign: 2
27
- no-extra-boolean-cast: 2
28
- no-extra-parens: 0
29
- no-extra-semi: 2
30
- no-func-assign: 2
31
- no-inner-declarations: [2, functions]
32
- no-invalid-regexp: 2
33
- no-irregular-whitespace: 2
34
- no-negated-in-lhs: 2
35
- no-obj-calls: 2
36
- no-regex-spaces: 2
37
- no-sparse-arrays: 2
38
- no-unexpected-multiline: 2
39
- no-unreachable: 2
40
- use-isnan: 2
41
- valid-jsdoc: 0
42
- valid-typeof: 2
43
-
44
- # Best Practices
45
- accessor-pairs: 2
46
- block-scoped-var: 0
47
- complexity: [2, 6]
48
- consistent-return: 0
49
- curly: 0
50
- default-case: 0
51
- dot-location: 0
52
- dot-notation: 0
53
- eqeqeq: 2
54
- guard-for-in: 2
55
- no-alert: 2
56
- no-caller: 2
57
- no-case-declarations: 2
58
- no-div-regex: 2
59
- no-else-return: 0
60
- no-empty-label: 2
61
- no-empty-pattern: 2
62
- no-eq-null: 2
63
- no-eval: 2
64
- no-extend-native: 2
65
- no-extra-bind: 2
66
- no-fallthrough: 2
67
- no-floating-decimal: 0
68
- no-implicit-coercion: 0
69
- no-implied-eval: 2
70
- no-invalid-this: 0
71
- no-iterator: 2
72
- no-labels: 0
73
- no-lone-blocks: 2
74
- no-loop-func: 2
75
- no-magic-number: 0
76
- no-multi-spaces: 0
77
- no-multi-str: 0
78
- no-native-reassign: 2
79
- no-new-func: 2
80
- no-new-wrappers: 2
81
- no-new: 2
82
- no-octal-escape: 2
83
- no-octal: 2
84
- no-proto: 2
85
- no-redeclare: 2
86
- no-return-assign: 2
87
- no-script-url: 2
88
- no-self-compare: 2
89
- no-sequences: 0
90
- no-throw-literal: 0
91
- no-unused-expressions: 2
92
- no-useless-call: 2
93
- no-useless-concat: 2
94
- no-void: 2
95
- no-warning-comments: 0
96
- no-with: 2
97
- radix: 2
98
- vars-on-top: 0
99
- wrap-iife: 2
100
- yoda: 0
101
-
102
- # Strict
103
- strict: 0
104
-
105
- # Variables
106
- init-declarations: 0
107
- no-catch-shadow: 2
108
- no-delete-var: 2
109
- no-label-var: 2
110
- no-shadow-restricted-names: 2
111
- no-shadow: 0
112
- no-undef-init: 2
113
- no-undef: 0
114
- no-undefined: 0
115
- no-unused-vars: 0
116
- no-use-before-define: 0
117
-
118
- # Node.js and CommonJS
119
- callback-return: 2
120
- global-require: 2
121
- handle-callback-err: 2
122
- no-mixed-requires: 0
123
- no-new-require: 0
124
- no-path-concat: 2
125
- no-process-exit: 2
126
- no-restricted-modules: 0
127
- no-sync: 0
128
-
129
- # Stylistic Issues
130
- array-bracket-spacing: 0
131
- block-spacing: 0
132
- brace-style: 0
133
- camelcase: 0
134
- comma-spacing: 0
135
- comma-style: 0
136
- computed-property-spacing: 0
137
- consistent-this: 0
138
- eol-last: 0
139
- func-names: 0
140
- func-style: 0
141
- id-length: 0
142
- id-match: 0
143
- indent: 0
144
- jsx-quotes: 0
145
- key-spacing: 0
146
- linebreak-style: 0
147
- lines-around-comment: 0
148
- max-depth: 0
149
- max-len: 0
150
- max-nested-callbacks: 0
151
- max-params: 0
152
- max-statements: [2, 30]
153
- new-cap: 0
154
- new-parens: 0
155
- newline-after-var: 0
156
- no-array-constructor: 0
157
- no-bitwise: 0
158
- no-continue: 0
159
- no-inline-comments: 0
160
- no-lonely-if: 0
161
- no-mixed-spaces-and-tabs: 0
162
- no-multiple-empty-lines: 0
163
- no-negated-condition: 0
164
- no-nested-ternary: 0
165
- no-new-object: 0
166
- no-plusplus: 0
167
- no-restricted-syntax: 0
168
- no-spaced-func: 0
169
- no-ternary: 0
170
- no-trailing-spaces: 0
171
- no-underscore-dangle: 0
172
- no-unneeded-ternary: 0
173
- object-curly-spacing: 0
174
- one-var: 0
175
- operator-assignment: 0
176
- operator-linebreak: 0
177
- padded-blocks: 0
178
- quote-props: 0
179
- quotes: 0
180
- require-jsdoc: 0
181
- semi-spacing: 0
182
- semi: 0
183
- sort-vars: 0
184
- space-after-keywords: 0
185
- space-before-blocks: 0
186
- space-before-function-paren: 0
187
- space-before-keywords: 0
188
- space-in-parens: 0
189
- space-infix-ops: 0
190
- space-return-throw-case: 0
191
- space-unary-ops: 0
192
- spaced-comment: 0
193
- wrap-regex: 0
194
-
195
- # ECMAScript 6
196
- arrow-body-style: 0
197
- arrow-parens: 0
198
- arrow-spacing: 0
199
- constructor-super: 0
200
- generator-star-spacing: 0
201
- no-arrow-condition: 0
202
- no-class-assign: 0
203
- no-const-assign: 0
204
- no-dupe-class-members: 0
205
- no-this-before-super: 0
206
- no-var: 0
207
- object-shorthand: 0
208
- prefer-arrow-callback: 0
209
- prefer-const: 0
210
- prefer-reflect: 0
211
- prefer-spread: 0
212
- prefer-template: 0
213
- require-yield: 0