resque-scheduler 4.2.1 → 4.5.0

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

Potentially problematic release.


This version of resque-scheduler might be problematic. Click here for more details.

Files changed (60) hide show
  1. checksums.yaml +5 -5
  2. data/.github/dependabot.yml +12 -0
  3. data/.github/workflows/rubocop.yml +27 -0
  4. data/.github/workflows/ruby.yml +48 -0
  5. data/AUTHORS.md +7 -0
  6. data/CHANGELOG.md +495 -0
  7. data/CODE_OF_CONDUCT.md +74 -0
  8. data/Gemfile +8 -0
  9. data/README.md +37 -17
  10. data/Rakefile +1 -5
  11. data/{bin → exe}/resque-scheduler +0 -0
  12. data/lib/resque/scheduler/cli.rb +1 -0
  13. data/lib/resque/scheduler/delaying_extensions.rb +38 -6
  14. data/lib/resque/scheduler/env.rb +8 -4
  15. data/lib/resque/scheduler/lock/resilient.rb +19 -12
  16. data/lib/resque/scheduler/locking.rb +2 -2
  17. data/lib/resque/scheduler/scheduling_extensions.rb +4 -3
  18. data/lib/resque/scheduler/server/views/delayed.erb +1 -1
  19. data/lib/resque/scheduler/server/views/search_form.erb +1 -1
  20. data/lib/resque/scheduler/server.rb +1 -1
  21. data/lib/resque/scheduler/version.rb +1 -1
  22. data/lib/resque/scheduler.rb +39 -16
  23. data/resque-scheduler.gemspec +29 -10
  24. metadata +62 -66
  25. data/.gitignore +0 -17
  26. data/.rubocop.yml +0 -18
  27. data/.rubocop_todo.yml +0 -71
  28. data/.simplecov +0 -3
  29. data/.travis.yml +0 -26
  30. data/.vagrant-provision-as-vagrant.sh +0 -15
  31. data/.vagrant-provision.sh +0 -23
  32. data/.vagrant-skel/bash_profile +0 -7
  33. data/.vagrant-skel/bashrc +0 -7
  34. data/HISTORY.md +0 -303
  35. data/Vagrantfile +0 -14
  36. data/examples/Rakefile +0 -2
  37. data/examples/config/initializers/resque-web.rb +0 -37
  38. data/examples/dynamic-scheduling/README.md +0 -28
  39. data/examples/dynamic-scheduling/app/jobs/fix_schedules_job.rb +0 -52
  40. data/examples/dynamic-scheduling/app/jobs/send_email_job.rb +0 -9
  41. data/examples/dynamic-scheduling/app/models/user.rb +0 -16
  42. data/examples/dynamic-scheduling/config/resque.yml +0 -4
  43. data/examples/dynamic-scheduling/config/static_schedule.yml +0 -7
  44. data/examples/dynamic-scheduling/lib/tasks/resque.rake +0 -48
  45. data/examples/run-resque-web +0 -3
  46. data/script/migrate_to_timestamps_set.rb +0 -16
  47. data/tasks/resque_scheduler.rake +0 -2
  48. data/test/cli_test.rb +0 -231
  49. data/test/delayed_queue_test.rb +0 -925
  50. data/test/env_test.rb +0 -47
  51. data/test/multi_process_test.rb +0 -125
  52. data/test/resque-web_test.rb +0 -364
  53. data/test/scheduler_args_test.rb +0 -222
  54. data/test/scheduler_hooks_test.rb +0 -55
  55. data/test/scheduler_locking_test.rb +0 -316
  56. data/test/scheduler_setup_test.rb +0 -141
  57. data/test/scheduler_task_test.rb +0 -72
  58. data/test/scheduler_test.rb +0 -473
  59. data/test/test_helper.rb +0 -147
  60. data/test/util_test.rb +0 -17
@@ -6,21 +6,37 @@ require 'resque/scheduler/version'
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = 'resque-scheduler'
8
8
  spec.version = Resque::Scheduler::VERSION
9
- spec.authors = ['Ben VandenBos']
10
- spec.email = ['bvandenbos@gmail.com']
11
- spec.homepage = 'http://github.com/resque/resque-scheduler'
9
+ spec.authors = <<-EOF.split(/\n/).map(&:strip)
10
+ Ben VandenBos
11
+ Simon Eskildsen
12
+ Ryan Biesemeyer
13
+ Dan Buch
14
+ Michael Bianco
15
+ EOF
16
+ spec.email = %w(
17
+ bvandenbos@gmail.com
18
+ sirup@sirupsen.com
19
+ ryan@yaauie.com
20
+ dan@meatballhat.com
21
+ mike@mikebian.co
22
+ )
12
23
  spec.summary = 'Light weight job scheduling on top of Resque'
