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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e36feec08a5a3bec9f239244d7da51952930cae4
4
- data.tar.gz: f9a5e21e9a5e4ef0f38b0ce49f138ad8bea0963d
3
+ metadata.gz: 358dd23836a721b455842348afbc112ec39d761f
4
+ data.tar.gz: 5f54eaa0f43aa11de031123267ee373f54a11b10
5
5
  SHA512:
6
- metadata.gz: 068192d3b01e740acb6b356a9e4dadeb980c6f1c22bc68406d3480441f54f8a0239d942fa617c8e7e02032be81b74d921f1c3c0b99181687f6f9be310ee414df
7
- data.tar.gz: 4433629beecf17aa82e1355413bce1546c2d4fcb0febd481e8689337131492fc702d0bd2b017b32fff744308a87c1e3c571d83402463875eaf7c3d4e887efd46
6
+ metadata.gz: c521bbe940e1d55728835b5d4e9787868f5586af64254f61c4a98a679874a963e8774b3aba260d596ee3c72fac7ccf32ec60cb5b1ef37ace51380d1e7dbe7238
7
+ data.tar.gz: caa85c43bcdcaf32653d6c408d431f932a00c166b4ac6150ae95c7acf86185049000efc276ba3a1e934d1664c928f29882dbbc20fa83922590a11562f68197eb
@@ -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)
@@ -1,3 +1,3 @@
1
1
  module Hiccup
2
- VERSION = "0.4.4"
2
+ VERSION = "0.4.5"
3
3
  end
@@ -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
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-18 00:00:00.000000000 Z
11
+ date: 2013-09-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport