chronic_cron 0.3.7 → 0.4.0

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: 87c9ca865ed518099e452b2bdb060caec364df00
4
- data.tar.gz: 4138b72f8a680693fbb989a0978bb940165a5f12
3
+ metadata.gz: a5a5a3764414f761efcfacd6c25115ed3d713900
4
+ data.tar.gz: db0ccc85847ec1c1ed014693dae7b110fa1f4623
5
5
  SHA512:
6
- metadata.gz: 971534edf8e75f73379dfa927c936eca189f21aa9b43fcd928c3c5070532624abaa7318a8a7f5245d66f05ea0a2fd199419b1443a89b50aba8b77ad440eb85f0
7
- data.tar.gz: 2e56ad254692427c0856d7292314a253eda668a409f7e3c658b67c5349f4d7b38cd6776cee6b03944123f4637b23d61293aa31259293c8958cc134cdcbec7dbf
6
+ metadata.gz: 6466d447e34682edd54ccaf8eb0991e29c2ec350a4143467817d803451839f3081117749e62cc0a693fdf55c8e8df92c61c8e4658afcf38a5ab913f677c2bf06
7
+ data.tar.gz: 4936d51bd6e7e0d03a920821e28d8bfbb09f4f451376412323300f2c208a05fd515d5eb65de6f2be14da245a5997396223a829a6b1656846a4ee8b75c1471c89
@@ -1,2 +1,2 @@
1
- @�"aV�$��'>k��~�LG�0��@mC==י�]?{mʨ��f����1��I��+ys9Ry��'�5�v���o7ăk�e>+��$�>z�/vA)�2L�� R�*�_�#���x7!���FWz�l��1��p�����f@
2
- Z�A"�{�M�����y�3��a������n�����`�C޽����?&$&||A޶��D�`\���8���������U ��
1
+ 0d%J0O����a���_�E�0M���X5I$�^s��da
2
+ V
data.tar.gz.sig CHANGED
@@ -1,4 +1,3 @@
1
- �� *�Rb�@��i���"NY�@6�ڡƑ0Bu5nF�խZf«�2߱��Kx2n2+�
2
- �l�C�v�#UM�'ի��/�'3��؝�;��'���1� _
3
- �i@�y)�q6��AR9�ϵ�-�^��µ��ɾJd�
4
- ����F���&�J�+�hVC���gᾤ9r�*�
1
+ 4�eK�1R>�#7�������K7) ��֟��}�C"k;��~��%���r���g��(���"o��~6QWՆN�M�He��\ԉ�Rl������i�ma���\�݂c�5��a��Ա�6[���2�q�O���;5�^O;c�6��'�J�ް��1lv�3>W*�0��TMFX�?!��d~�w�gX(�^*L��(pD������~�W]
2
+
3
+ �� 0:�
@@ -21,10 +21,23 @@ class ChronicCron
21
21
  @params = {input: s}
22
22
  expressions(@params)
23
23
 
24
- expression = find_expression(s.downcase\
24
+ if s =~ /^tomorrow/i then
25
+
26
+ s.sub!(/^tomorrow /i,'')
27
+ expression = find_expression(s.downcase\
28
+ .sub(/^(?:is|on|at|from|starting)\s+/,''))
29
+ @cf = CronFormat.new(expression, now)
30
+ @cf.adjust_date @cf.to_time - (24 * 60 * 60)
31
+
32
+ else
33
+
34
+ expression = find_expression(s.downcase\
25
35
  .sub(/^(?:on|at|from|starting)\s+/,''))
26
- #puts 'expression : ' + expression.inspect
27
- @cf = CronFormat.new(expression, now)
36
+ @cf = CronFormat.new(expression, now)
37
+
38
+ end
39
+
40
+
28
41
  @to_expression = @cf.to_expression
29
42
 
30
43
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chronic_cron
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.7
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -31,7 +31,7 @@ cert_chain:
31
31
  q95F5t9M4vy0Q8baeY7AJ7+f6Z5LLLCK4MyPO2y4aYy209dwdEY2zHZOA+CLkPEU
32
32
  p0BvK7yY4ZqPZw==
33
33
  -----END CERTIFICATE-----
34
- date: 2017-11-14 00:00:00.000000000 Z
34
+ date: 2018-03-13 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: app-routes
@@ -62,7 +62,7 @@ dependencies:
62
62
  version: '0.3'
63
63
  - - ">="
64
64
  - !ruby/object:Gem::Version
65
- version: 0.3.4
65
+ version: 0.3.5
66
66
  type: :runtime
67
67
  prerelease: false
68
68
  version_requirements: !ruby/object:Gem::Requirement
@@ -72,7 +72,7 @@ dependencies:
72
72
  version: '0.3'
73
73
  - - ">="
74
74
  - !ruby/object:Gem::Version
75
- version: 0.3.4
75
+ version: 0.3.5
76
76
  - !ruby/object:Gem::Dependency
77
77
  name: chronic
78
78
  requirement: !ruby/object:Gem::Requirement
metadata.gz.sig CHANGED
Binary file