cronos 0.4.1 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 10e6f846b422682bd216f2e943326d80629d76d3bbfcbed0450df8be2cdb9e38
4
- data.tar.gz: 2b7b0f18357967bcfa562e8f9f7a7912bdfc9e1653043316bf0316c6aae78060
3
+ metadata.gz: 7b7d4c5d68b641d07b172cafc2f63c7a789bb1e54e53dd19c5ac577a2bd1a9f9
4
+ data.tar.gz: d2f3391d9133ea6cbde4c4a0e61ceae775ebf69dbd7fe28997c83a0c2888177b
5
5
  SHA512:
6
- metadata.gz: 3088cfae1d5a6ad8f92c7ae58ebd50cccbff394ff7fd69690c10270a09040aa406009a751713a6f799a8446941d57a140d08e8ede98aeae608ade0560faa94a3
7
- data.tar.gz: 2e008c2ff0ff24647d20b3e283d1b06d5453b6b91de985967a30cc80e1d568bf26c7354415a5f69dc685cfb4b1b9bc61236397cd87212a446cba62ff425a3e34
6
+ metadata.gz: 76f985fe6e9b0431e54e5437f6ea8fe14971dad147aec7fd0bec11bda12d4fdd7282a90b54c567aa62ee0fce098c93765a1299cd208dd6cf2f326bc28ff8353d
7
+ data.tar.gz: e4db5b26f822054a3e71e125f290f60957de866f582ac36db3357d9b1f75145d7df897aff3e3e447dee001c0d157f71fc66f70630b4c5086f06e0e0c65f7cd86
@@ -0,0 +1,3 @@
1
+ module Cronos
2
+ VERSION = '0.4.2'
3
+ end
data/lib/cronos.rb CHANGED
@@ -189,17 +189,6 @@ module Cronos
189
189
  self
190
190
  end
191
191
 
192
- def yearly
193
- @min ||= 0
194
- @hour ||= 0
195
- @day ||= 1
196
- @month ||= 1
197
- @dow = nil
198
- self
199
- end
200
- alias once_a_year yearly
201
- alias annually yearly
202
-
203
192
  def to_s
204
193
  "#{min || '*'} #{hour || '*'} #{day || '*'} #{month || '*'} #{dow || '*'}"
205
194
  end
data/spec/cronos_spec.rb CHANGED
@@ -259,25 +259,6 @@ describe Cronos::Interval do
259
259
  end
260
260
  end
261
261
 
262
- describe "yearly method" do
263
- it "should output interval to run on the 1st day of January at 00:00 by default" do
264
- expect(interval.yearly.to_s).to eq('0 0 1 1 *')
265
- end
266
-
267
- it "should override day of week if set" do
268
- interval.dow = 1
269
- expect(interval.yearly.to_s).to eq('0 0 1 1 *')
270
- end
271
-
272
- it "should preserve hour, minute, day and month if set" do
273
- interval.min = 10
274
- interval.hour = 11
275
- interval.day = 12
276
- interval.month = 3
277
- expect(interval.yearly.to_s).to eq('10 11 12 3 *')
278
- end
279
- end
280
-
281
262
  describe "every(x).minutes" do
282
263
  it "should output interval for list of minutes differing by arg value" do
283
264
  expect(interval.every(15).minutes.to_s).to eq('0,15,30,45 * * * *')
@@ -370,28 +351,6 @@ describe Cronos::Interval do
370
351
  end
371
352
  end
372
353
 
373
- describe "cron string parser" do
374
-
375
- it "should parse '* * * * *'" do
376
- value = '* * * * *'
377
- expect(parse(value)).to eq(value)
378
- end
379
-
380
- it "should parse '1 2 3 4 5'" do
381
- value = '1 2 3 4 5'
382
- expect(parse(value)).to eq(value)
383
- end
384
-
385
- # it "should parse ''" do
386
- # value = ''
387
- # parse(value).should == value
388
- # end
389
-
390
- def parse(cron)
391
- Cronos::Interval.new(cron).to_s
392
- end
393
- end
394
-
395
354
  def interval
396
355
  @interval ||= Cronos::Interval.new
397
356
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cronos
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Meehan
8
- autorequire: cronos
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2009-03-06 00:00:00.000000000 Z
11
+ date: 2022-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -24,15 +24,12 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '3.0'
27
- description: Tool for generating cron intervals using a natural syntax
27
+ description: A builder DSL for generating cron intervals using a human readable English
28
+ syntax
28
29
  email: adam.meehan@gmail.com
29
30
  executables: []
30
31
  extensions: []
31
- extra_rdoc_files:
32
- - README.rdoc
33
- - LICENSE
34
- - TODO
35
- - CHANGELOG
32
+ extra_rdoc_files: []
36
33
  files:
37
34
  - CHANGELOG
38
35
  - LICENSE
@@ -40,11 +37,14 @@ files:
40
37
  - Rakefile
41
38
  - TODO
42
39
  - lib/cronos.rb
40
+ - lib/cronos/version.rb
43
41
  - spec/cronos_spec.rb
44
42
  - spec/spec_helper.rb
45
43
  homepage: http://github.com/adzap/cronos
46
- licenses: []
47
- metadata: {}
44
+ licenses:
45
+ - MIT
46
+ metadata:
47
+ source_code_uri: https://github.com/adzap/cronos
48
48
  post_install_message:
49
49
  rdoc_options: []
50
50
  require_paths: