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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2eb160e10f438040984f18d10f9e4dc2539c29e4c7ba08905ec95bd33dc946bb
4
- data.tar.gz: 917de2ca4610fc00d5775fd6fa7a80a3a7c8240195a6b9bbc7a14887a4e74a63
3
+ metadata.gz: baf51ec40d00667e28eb581adff1478e77cf5e34d40ea05ab0348ba3d0f300bb
4
+ data.tar.gz: 924a021e7fe2f18da64d7c73c1d277e71c27c326d4c9dc5cd7887067e53e6ff1
5
5
  SHA512:
6
- metadata.gz: a78a73bc555873319e61d4157e432d5ed1fd3a5a07e84a65938df260676287425350c3b05db61a54e8b888b8733fcc2cf606e9b0537b4b4597851dfa7d34a395
7
- data.tar.gz: 69db0de1716057fcae4cd9634aa61468bff3bf6b39bd8dccbf0c0dc081958453595877cecebbde77f36eefb820798df93e8aa3e5e7598525e336960f52c0247a
6
+ metadata.gz: d5b06b32d3a4553159745cc5f75ba4d67ac7756be4caa2225e02a45784c7a02f022b2c1a29a95d615956e50299b6a65618ec538752c7ec878605ef49d815c4d1
7
+ data.tar.gz: fc4980d4d436db145a6e7e5f40cf25f50f3e5fa4919e6a2976ffacebbbe7486dd26747dc7f051805abf671307975afadcb5453952ba64fa91520bebb960eb7db
@@ -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
- rescue OnCalendar::Segment::Error => e
238
- raise Error, e
239
- end
240
- if parsed.nil?
241
- # We are a wild card
242
- conditions[idx] = [OnCalendar::Condition.const_get(klass).new(wildcard: true)]
243
- else
244
- # Lets build conditions with parsed
245
- conditions[idx] = []
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OnCalendar
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.3"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: on_calendar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Passmore