cron_format 0.1.5 → 0.1.6

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: 00cdac6c0c16010fe8b8beaff41e04da13698a88
4
- data.tar.gz: 50d3e91829a034151eab3af5864a3546734a8448
3
+ metadata.gz: de3cc9ed5ed63d9359be897391d958bfc464d37b
4
+ data.tar.gz: e6f81290f585c9bc9d76c6cda8b362aef80ff59c
5
5
  SHA512:
6
- metadata.gz: d36aac22367bceddcb3a561ef743bb5c9801eaa1fe5f043e0e4f5c39a9561430fe40386a7a0514131c7cb49e8b60f3579724b1e0591ace096ffd7048076f4ccc
7
- data.tar.gz: 95ea8b63308ba602dbf4722dab2e52a569245149e6d5f900ca1f3962da8cfeb573c4b4847e6c4ce40776d3bac417d5595be3a7e405123f2ca86864ab7f0a569d
6
+ metadata.gz: d177fd68a2ec824facffae65aff1dc73552dd658e750aba7ede0fcc90e25e8276b190bfbdb754ac235bc44c51501c45a1ffceaeb4ae978901b8f0affef7d5dc2
7
+ data.tar.gz: cef7b17e92ea8dce62d337916bf51fc5b8f6cdbeffb38f008a062f8d9c48b1e1e653ba78bff63568e0d3c9b5182b51edd10aca42cdc681c7a5363be245784fc9
checksums.yaml.gz.sig CHANGED
@@ -1,4 +1,3 @@
1
- :��'z��>��BD�+�K,8K��8��Vq1u�
2
- X�ff��h��ۤKOp��������UTB|�ggjs���o��O�J[�ғf':��G����(,�z��Rw3��m���G��%��V�*�q*���[������ѳ��F'��
3
-
4
- !�@q�0[��[d�zGa��3l��V ������&%~��x��'��DbX�o�NpK��kC`���-g�q6�@
1
+ 58)���7ˉ�Dx����s
2
+ �� ��ZGbzQxL��"����ݞ�+0A0Eim��{�����uAWq�b �9k~�˷c!� ��&&���~���*�#m�k�y��~�bwZÎh 4֥޿����k��CSg�r/����^�<}������b�[������
3
+ U:�7T$?��J
data.tar.gz.sig CHANGED
Binary file
data/lib/cron_format.rb CHANGED
@@ -118,7 +118,7 @@ class CronFormat
118
118
 
119
119
  r = /(sun|mon|tues|wed|thurs|fri|satur|sun)(day)?|tue|thu|sat/i
120
120
  raw_units[4].gsub!(r) do |x|
121
- a = %w(sunday monday tuesday wednesday thursday friday saturday)
121
+ a = Date::DAYNAMES
122
122
  a.index a.grep(/#{x}/i).first
123
123
  end
124
124
 
@@ -230,8 +230,10 @@ class CronFormat
230
230
  end
231
231
 
232
232
  def day_valid?(date)
233
+
233
234
  year, month, day = date
234
- last_day = DateTime.parse("%s-%s-%s" % [year, month.succ, 1]) - 1
235
+ last_day = DateTime.parse("%s-%s-%s" % [year,
236
+ (month.to_i < 12 ? month.succ : 1), 1]) - 1
235
237
  day.to_i <= last_day.day
236
238
  end
237
239
 
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.5
4
+ version: 0.1.6
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-07-27 00:00:00.000000000 Z
34
+ date: 2013-08-03 00:00:00.000000000 Z
35
35
  dependencies: []
36
36
  description:
37
37
  email: james@r0bertson.co.uk
metadata.gz.sig CHANGED
Binary file