sidekiq-dejavu 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 90086538bf6bc73e5b5a0b27034c72189c1f2221
4
- data.tar.gz: 1a58258aef38bbf3f912cb74132c0620a337c1dd
2
+ SHA256:
3
+ metadata.gz: a280b94512a2f87340bc0edba893acd85f65be529a212533f6dc1360bce4f9c6
4
+ data.tar.gz: f36fdd3b2aa433d0cb2f82792d2e9244ecd0957d9712657e76a114f6a2d0fa61
5
5
  SHA512:
6
- metadata.gz: 98f4470432dfa3579a25f9ce56eb19ae56a10155c31dfc02de1d0eca73ea33950f77502f07f68aa890e280e42e5e6a8b8ddc3dca7b7bfa60b7a1b0d900203018
7
- data.tar.gz: 75357647e815519951176b27b8ef9d1bfa58e546ce7a358f7eb6097c508c2333ec5d567c2b62a377517f655f2fda02a8803513fe880f7e98fe1c5b9ac8ca1ba4
6
+ metadata.gz: 3dfb6dda6f70a068d4ecc8691457d1e6e8c932f9f2729780b19522d01bdc24fa4b4be0dd8dfd4b56d9597928bf4c523057fc11f95a5baa0026e2550a808e5708
7
+ data.tar.gz: df169033e309eb1807b002171d5bb2802ee43d9085953546dcaad3338210d519782086011715aa3f13012fb75634b0a0253784d7456cf2d2591b57985a64423c
data/.travis.yml CHANGED
@@ -4,16 +4,28 @@ cache: bundler
4
4
  services:
5
5
  - redis-server
6
6
  rvm:
7
- - 2.1
8
7
  - 2.0.0
9
- - 2.2
10
- - jruby
11
- - jruby-head
12
- - rbx-2
8
+ - 2.1.10
9
+ - 2.2.7
10
+ - 2.3.4
11
+ - 2.4.1
12
+ - jruby-1.7.26
13
+ - jruby-9.1.9.0
13
14
  env:
14
15
  - SIDEKIQ='~> 3.5'
15
16
  - SIDEKIQ='~> 4.0'
17
+ - SIDEKIQ='~> 5.0'
16
18
  matrix:
17
- allow_failures:
18
- - rvm: rbx-2
19
- - rvm: jruby-head
19
+ exclude:
20
+ - rvm: 2.0.0
21
+ env: SIDEKIQ='~> 5.0'
22
+ - rvm: 2.1.10
23
+ env: SIDEKIQ='~> 5.0'
24
+ - rvm: jruby-1.7.26
25
+ env: SIDEKIQ='~> 4.0'
26
+ - rvm: jruby-1.7.26
27
+ env: SIDEKIQ='~> 5.0'
28
+ - rvm: jruby-9.1.9.0
29
+ env: SIDEKIQ='~> 3.5'
30
+ - rvm: jruby-9.1.9.0
31
+ env: SIDEKIQ='~> 4.0'
@@ -6,7 +6,7 @@ module Sidekiq
6
6
  attr_accessor :schedules, :scheduled_set
7
7
 
8
8
  def initialize(schedules = {}, scheduled_set = Sidekiq::ScheduledSet.new)
9
- @schedules = schedules
9
+ @schedules = deep_transform_keys_to_strings(schedules)
10
10
  @scheduled_set = scheduled_set
11
11
  end
12
12
 
@@ -21,6 +21,14 @@ module Sidekiq
21
21
 
22
22
  private
23
23
 
24
+ def deep_transform_keys_to_strings(hash)
25
+ hash.each_with_object({}) do |(key, value), obj|
26
+ new_key = key.to_s
27
+ new_value = value.is_a?(Hash) ? deep_transform_keys_to_strings(value) : value
28
+ obj[new_key] = new_value
29
+ end
30
+ end
31
+
24
32
  def clear_changed_schedules
25
33
  scheduled_jobs.each do |job|
26
34
  item = job.item
@@ -1,5 +1,5 @@
1
1
  module Sidekiq
2
2
  module Dejavu
3
- VERSION = "0.0.4"
3
+ VERSION = "0.0.5"
4
4
  end
5
5
  end
@@ -7,7 +7,7 @@ Sidekiq.configure_server do |config|
7
7
  end
8
8
 
9
9
  config.on(:startup) do
10
- schedules = config.options[:schedule] || {}
10
+ schedules = (config.respond_to?(:[]) ? config[:schedule] : config.options[:schedule]) || {}
11
11
  Sidekiq.logger.debug "Sidekiq::Dejavu: schedules: #{schedules.inspect}"
12
12
  if schedules.empty?
13
13
  Sidekiq.logger.warn "Sidekiq::Dejavu: No schedule found."
@@ -18,8 +18,8 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_dependency "sidekiq", ">= 3", "< 6"
21
+ spec.add_dependency "sidekiq", ">= 3", "< 8"
22
22
  spec.add_dependency "parse-cron", "~> 0.1.4"
23
- spec.add_development_dependency "bundler", "~> 1.6"
23
+ spec.add_development_dependency "bundler"
24
24
  spec.add_development_dependency "rake"
25
25
  end
data/test/helper.rb CHANGED
@@ -28,7 +28,7 @@ Sidekiq::Testing.server_middleware do |chain|
28
28
  chain.add Sidekiq::Dejavu::Middleware::Server::Scheduler
29
29
  end
30
30
 
31
- class Sidekiq::Dejavu::Test < MiniTest::Test
31
+ class Sidekiq::Dejavu::Test < Minitest::Test
32
32
  attr_reader :log, :scheduled_set
33
33
 
34
34
  def setup
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq-dejavu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Buenemann
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-11 00:00:00.000000000 Z
11
+ date: 2024-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sidekiq
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '3'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '6'
22
+ version: '8'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: '3'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '6'
32
+ version: '8'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: parse-cron
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -48,16 +48,16 @@ dependencies:
48
48
  name: bundler
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
- - - "~>"
51
+ - - ">="
52
52
  - !ruby/object:Gem::Version
53
- version: '1.6'
53
+ version: '0'
54
54
  type: :development
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
- - - "~>"
58
+ - - ">="
59
59
  - !ruby/object:Gem::Version
60
- version: '1.6'
60
+ version: '0'
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: rake
63
63
  requirement: !ruby/object:Gem::Requirement
@@ -101,7 +101,7 @@ homepage: https://github.com/felixbuenemann/sidekiq-dejavu
101
101
  licenses:
102
102
  - MIT
103
103
  metadata: {}
104
- post_install_message:
104
+ post_install_message:
105
105
  rdoc_options: []
106
106
  require_paths:
107
107
  - lib
@@ -116,9 +116,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
116
116
  - !ruby/object:Gem::Version
117
117
  version: '0'
118
118
  requirements: []
119
- rubyforge_project:
120
- rubygems_version: 2.6.12
121
- signing_key:
119
+ rubygems_version: 3.1.6
120
+ signing_key:
122
121
  specification_version: 4
123
122
  summary: Dejavu is a clockless scheduler that uses Sidekiq's built-in scheduling
124
123
  test_files: