sidekiq_simple_delay 0.2.0 → 0.2.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ec1fe6b079ffe00f678759842aabf1c0b541e963559ef96ffebd2a2ed320c8f1
4
- data.tar.gz: a1539286fa1b0a82e25596d9a69741c601f5392c2a3372e811486f5adcd3af45
3
+ metadata.gz: e6be71bbdab6103dee2e9387e77b330344aba58b5fad7cf49de0b2ab480bef99
4
+ data.tar.gz: c1ad47d9e7542374b0301f60038c4f0728dd7ba20a8ae277ee20c173968b6afa
5
5
  SHA512:
6
- metadata.gz: 6dd22a43966e73eb3adfdc5b9d3cd91158fa705f587368603a4edae954aedf713d619d32a03f1102002ae1f593eca25fba178d3984a0208e49b6973a7636ebc3
7
- data.tar.gz: 024d186c564d19b6298bedddc0e5b0c2dd73ec7925c9c02a2fe04d706785354fab9162153284c8b14670329827ccf637a743d33b50b4fc375d1d009db9204a53
6
+ metadata.gz: 7c1d78168276ff3da0817697ec1fa18a8d4c1c9f22fdd64cda1fa29e257f2c251dd91f9b359be5eb82c753e6cd22015a6537bdbf4c2b9f13eba5ed2f7f0f6e71
7
+ data.tar.gz: 5456e901e03b14fdb84c9244dcb15b9b51a152f6cd7b44682985bb0ca8cbd197c05f450281b69ce888ab250e03882b8d3e735eb01010ec78236126effc208655
data/.gitignore CHANGED
@@ -9,3 +9,4 @@
9
9
 
10
10
  # rspec failure tracking
11
11
  .rspec_status
12
+ /Gemfile.lock
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 0.2.1
2
+
3
+ * fix options handling for `simple_delay_spread`
4
+
1
5
  # 0.2.0
2
6
 
3
7
  * `simple_delay_spread`
@@ -46,12 +46,14 @@ module SidekiqSimpleDelay
46
46
  # @option options [Symbol] :spread_mod_method method to call to get the value to use
47
47
  # for determining mod offset
48
48
  def simple_sidekiq_delay_spread(options = {})
49
- spread_duration = Utils.extract_option(options, :spread_duration, 1.hour).to_f
50
- spread_in = Utils.extract_option(options, :spread_in, 0).to_f
51
- spread_at = Utils.extract_option(options, :spread_at)
52
- spread_method = Utils.extract_option(options, :spread_method, :rand)
53
- spread_mod_value = Utils.extract_option(options, :spread_mod_value)
54
- spread_mod_method = Utils.extract_option(options, :spread_mod_method)
49
+ local_opts = options.dup
50
+
51
+ spread_duration = Utils.extract_option(local_opts, :spread_duration, 1.hour).to_f
52
+ spread_in = Utils.extract_option(local_opts, :spread_in, 0).to_f
53
+ spread_at = Utils.extract_option(local_opts, :spread_at)
54
+ spread_method = Utils.extract_option(local_opts, :spread_method, :rand)
55
+ spread_mod_value = Utils.extract_option(local_opts, :spread_mod_value)
56
+ spread_mod_method = Utils.extract_option(local_opts, :spread_mod_method)
55
57
 
56
58
  spread_duration = 0 if spread_duration < 0
57
59
  spread_in = 0 if spread_in < 0
@@ -98,7 +100,7 @@ module SidekiqSimpleDelay
98
100
  Time.now.to_f + spread
99
101
  end
100
102
 
101
- Proxy.new(SimpleDelayedWorker, self, options.merge('at' => t))
103
+ Proxy.new(SimpleDelayedWorker, self, local_opts.merge('at' => t))
102
104
  end
103
105
 
104
106
  # Tell {DelayMethods} which delayed worker to use
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SidekiqSimpleDelay
4
- VERSION = '0.2.0'
4
+ VERSION = '0.2.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq_simple_delay
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Les Fletcher
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-12-07 00:00:00.000000000 Z
11
+ date: 2019-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sidekiq
@@ -220,7 +220,6 @@ files:
220
220
  - CHANGELOG.md
221
221
  - CODE_OF_CONDUCT.md
222
222
  - Gemfile
223
- - Gemfile.lock
224
223
  - LICENSE.txt
225
224
  - README.md
226
225
  - Rakefile
