hiccup 0.4.4 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hiccup/enumerable.rb +3 -0
- data/lib/hiccup/version.rb +1 -1
- data/test/enumerable_test.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 358dd23836a721b455842348afbc112ec39d761f
|
4
|
+
data.tar.gz: 5f54eaa0f43aa11de031123267ee373f54a11b10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c521bbe940e1d55728835b5d4e9787868f5586af64254f61c4a98a679874a963e8774b3aba260d596ee3c72fac7ccf32ec60cb5b1ef37ace51380d1e7dbe7238
|
7
|
+
data.tar.gz: caa85c43bcdcaf32653d6c408d431f932a00c166b4ac6150ae95c7acf86185049000efc276ba3a1e934d1664c928f29882dbbc20fa83922590a11562f68197eb
|
data/lib/hiccup/enumerable.rb
CHANGED
@@ -26,6 +26,9 @@ module Hiccup
|
|
26
26
|
|
27
27
|
|
28
28
|
def occurrences_between(earlier_date, later_date)
|
29
|
+
return [] if ends? && earlier_date > end_date
|
30
|
+
return [] if later_date < start_date
|
31
|
+
|
29
32
|
occurrences = []
|
30
33
|
enum = enumerator.new(self, earlier_date)
|
31
34
|
while (occurrence = enum.next) && (occurrence <= later_date)
|
data/lib/hiccup/version.rb
CHANGED
data/test/enumerable_test.rb
CHANGED
@@ -210,6 +210,7 @@ class EnumerableTest < ActiveSupport::TestCase
|
|
210
210
|
:end_date => Date.new(2011, 1, 31)})
|
211
211
|
assert_equal nil, schedule.first_occurrence_after(Date.new(2011,1,31))
|
212
212
|
assert_equal nil, schedule.first_occurrence_on_or_after(Date.new(2011,2, 1))
|
213
|
+
assert_equal [], schedule.occurrences_between(Date.new(2013, 9, 23), Date.new(2013, 9, 30))
|
213
214
|
end
|
214
215
|
|
215
216
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hiccup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bob Lail
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-09-
|
11
|
+
date: 2013-09-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|