cron_format 0.1.9 → 0.1.10

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
2
  SHA1:
3
- metadata.gz: b7810898a3db749f670d595261bbe5ddede6e566
4
- data.tar.gz: 0a7e77ee3771fe3e3c91382b79023874d8f487c9
3
+ metadata.gz: 746860116968e2c98fa0cc2e36b24a346d5b8166
4
+ data.tar.gz: 0ea73bfb9491cf04193a1f7df903d51768158365
5
5
  SHA512:
6
- metadata.gz: 1bf8f2ae8236d6f4f41f0f7c5d22709f5d7c6caa39372a295fb98ed5015c6099236ccb7345d2f804d77b7092df940b2440da4cb26537ad47d781bdc9d0127602
7
- data.tar.gz: 656b637d30f8427909e37494ff249385c6b390a0037fa2f4580fcac061ab298a1c1a5d2df53e829ea1256030893e84684a21f46e0f5f295fbea2c27c6b4d8844
6
+ metadata.gz: 5a2ca8cc5de6f74a3a64470e5ba73a3596e060b6888268eea96eb98bf1b4adca311c6fc35f22cc59d212e7ccea9954069d956625a724c755381c413382f3415e
7
+ data.tar.gz: 33726d9f095dfd9b5f7bc303dc10a5287a7955ebb911b5d5a934562ad2add0d48e9eafdab1c2779bd57a32b813165bd2cb96d8bf02e5fff0d887ca9befa91e71
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/lib/cron_format.rb CHANGED
@@ -161,14 +161,17 @@ class CronFormat
161
161
 
162
162
  # if there is a defined weekday, increment a day at
163
163
  # a time to match that weekday
164
- #jr050813 if t < @to_time and wday and wday != t.wday then
165
164
  if wday and wday != t.wday then
166
165
 
167
- d[2], d[3] = @to_time.to_a.values_at(3,4).map(&:to_s)
166
+ t = Time.parse(TF % d.reverse)
167
+
168
+ if repeaters[4] then
169
+ t += (7 + repeaters[4].to_i) * DAY while t < @to_time
170
+ else
171
+ d[2], d[3] = @to_time.to_a.values_at(3,4).map(&:to_s)
172
+ t += DAY until t.wday == wday.to_i
173
+ end
168
174
 
169
- t = Time.parse(TF % d.reverse)
170
- t += DAY until t.wday == wday.to_i
171
- t += (7 + repeaters[4].to_i) * DAY if t < @to_time and repeaters[4]
172
175
  end
173
176
 
174
177
  # increment the month, day, hour, and minute for
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cron_format
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -31,7 +31,7 @@ cert_chain:
31
31
  9DFxFCS6sgAw21S+V+ym9ft8kbqgy7zOGdPRRNlwgb/V+UWqH4yaCtk7yJT+n8vm
32
32
  LHkRlhnm0ScZYw==
33
33
  -----END CERTIFICATE-----
34
- date: 2013-08-05 00:00:00.000000000 Z
34
+ date: 2013-08-06 00:00:00.000000000 Z
35
35
  dependencies: []
36
36
  description:
37
37
  email: james@r0bertson.co.uk
metadata.gz.sig CHANGED
Binary file