data/Gemfile.lock DELETED
@@ -1,145 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- sidekiq_simple_delay (0.2.0)
5
- sidekiq
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- actionmailer (5.2.1.1)
11
- actionpack (= 5.2.1.1)
12
- actionview (= 5.2.1.1)
13
- activejob (= 5.2.1.1)
14
- mail (~> 2.5, >= 2.5.4)
15
- rails-dom-testing (~> 2.0)
16
- actionpack (5.2.1.1)
17
- actionview (= 5.2.1.1)
18
- activesupport (= 5.2.1.1)
19
- rack (~> 2.0)
20
- rack-test (>= 0.6.3)
21
- rails-dom-testing (~> 2.0)
22
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
23
- actionview (5.2.1.1)
24
- activesupport (= 5.2.1.1)
25
- builder (~> 3.1)
26
- erubi (~> 1.4)
27
- rails-dom-testing (~> 2.0)
28
- rails-html-sanitizer (~> 1.0, >= 1.0.3)
29
- activejob (5.2.1.1)
30
- activesupport (= 5.2.1.1)
31
- globalid (>= 0.3.6)
32
- activemodel (5.2.1.1)
33
- activesupport (= 5.2.1.1)
34
- activerecord (5.2.1.1)
35
- activemodel (= 5.2.1.1)
36
- activesupport (= 5.2.1.1)
37
- arel (>= 9.0)
38
- activesupport (5.2.1.1)
39
- concurrent-ruby (~> 1.0, >= 1.0.2)
40
- i18n (>= 0.7, < 2)
41
- minitest (~> 5.1)
42
- tzinfo (~> 1.1)
43
- arel (9.0.0)
44
- ast (2.4.0)
45
- builder (3.2.3)
46
- bundler-audit (0.6.0)
47
- bundler (~> 1.2)
48
- thor (~> 0.18)
49
- concurrent-ruby (1.1.3)
50
- connection_pool (2.2.2)
51
- crass (1.0.4)
52
- database_cleaner (1.7.0)
53
- diff-lcs (1.3)
54
- erubi (1.7.1)
55
- fakeredis (0.7.0)
56
- redis (>= 3.2, < 5.0)
57
- globalid (0.4.1)
58
- activesupport (>= 4.2.0)
59
- i18n (1.1.1)
60
- concurrent-ruby (~> 1.0)
61
- jaro_winkler (1.5.1)
62
- loofah (2.2.3)
63
- crass (~> 1.0.2)
64
- nokogiri (>= 1.5.9)
65
- mail (2.7.1)
66
- mini_mime (>= 0.1.1)
67
- mini_mime (1.0.1)
68
- mini_portile2 (2.3.0)
69
- minitest (5.11.3)
70
- nokogiri (1.8.5)
71
- mini_portile2 (~> 2.3.0)
72
- parallel (1.12.1)
73
- parser (2.5.3.0)
74
- ast (~> 2.4.0)
75
- powerpack (0.1.2)
76
- rack (2.0.6)
77
- rack-protection (2.0.4)
78
- rack
79
- rack-test (1.1.0)
80
- rack (>= 1.0, < 3)
81
- rails-dom-testing (2.0.3)
82
- activesupport (>= 4.2.0)
83
- nokogiri (>= 1.6)
84
- rails-html-sanitizer (1.0.4)
85
- loofah (~> 2.2, >= 2.2.2)
86
- rainbow (3.0.0)
87
- rake (10.5.0)
88
- redis (4.0.3)
89
- rspec (3.8.0)
90
- rspec-core (~> 3.8.0)
91
- rspec-expectations (~> 3.8.0)
92
- rspec-mocks (~> 3.8.0)
93
- rspec-core (3.8.0)
94
- rspec-support (~> 3.8.0)
95
- rspec-expectations (3.8.2)
96
- diff-lcs (>= 1.2.0, < 2.0)
97
- rspec-support (~> 3.8.0)
98
- rspec-mocks (3.8.0)
99
- diff-lcs (>= 1.2.0, < 2.0)
100
- rspec-support (~> 3.8.0)
101
- rspec-support (3.8.0)
102
- rspec_junit_formatter (0.4.1)
103
- rspec-core (>= 2, < 4, != 2.12.0)
104
- rubocop (0.60.0)
105
- jaro_winkler (~> 1.5.1)
106
- parallel (~> 1.10)
107
- parser (>= 2.5, != 2.5.1.1)
108
- powerpack (~> 0.1)
109
- rainbow (>= 2.2.2, < 4.0)
110
- ruby-progressbar (~> 1.7)
111
- unicode-display_width (~> 1.4.0)
112
- ruby-progressbar (1.10.0)
113
- sidekiq (5.2.3)
114
- connection_pool (~> 2.2, >= 2.2.2)
115
- rack-protection (>= 1.5.0)
116
- redis (>= 3.3.5, < 5)
117
- sqlite3 (1.3.13)
118
- thor (0.20.3)
119
- thread_safe (0.3.6)
120
- tzinfo (1.2.5)
121
- thread_safe (~> 0.1)
122
- unicode-display_width (1.4.0)
123
- yard (0.9.16)
124
-
125
- PLATFORMS
126
- ruby
127
-
128
- DEPENDENCIES
129
- actionmailer (> 3.0)
130
- activerecord (> 3.0)
131
- activesupport (> 3.0)
132
- bundler (~> 1.16)
133
- bundler-audit
134
- database_cleaner
135
- fakeredis
136
- rake (~> 10.0)
137
- rspec (~> 3.0)
138
- rspec_junit_formatter (~> 0.2)
139
- rubocop (= 0.60.0)
140
- sidekiq_simple_delay!
141
- sqlite3
142
- yard
143
-
144
- BUNDLED WITH
145
- 1.17.1