on_calendar 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/on_calendar/parser.rb +11 -11
- data/lib/on_calendar/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: baf51ec40d00667e28eb581adff1478e77cf5e34d40ea05ab0348ba3d0f300bb
|
|
4
|
+
data.tar.gz: 924a021e7fe2f18da64d7c73c1d277e71c27c326d4c9dc5cd7887067e53e6ff1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d5b06b32d3a4553159745cc5f75ba4d67ac7756be4caa2225e02a45784c7a02f022b2c1a29a95d615956e50299b6a65618ec538752c7ec878605ef49d815c4d1
|
|
7
|
+
data.tar.gz: fc4980d4d436db145a6e7e5f40cf25f50f3e5fa4919e6a2976ffacebbbe7486dd26747dc7f051805abf671307975afadcb5453952ba64fa91520bebb960eb7db
|
data/lib/on_calendar/parser.rb
CHANGED
|
@@ -234,18 +234,18 @@ module OnCalendar
|
|
|
234
234
|
# Parse this segment
|
|
235
235
|
begin
|
|
236
236
|
parsed = OnCalendar::Segment.parse(segments.shift, max: max, min: min)
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
parsed.each do |c|
|
|
247
|
-
conditions[idx] << OnCalendar::Condition.const_get(klass).new(**c)
|
|
237
|
+
if parsed.nil?
|
|
238
|
+
# We are a wild card
|
|
239
|
+
conditions[idx] = [OnCalendar::Condition.const_get(klass).new(wildcard: true)]
|
|
240
|
+
else
|
|
241
|
+
# Lets build conditions with parsed
|
|
242
|
+
conditions[idx] = []
|
|
243
|
+
parsed.each do |c|
|
|
244
|
+
conditions[idx] << OnCalendar::Condition.const_get(klass).new(**c)
|
|
245
|
+
end
|
|
248
246
|
end
|
|
247
|
+
rescue OnCalendar::Segment::Error, OnCalendar::Condition::Error => e
|
|
248
|
+
raise Error, e
|
|
249
249
|
end
|
|
250
250
|
end
|
|
251
251
|
conditions
|
data/lib/on_calendar/version.rb
CHANGED