13
24
  spec.description = <<-DESCRIPTION
14
25
  Light weight job scheduling on top of Resque.
15
26
  Adds methods enqueue_at/enqueue_in to schedule jobs in the future.
16
27
  Also supports queueing jobs on a fixed, cron-like schedule.
17
28
  DESCRIPTION
29
+ spec.homepage = 'http://github.com/resque/resque-scheduler'
18
30
  spec.license = 'MIT'
19
31
 
20
- spec.files = `git ls-files -z`.split("\0")
21
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
22
- spec.test_files = spec.files.grep(%r{^test/})
23
- spec.require_paths = ['lib']
32
+ spec.files = `git ls-files -z`.split("\0").reject do |f|
33
+ f.match(%r{^(test|spec|features|examples|bin|tasks)/}) ||
34
+ f.match(/^(Vagrantfile|Gemfile\.lock)/) ||
35
+ f.match(/^\.(rubocop|simplecov|travis|vagrant|gitignore)/)
36
+ end
37
+ spec.bindir = 'exe'
38
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
39
+ spec.require_paths = %w(lib)
24
40
 
25
41
  spec.add_development_dependency 'bundler'
26
42
  spec.add_development_dependency 'json'
@@ -33,13 +49,16 @@ Gem::Specification.new do |spec|
33
49
  spec.add_development_dependency 'simplecov'
34
50
  spec.add_development_dependency 'test-unit'
35
51
  spec.add_development_dependency 'yard'
52
+ spec.add_development_dependency 'tzinfo-data'
53
+ spec.add_development_dependency 'timecop'
36
54
 
37
55
  # We pin rubocop because new cops have a tendency to result in false-y
38
56
  # positives for new contributors, which is not a nice experience.
39
57
  spec.add_development_dependency 'rubocop', '~> 0.40.0'
40
58
 
41
59
  spec.add_runtime_dependency 'mono_logger', '~> 1.0'
42
- spec.add_runtime_dependency 'redis', '~> 3.3'
43
- spec.add_runtime_dependency 'resque', '~> 1.26'
44
- spec.add_runtime_dependency 'rufus-scheduler', '~> 3.2'
60
+ spec.add_runtime_dependency 'redis', '>= 3.3'
61
+ spec.add_runtime_dependency 'resque', '>= 1.27'
62
+ # rufus-scheduler v3.7 causes a failure in test/multi_process_test.rb
63
+ spec.add_runtime_dependency 'rufus-scheduler', '~> 3.2', '< 3.7'
45
64
  end
metadata CHANGED
@@ -1,14 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: resque-scheduler
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.1
4
+ version: 4.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben VandenBos
8
- autorequire:
9
- bindir: bin
8
+ - Simon Eskildsen
9
+ - Ryan Biesemeyer
10
+ - Dan Buch
11
+ - Michael Bianco
12
+ autorequire:
13
+ bindir: exe
10
14
  cert_chain: []
11
- date: 2016-06-08 00:00:00.000000000 Z
15
+ date: 2021-09-28 00:00:00.000000000 Z
12
16
  dependencies:
13
17
  - !ruby/object:Gem::Dependency
14
18
  name: bundler
@@ -164,6 +168,34 @@ dependencies:
164
168
  - - ">="
165
169
  - !ruby/object:Gem::Version
166
170
  version: '0'
171
+ - !ruby/object:Gem::Dependency
172
+ name: tzinfo-data
173
+ requirement: !ruby/object:Gem::Requirement
174
+ requirements:
175
+ - - ">="
176
+ - !ruby/object:Gem::Version
177
+ version: '0'
178
+ type: :development
179
+ prerelease: false
180
+ version_requirements: !ruby/object:Gem::Requirement
181
+ requirements:
182
+ - - ">="
183
+ - !ruby/object:Gem::Version
184
+ version: '0'
185
+ - !ruby/object:Gem::Dependency
186
+ name: timecop
187
+ requirement: !ruby/object:Gem::Requirement
188
+ requirements:
189
+ - - ">="
190
+ - !ruby/object:Gem::Version
191
+ version: '0'
192
+ type: :development
193
+ prerelease: false
194
+ version_requirements: !ruby/object:Gem::Requirement
195
+ requirements:
196
+ - - ">="
197
+ - !ruby/object:Gem::Version
198
+ version: '0'
167
199
  - !ruby/object:Gem::Dependency
168
200
  name: rubocop
169
201
  requirement: !ruby/object:Gem::Requirement
@@ -196,30 +228,30 @@ dependencies:
196
228
  name: redis
197
229
  requirement: !ruby/object:Gem::Requirement
198
230
  requirements:
199
- - - "~>"
231
+ - - ">="
200
232
  - !ruby/object:Gem::Version
201
233
  version: '3.3'
202
234
  type: :runtime
203
235
  prerelease: false
204
236
  version_requirements: !ruby/object:Gem::Requirement
205
237
  requirements:
206
- - - "~>"
238
+ - - ">="
207
239
  - !ruby/object:Gem::Version
208
240
  version: '3.3'
209
241
  - !ruby/object:Gem::Dependency
210
242
  name: resque
211
243
  requirement: !ruby/object:Gem::Requirement
212
244
  requirements:
213
- - - "~>"
245
+ - - ">="
214
246
  - !ruby/object:Gem::Version
215
- version: '1.26'
247
+ version: '1.27'
216
248
  type: :runtime
217
249
  prerelease: false
218
250
  version_requirements: !ruby/object:Gem::Requirement
219
251
  requirements:
220
- - - "~>"
252
+ - - ">="
221
253
  - !ruby/object:Gem::Version
222
- version: '1.26'
254
+ version: '1.27'
223
255
  - !ruby/object:Gem::Dependency
224
256
  name: rufus-scheduler
225
257
  requirement: !ruby/object:Gem::Requirement
@@ -227,6 +259,9 @@ dependencies:
227
259
  - - "~>"
228
260
  - !ruby/object:Gem::Version
229
261
  version: '3.2'
262
+ - - "<"
263
+ - !ruby/object:Gem::Version
264
+ version: '3.7'
230
265
  type: :runtime
231
266
  prerelease: false
232
267
  version_requirements: !ruby/object:Gem::Requirement
@@ -234,45 +269,36 @@ dependencies:
234
269
  - - "~>"
235
270
  - !ruby/object:Gem::Version
236
271
  version: '3.2'
272
+ - - "<"
273
+ - !ruby/object:Gem::Version
274
+ version: '3.7'
237
275
  description: |2
238
276
  Light weight job scheduling on top of Resque.
239
277
  Adds methods enqueue_at/enqueue_in to schedule jobs in the future.
240
278
  Also supports queueing jobs on a fixed, cron-like schedule.
241
279
  email:
242
280
  - bvandenbos@gmail.com
281
+ - sirup@sirupsen.com
282
+ - ryan@yaauie.com
283
+ - dan@meatballhat.com
284
+ - mike@mikebian.co
243
285
  executables:
244
286
  - resque-scheduler
245
287
  extensions: []
246
288
  extra_rdoc_files: []
247
289
  files:
248
- - ".gitignore"
249
- - ".rubocop.yml"
250
- - ".rubocop_todo.yml"
251
- - ".simplecov"
252
- - ".travis.yml"
253
- - ".vagrant-provision-as-vagrant.sh"
254
- - ".vagrant-provision.sh"
255
- - ".vagrant-skel/bash_profile"
256
- - ".vagrant-skel/bashrc"
290
+ - ".github/dependabot.yml"
291
+ - ".github/workflows/rubocop.yml"
292
+ - ".github/workflows/ruby.yml"
257
293
  - AUTHORS.md
294
+ - CHANGELOG.md
295
+ - CODE_OF_CONDUCT.md
258
296
  - CONTRIBUTING.md
259
297
  - Gemfile
260
- - HISTORY.md
261
298
  - LICENSE
262
299
  - README.md
263
300
  - Rakefile
264
- - Vagrantfile
265
- - bin/resque-scheduler
266
- - examples/Rakefile
267
- - examples/config/initializers/resque-web.rb
268
- - examples/dynamic-scheduling/README.md
269
- - examples/dynamic-scheduling/app/jobs/fix_schedules_job.rb
270
- - examples/dynamic-scheduling/app/jobs/send_email_job.rb
271
- - examples/dynamic-scheduling/app/models/user.rb
272
- - examples/dynamic-scheduling/config/resque.yml
273
- - examples/dynamic-scheduling/config/static_schedule.yml
274
- - examples/dynamic-scheduling/lib/tasks/resque.rake
275
- - examples/run-resque-web
301
+ - exe/resque-scheduler
276
302
  - lib/resque-scheduler.rb
277
303
  - lib/resque/scheduler.rb
