cron_format 0.1.3 → 0.1.4

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: 68d7f091de5a9dd5f4c75422b84c041db74258c9
4
- data.tar.gz: 071ecfa7aad169c864ce1a67ffd5424c0227b302
3
+ metadata.gz: 47e5952b9ef920469d767a089f3af901d6b5b3ad
4
+ data.tar.gz: c12c1ba5dfd9bd3fed86cc26e59d9088d7f63fa9
5
5
  SHA512:
6
- metadata.gz: 0062418d22527232e7d93a9a3294963d8c42924f0bb81139754a12f82e07bbb590e0402735145478eb4377a29c2ee95cc36855f31c91ffdc5c7e77ef0eaa2f6b
7
- data.tar.gz: 7c3306a11ba674ac0b5017f79874b8dd08f51b0cb3dba4523aa8aa29fab62fea6de4961c3de74980c1fa5ae1e0dfa2dab829e022b2b29bbbbe30078ae2e37247
6
+ metadata.gz: 916622d268199db523a9ae13be88b37add6cf37aad76eea42bcf9e96f659c206d51d558f68b3b4ee7f463ddb4b3e35c9e0b24082a43aa6229283c54e51ac07c6
7
+ data.tar.gz: 11e7167177c7a28041418f1b0aa41ea9bad9e95ebcd2a836723a327a37a76cb51c68fddabdbf2605120ca529dcf0d1cf8d72adccd83e85f03a02745d12d30014
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/lib/cron_format.rb CHANGED
@@ -24,7 +24,7 @@ end
24
24
 
25
25
  class CronFormat
26
26
 
27
- attr_reader :to_time
27
+ attr_reader :to_time, :to_expression
28
28
 
29
29
  def initialize(cron_string, now=Time.now)
30
30
  @cron_string, @to_time = cron_string, now
@@ -122,6 +122,8 @@ class CronFormat
122
122
  a.index a.grep(/#{x}/i).first
123
123
  end
124
124
 
125
+ @to_expression = (raw_a[0..3] + [raw_units[4]])[0..4].join ' '
126
+
125
127
  raw_date = raw_units.map.with_index {|x,i| dt[i].call(x) }
126
128
 
127
129
  # 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.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
@@ -1 +1 @@
1
- ��@�#vN%�ng�3�In���\<4���MTFL�Ԟ�o��5i��['�
1
+ ��*L`e/؎�Xp�K��ufU���BNL� B+�F�����I��җߓk�����e0� ��1O�7��ɺ��;�g����\�ޕ���3�4(�^y t� ���bw9���0U��$��m��ki �t9��X���<�v��:����,�M2h�TU� 83/����T��n|m�ؠ��{��C��ة��\�%Q-��`E$5V�,xn�H���*�!�q�\�ł������N=j�N�l�d2˓]P2 �rR��Dx