cron_format 0.2.1 → 0.2.2

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: 3c5c6f011a03923600318a6a64ea5b641cd0355d
4
- data.tar.gz: 6e83610d7fc452f921a90009da3c75192669b36f
3
+ metadata.gz: 47a80956841d023ea969e20e89163a9e11359aa5
4
+ data.tar.gz: 893663001b06932fa8dbd4798e9c0bc32974eb13
5
5
  SHA512:
6
- metadata.gz: 63b4f3dd0d85709480e0ff391f7589ddc3484f470f7faf7439955aab4a444e12cb6b076d4a74d438635f9b07b7b03a91e69d161600112ab633ef17b12f930d5c
7
- data.tar.gz: 03cbe6fa7d0327236bb37d774fcc6ddd008943f87127dd4716747e7f86ebd379d5520209587c8d294fe380fb002cbd4fca3343169276a6b70848280cb222b5e1
6
+ metadata.gz: 5fc6a80831bf9524eeb90e9fd56320beeb0ffef08654654c7297bdf2da95132cfce944ef46593019e469fdb074e6b2a51ddc7c1e97012b27d2f9b56dee8481d7
7
+ data.tar.gz: 8308d27f4f3dda4448cae05ea144b03b7802e3f4c417721b411936e33b47fd85a30f3ae392f027f609fe945d36298c9bfddcffc64a5d9ee6a5a16b71e2d37fb6
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/lib/cron_format.rb CHANGED
@@ -233,6 +233,7 @@ class CronFormat
233
233
  if t < @to_time then
234
234
 
235
235
  if t.month < @to_time.month and raw_a[4] == '*' then
236
+
236
237
  # increment the year
237
238
  d[4].succ!
238
239
  t = Time.parse(TF % d.reverse)
@@ -243,6 +244,7 @@ class CronFormat
243
244
  t = Time.parse(TF % d.reverse)
244
245
  end
245
246
  elsif t.day < @to_time.day and raw_a[3] == '*' then
247
+
246
248
  t = increment_month d
247
249
  elsif (t.hour < @to_time.hour or (t.hour == @to_time.hour \
248
250
  and t.min < @to_time.min and raw_a[1] != '*') ) \
@@ -254,11 +256,15 @@ class CronFormat
254
256
 
255
257
  # increment the hour
256
258
  t += HOUR * ((@to_time.hour - d[1].to_i) + 1)
257
- elsif raw_a[0] == '*' then
259
+ elsif raw_a[0][0] == '*' then
260
+
261
+ i = 0
262
+
258
263
  # increment the minute
259
264
  t += MINUTE * ((@to_time.min - d[0].to_i) + 1)
260
265
  t = procs.values[i].call(t, repeaters[i].to_i) if repeaters[i]
261
266
  elsif raw_a[3] == '*' then
267
+
262
268
  t = increment_month d
263
269
  end
264
270
 
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.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -31,7 +31,7 @@ cert_chain:
31
31
  MmJuAQVfTk9wZd03YN619a64hLGIvud4ASW7UVAW0B4U0PcmbhHvne07e11jt7j5
32
32
  WwVcDIvT38Bo3hAt
33
33
  -----END CERTIFICATE-----
34
- date: 2015-01-16 00:00:00.000000000 Z
34
+ date: 2015-03-02 00:00:00.000000000 Z
35
35
  dependencies: []
36
36
  description:
37
37
  email: james@r0bertson.co.uk
metadata.gz.sig CHANGED
Binary file