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 +4 -4
- data/Rakefile +0 -18
- data/lib/rrule.rb +2 -2
- data/rrule.gemspec +1 -1
- data/spec/generators/all_occurrences_spec.rb +3 -3
- data/spec/generators/by_set_position_spec.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 38233f8772b83457ca170a1e6eaa20d8f8455c02
|
4
|
+
data.tar.gz: d0a65079756ddb7faf5f4615145ce7b99814c8b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/lib/rrule.rb
CHANGED
@@ -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
|
data/rrule.gemspec
CHANGED
@@ -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.
|
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.
|
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.
|
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.
|
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.
|
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
|