cron_format 0.1.8 → 0.1.9

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: bc5b124e93e76533580f0693d394e7c14c42b63d
4
- data.tar.gz: c86bf9db1516e6a0136d171a849d590fbe5654fa
3
+ metadata.gz: b7810898a3db749f670d595261bbe5ddede6e566
4
+ data.tar.gz: 0a7e77ee3771fe3e3c91382b79023874d8f487c9
5
5
  SHA512:
6
- metadata.gz: 9d961fcb2c332f4196bb865bf993008eb2f49ad4af902e5b5b970fafedfe1ee35ce1081b165fa9c913bc825bb794f5117427d95f44c2106f615247ceeceb2ee6
7
- data.tar.gz: 4fd8d28ba6ea17a6a625f76f634891f0062011c37fda5aec18e15532866bda9442f579341d39670197ab436bf7f4ef574c99b3e029fee7e2bfa75d6e4a0a0a17
6
+ metadata.gz: 1bf8f2ae8236d6f4f41f0f7c5d22709f5d7c6caa39372a295fb98ed5015c6099236ccb7345d2f804d77b7092df940b2440da4cb26537ad47d781bdc9d0127602
7
+ data.tar.gz: 656b637d30f8427909e37494ff249385c6b390a0037fa2f4580fcac061ab298a1c1a5d2df53e829ea1256030893e84684a21f46e0f5f295fbea2c27c6b4d8844
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/lib/cron_format.rb CHANGED
@@ -116,16 +116,18 @@ class CronFormat
116
116
  repeaters << v2
117
117
  end
118
118
 
119
- if raw_units[4] then
119
+ if raw_a[4] != '*' then
120
120
  r = /(sun|mon|tues|wed|thurs|fri|satur|sun)(day)?|tue|thu|sat/i
121
121
 
122
- raw_units[4].gsub!(r) do |x|
122
+ to_i = lambda {|x|
123
123
  a = Date::DAYNAMES
124
124
  a.index a.grep(/#{x}/i).first
125
- end
125
+ }
126
+ raw_a[4].gsub!(r,&to_i)
127
+ raw_units[4].gsub!(r,&to_i)
126
128
  end
127
129
 
128
- @to_expression = (raw_a[0..3] + [raw_units[4]])[0..4].join ' '
130
+ @to_expression = raw_a[0..4].join ' '
129
131
  raw_date = raw_units.map.with_index {|x,i| dt[i].call(x) }
130
132
 
131
133
  # expand the repeater
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.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
@@ -1,2 +1,4 @@
1
- -�A
2
- ��3�o�Њ.D������I�Ue�)Y���J���B\U�����N��y���qk\�hο�F`��o���L��&嗢:�0��[��=��:��^�Q]b�i7k�2�CW���-�] hA5!�
1
+ fq3 �Dnmյ����b��<��������S�g���rk�l�c��$,�7�,�|F�f:�uT+~��s�����)sy���
2
+ @
3
+ �\<�/vT��ѭ�&�Ĺ��r��4U��/0���J�u�C�w�^����֓ݒ9�|��G���(G}6�5�Di�~#�$&��#k,�y/�C顱�V�_h�p�m�Z1r,����)�:���d��^&RGWL�y���8���I��7��
4
+ �X\