ice_cube 0.11.2 → 0.11.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ice_cube/schedule.rb +6 -3
- data/lib/ice_cube/version.rb +1 -1
- 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: ec72afe66473b31f58d02177fce834635b8d6f6d
|
4
|
+
data.tar.gz: f2b199ad1c5cddfbdc4f0b435f7caa594e8e0f3b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21eba9fafa80dd036ca6e24f118b4638c46c68000a1a77758467d8cc1a27b9cb0c287980fe2d23fbaeb0b18f35d7ac9f8c6850bb5ff5a5cd2c019dace00d9f43
|
7
|
+
data.tar.gz: 2d842dc82d6f195642c2ecfd0bb4198dd6d9dced764da87bba2001309d2d4de4672f581c8e3ddc062223c87e9c32c1cb32aa2874cb4a1e4893ba98f578ce73fc
|
data/lib/ice_cube/schedule.rb
CHANGED
@@ -174,7 +174,11 @@ module IceCube
|
|
174
174
|
# The next occurrence after now (overridable)
|
175
175
|
def next_occurrence(from = nil)
|
176
176
|
from ||= TimeUtil.now(@start_time)
|
177
|
-
|
177
|
+
begin
|
178
|
+
enumerate_occurrences(from + 1, nil).next()
|
179
|
+
rescue StopIteration
|
180
|
+
nil
|
181
|
+
end
|
178
182
|
end
|
179
183
|
|
180
184
|
# The previous occurrence from a given time
|
@@ -210,13 +214,12 @@ module IceCube
|
|
210
214
|
|
211
215
|
# Return a boolean indicating if an occurrence falls between two times
|
212
216
|
def occurs_between?(begin_time, closing_time)
|
213
|
-
begin
|
217
|
+
begin
|
214
218
|
enumerate_occurrences(begin_time, closing_time).next()
|
215
219
|
true
|
216
220
|
rescue StopIteration
|
217
221
|
false
|
218
222
|
end
|
219
|
-
|
220
223
|
end
|
221
224
|
|
222
225
|
# Return a boolean indicating if an occurrence is occurring between two
|
data/lib/ice_cube/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ice_cube
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Crepezzi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-02-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|