rrule 0.1.0 → 0.1.1

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: a6c2ba5195c291cf1e8ef2fb970f4e1405466e88
4
- data.tar.gz: 4f6e5cdf83c920ef0c1bb481726f30214948c876
3
+ metadata.gz: 38233f8772b83457ca170a1e6eaa20d8f8455c02
4
+ data.tar.gz: d0a65079756ddb7faf5f4615145ce7b99814c8b7
5
5
  SHA512:
6
- metadata.gz: ed30baabc688529bc1f4c5881dac96658e610d108d15ef0332aaf21aeae803d3368e7fc144e50af215f72e1b90ebb9f2727e8b7411e4b1c9deb5087a4229cf06
7
- data.tar.gz: 88402450d02bcc6e87acd4a628f277f66766671b45dab25ada7892c991a9e58b7d1de78c514421dc66f71c136123a203e78f89d4903ffa1b191fc0f83527ec47
6
+ metadata.gz: 57f3d09db8034288534d465af4af7011e3fa39418d36372fa44e834464c970eaaa29dacd7f649a98a3c39909ad5112516ed873f3dfacd8966b27eb8270442979
7
+ data.tar.gz: a79d86f15deb399905eeebb6a9d5274839614bc772580361f5cf4f43ccb11e1d1584f19fb86ad6e58d16cbae3c5f43c89ef57adba6126626a4701d177e28f15d
data/Rakefile CHANGED
@@ -10,21 +10,3 @@ namespace :spec do
10
10
  end
11
11
 
12
12
  task :default => 'spec:all'
13
- #
14
- # desc 'Builds the gem'
15
- # task :build do
16
- # sh "gem build rrule.gemspec"
17
- # end
18
- #
19
- # desc 'Builds and installs the gem'
20
- # task :install => :build do
21
- # sh "gem install rrule-#{RRule::VERSION}"
22
- # end
23
- #
24
- # desc 'Tags version, pushes to remote, and pushes gem'
25
- # task :release => :build do
26
- # sh "git tag v#{RRule::VERSION}"
27
- # sh "git push origin master"
28
- # sh "git push origin v#{RRule::VERSION}"
29
- # sh "gem push rrule-#{RRule::VERSION}.gem"
30
- # end
@@ -20,8 +20,8 @@ module RRule
20
20
  autoload :AllOccurrences, 'rrule/generators/all_occurrences'
21
21
  autoload :BySetPosition, 'rrule/generators/by_set_position'
22
22
 
23
- def self.parse(rrule, options)
24
- Rule.new(rrule, options)
23
+ def self.parse(rrule, **options)
24
+ Rule.new(rrule, **options)
25
25
  end
26
26
 
27
27
  MAX_YEAR = 9999
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'rrule'
3
- s.version = '0.1.0'
3
+ s.version = '0.1.1'
4
4
  s.date = '2016-06-06'
5
5
  s.summary = 'RRule expansion'
6
6
  s.description = 'A gem for expanding dates according to the RRule specification'
@@ -24,21 +24,21 @@ describe RRule::AllOccurrences do
24
24
  let(:dates) { [0] }
25
25
  let(:times) { [{ hour: 12, minute: 30, second: 15 }] }
26
26
 
27
- it { is_expected.to match_array [Time.new(1997, 1, 1, 12, 30, 15)] }
27
+ it { is_expected.to match_array [Time.parse('Wed Jan 1 12:30:15 PST 1997')] }
28
28
  end
29
29
 
30
30
  context 'with multiple dates and a single time' do
31
31
  let(:dates) { [0, 15] }
32
32
  let(:times) { [{ hour: 12, minute: 30, second: 15 }] }
33
33
 
34
- it { is_expected.to match_array [Time.new(1997, 1, 1, 12, 30, 15), Time.new(1997, 1, 16, 12, 30, 15)] }
34
+ it { is_expected.to match_array [Time.parse('Wed Jan 1 12:30:15 PST 1997'), Time.parse('Thu Jan 16 12:30:15 PST 1997')] }
35
35
  end
36
36
 
37
37
  context 'with a single date and multiple times' do
38
38
  let(:dates) { [0] }
39
39
  let(:times) { [{ hour: 12, minute: 30, second: 15 }, { hour: 18, minute: 45, second: 20 }] }
40
40
 
41
- it { is_expected.to match_array [Time.new(1997, 1, 1, 12, 30, 15), Time.new(1997, 1, 1, 18, 45, 20)] }
41
+ it { is_expected.to match_array [Time.parse('Wed Jan 1 12:30:15 PST 1997'), Time.parse('Wed Jan 1 18:45:20 PST 1997')] }
42
42
  end
43
43
  end
44
44
  end
@@ -25,7 +25,7 @@ describe RRule::BySetPosition do
25
25
  let(:dates) { [0, 1, 2, 3, 4] }
26
26
  let(:times) { [{ hour: 12, minute: 30, second: 15 }] }
27
27
 
28
- it { is_expected.to match_array [Time.new(1997, 1, 1, 12, 30, 15)] }
28
+ it { is_expected.to match_array [Time.parse('Wed Jan 1 12:30:15 PST 1997')] }
29
29
  end
30
30
 
31
31
  context 'with multiple set positions' do
@@ -33,7 +33,7 @@ describe RRule::BySetPosition do
33
33
  let(:dates) { [0, 1, 2, 3, 4] }
34
34
  let(:times) { [{ hour: 12, minute: 30, second: 15 }] }
35
35
 
36
- it { is_expected.to match_array [Time.new(1997, 1, 1, 12, 30, 15), Time.new(1997, 1, 3, 12, 30, 15)] }
36
+ it { is_expected.to match_array [Time.parse('Wed Jan 1 12:30:15 PST 1997'), Time.parse('Fri Jan 3 12:30:15 PST 1997')] }
37
37
  end
38
38
  end
39
39
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rrule
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Mitchell