278
304
  - lib/resque/scheduler/cli.rb
@@ -302,26 +328,11 @@ files:
302
328
  - lib/resque/scheduler/util.rb
303
329
  - lib/resque/scheduler/version.rb
304
330
  - resque-scheduler.gemspec
305
- - script/migrate_to_timestamps_set.rb
306
- - tasks/resque_scheduler.rake
307
- - test/cli_test.rb
308
- - test/delayed_queue_test.rb
309
- - test/env_test.rb
310
- - test/multi_process_test.rb
311
- - test/resque-web_test.rb
312
- - test/scheduler_args_test.rb
313
- - test/scheduler_hooks_test.rb
314
- - test/scheduler_locking_test.rb
315
- - test/scheduler_setup_test.rb
316
- - test/scheduler_task_test.rb
317
- - test/scheduler_test.rb
318
- - test/test_helper.rb
319
- - test/util_test.rb
320
331
  homepage: http://github.com/resque/resque-scheduler
321
332
  licenses:
322
333
  - MIT
323
334
  metadata: {}
324
- post_install_message:
335
+ post_install_message:
325
336
  rdoc_options: []
326
337
  require_paths:
327
338
  - lib
@@ -336,23 +347,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
336
347
  - !ruby/object:Gem::Version
337
348
  version: '0'
338
349
  requirements: []
339
- rubyforge_project:
340
- rubygems_version: 2.5.1
341
- signing_key:
350
+ rubygems_version: 3.1.6
351
+ signing_key:
342
352
  specification_version: 4
343
353
  summary: Light weight job scheduling on top of Resque
344
- test_files:
345
- - test/cli_test.rb
346
- - test/delayed_queue_test.rb
347
- - test/env_test.rb
348
- - test/multi_process_test.rb
349
- - test/resque-web_test.rb
350
- - test/scheduler_args_test.rb
351
- - test/scheduler_hooks_test.rb
352
- - test/scheduler_locking_test.rb
353
- - test/scheduler_setup_test.rb
354
- - test/scheduler_task_test.rb
355
- - test/scheduler_test.rb
356
- - test/test_helper.rb
357
- - test/util_test.rb
358
- has_rdoc:
354
+ test_files: []
data/.gitignore DELETED
@@ -1,17 +0,0 @@
1
- /.bundle/
2
- /.idea/
3
- /.yardoc/
4
-
5
- /doc/
6
- /pkg/
7
- nbproject
8
- /Gemfile.lock
9
- /.rvmrc
10
- *.swp
11
-
12
- /coverage/
13
- /.vagrant/
14
- /dump.rdb
15
-
16
- .env
17
- .env.*
data/.rubocop.yml DELETED
@@ -1,18 +0,0 @@
1
- inherit_from: .rubocop_todo.yml
2
-
3
- AllCops:
4
- Include:
5
- - Gemfile
6
- - '**/Rakefile'
7
- - resque-scheduler.gemspec
8
- - bin/resque-scheduler
9
-
10
- Documentation:
11
- Enabled: false
12
-
13
- Style/DoubleNegation:
14
- Enabled: false
15
- Metrics/PerceivedComplexity:
16
- Enabled: false
17
- Metrics/ClassLength:
18
- Max: 110
data/.rubocop_todo.yml DELETED
@@ -1,71 +0,0 @@
1
- # This configuration was generated by
2
- # `rubocop --auto-gen-config`
3
- # on 2016-05-27 14:45:04 -0400 using RuboCop version 0.40.0.
4
- # The point is for the user to remove these configuration records
5
- # one by one as the offenses are removed from the code base.
6
- # Note that changes in the inspected code, or installation of new
7
- # versions of RuboCop, may require this file to be generated again.
8
-
9
- # Offense count: 1
10
- # Configuration parameters: AllowSafeAssignment.
11
- Lint/AssignmentInCondition:
12
- Exclude:
13
- - 'lib/resque/scheduler/env.rb'
14
-
15
- # Offense count: 2
16
- Lint/UselessAccessModifier:
17
- Exclude:
18
- - 'lib/resque/scheduler.rb'
19
-
20
- # Offense count: 16
21
- Metrics/AbcSize:
22
- Max: 36
23
-
24
- # Offense count: 3
25
- Metrics/CyclomaticComplexity:
26
- Max: 12
27
-
28
- # Offense count: 6
29
- # Configuration parameters: AllowHeredoc, AllowURI, URISchemes.
30
- # URISchemes: http, https
31
- Metrics/LineLength:
32
- Max: 96
33
-
34
- # Offense count: 19
35
- # Configuration parameters: CountComments.
36
- Metrics/MethodLength:
37
- Max: 34
38
-
39
- # Offense count: 2
40
- # Configuration parameters: CountComments.
41
- Metrics/ModuleLength:
42
- Max: 314
43
-
44
- # Offense count: 1
45
- Style/CaseEquality:
46
- Exclude:
47
- - 'lib/resque/scheduler.rb'
48
-
49
- # Offense count: 1
50
- Style/EachWithObject:
51
- Exclude:
52
- - 'lib/resque/scheduler.rb'
53
-
54
- # Offense count: 3
55
- # Configuration parameters: ExpectMatchingDefinition, Regex, IgnoreExecutableScripts.
56
- Style/FileName:
57
- Exclude:
58
- - 'examples/config/initializers/resque-web.rb'
59
- - 'lib/resque-scheduler.rb'
60
- - 'test/resque-web_test.rb'
61
-
62
- # Offense count: 1
63
- # Configuration parameters: MinBodyLength.
64
- Style/GuardClause:
65
- Exclude:
66
- - 'lib/resque/scheduler/lock/basic.rb'
67
-
68
- # Offense count: 1
69
- Style/IfInsideElse:
70
- Exclude:
71
- - 'lib/resque/scheduler.rb'
data/.simplecov DELETED
@@ -1,3 +0,0 @@
1
- if ENV['COVERAGE'] && RUBY_PLATFORM !~ /java/
2
- SimpleCov.start { add_filter '/test/' }
3
- end
data/.travis.yml DELETED
@@ -1,26 +0,0 @@
1
- language: ruby
2
- sudo: false
3
- rvm:
4
- - 1.9.3
5
- - 2.3.1
6
- - jruby-9.1.1.0
7
- env:
8
- global:
9
- - COVERAGE=1
10
- - JRUBY_OPTS=''
11
- - RUBYOPT='-W0'
12
- matrix:
13
- allow_failures:
14
- - rvm: jruby-9.1.1.0
15
- services:
16
- - redis-server
17
- deploy:
18
- provider: rubygems
19
- api_key:
20
- secure: dM97lL/jTu14mEHD2Ih/vQfZ8cWJWb+DQ8UKZjkD2JfYtvwEAlkPG9RrrDkSHb5qkYxG2VAhjyx/0MZJ0TsVL6wrLMC9gcJb3yomw2Sch2Noj68tEndiSUHnxrB9gKzbhHbjLQXDqYf4Hco9/PHHQp4piFPJhLzNZRehIuTJPcA=
21
- gem: resque-scheduler
22
- on:
23
- tags: true
24
- repo: resque/resque-scheduler
25
- rvm: 2.3.1
26
- all_branches: true
@@ -1,15 +0,0 @@
1
- #!/bin/bash
2
-
3
- set -e
4
- set -x
5
-
6
- ln -svf /vagrant/.vagrant-skel/bashrc ~/.bashrc
7
- ln -svf /vagrant/.vagrant-skel/bash_profile ~/.bash_profile
8
-
9
- source ~/.bashrc
10
-
11
- set +x
12
- curl -L https://get.rvm.io | bash -s stable --ruby=2.0.0 --auto-dotfiles
13
-
14
- source ~/.rvm/scripts/rvm
15
- gem install --no-ri --no-rdoc bundler foreman
@@ -1,23 +0,0 @@
1
- #!/bin/bash
2
-
3
- export DEBIAN_FRONTEND=noninteractive
4
-
5
- umask 022
6
-
7
- set -e
8
- set -x
9
-
10
- apt-get update -yq
11
- apt-get install --no-install-suggests -yq python-software-properties
12
- add-apt-repository -y ppa:chris-lea/redis-server
13
- apt-get update -yq
14
- apt-get install --no-install-suggests -yq \
15
- build-essential \
16
- byobu \
17
- curl \
18
- git \
19
- make \
20
- redis-server \
21
- screen
22
-
23
- su - vagrant -c /vagrant/.vagrant-provision-as-vagrant.sh
@@ -1,7 +0,0 @@
1
- #!bash
2
-
3
- [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
4
-
5
- if [[ "$PS1" ]] ; then
6
- cd /vagrant
7
- fi
data/.vagrant-skel/bashrc DELETED
@@ -1,7 +0,0 @@
1
- #!bash
2
-
3
- export LANG='en_US.UTF-8'
4
- export LANGUAGE='en_US.UTF-8'
5
- export LC_ALL='en_US.UTF-8'
6
-
7
- export PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting