notam 1.1.2 → 1.1.3

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
  SHA256:
3
- metadata.gz: 9ac9f9d9c891d07fa204936e712b43f3b872d0d79b07298e426e845916d8b20d
4
- data.tar.gz: 33a5fdaadf77d20c37690e06147942c30167e296cb1e2c41f90d432c44a5f39d
3
+ metadata.gz: 03fe65745ed0b91b44076f79366f91858a1c08fc771259e28863d75b21f6f1e9
4
+ data.tar.gz: cb4cd5a830d4a6178850c6f1e86c4dc3102fa6a2b1c76345b565aae2a63a845a
5
5
  SHA512:
6
- metadata.gz: a1d8eb8f529b8cfd2b0da1426093450451dffd85aa28e9ddee6e69e25ec993dc56f5035954c17e10e801dc9ecf90583a5e36306dab8ac4722c1c26305a557107
7
- data.tar.gz: 17c930b744c09c3059592d8e859c8e3cb8a8e7dc805d847e8ef9eac4f43991f6125af70e5ae4e66f8d56217a922300ea69e7a5c7bc0a52e20dd8863411f350fe
6
+ metadata.gz: dfe364053662a70186cafba5a77a83dc889cd5b314f8e1ba88e84345dc7207cdcabd11add87772e56b3d3faed915fde3c0e5728c86cc60a383a6d24fdbc80f37
7
+ data.tar.gz: 441372ea6c5453504636766b10698e734023fd03cb326f75f7b34839f5532b057b7b3d89a95905aac21814086290d01205931dcd39c15e90543d607c008b26fe
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  Nothing so far
4
4
 
5
+ ## 1.1.3
6
+
7
+ #### Changes
8
+ * Don't wrap years when breaking down date ranges
9
+ * Allow HJ and HN in schedules
10
+
5
11
  ## 1.1.2
6
12
 
7
13
  #### Fixes
@@ -15,16 +15,18 @@ module NOTAM
15
15
  DATE_RE = /[0-2]\d|3[01]/.freeze
16
16
  DAY_RE = /#{DAYS.keys.join('|')}/.freeze
17
17
  MONTH_RE = /#{MONTHS.keys.join('|')}/.freeze
18
- H24_RE = /(?<h24>H24)/.freeze
18
+ HCODE_RE = /(?<hcode>H24|HJ|HN)/.freeze
19
19
  HOUR_RE = /(?<hour>[01]\d|2[0-4])(?<minute>[0-5]\d)/.freeze
20
20
  OPERATIONS_RE = /#{OPERATIONS.keys.join('|')}/.freeze
21
21
  EVENT_RE = /(?<event>SR|SS)(?:\s(?<operation>#{OPERATIONS_RE})(?<delta>\d+))?/.freeze
22
22
  TIME_RE = /#{HOUR_RE}|#{EVENT_RE}/.freeze
23
- TIME_RANGE_RE = /#{TIME_RE}-#{TIME_RE}|#{H24_RE}/.freeze
23
+ TIME_RANGE_RE = /#{TIME_RE}-#{TIME_RE}|#{HCODE_RE}/.freeze
24
24
  DATETIME_RE = /(?:(?<month>#{MONTH_RE}) )?(?<date>#{DATE_RE}) (?<time>#{TIME_RE})/.freeze
25
25
  DATETIME_RANGE_RE = /#{DATETIME_RE}-#{DATETIME_RE}/.freeze
26
26
 
27
27
  H24 = (AIXM::BEGINNING_OF_DAY..AIXM::END_OF_DAY).freeze
28
+ HJ = (AIXM.time(:sunrise)..AIXM.time(:sunset)).freeze
29
+ HN = (AIXM.time(:sunset)..AIXM.time(:sunrise)).freeze
28
30
 
29
31
  # Active dates or days
30
32
  #
@@ -146,7 +148,7 @@ module NOTAM
146
148
  when /\A(?<day>#{DATE_RE})/ # single date
147
149
  array << base_date.at(day: $~[:day].to_i)
148
150
  when /\A(?<month>#{MONTH_RE})/
149
- base_date = base_date.at(month: MONTHS.fetch($~[:month]), wrap: true)
151
+ base_date = base_date.at(month: MONTHS.fetch($~[:month]), wrap: false)
150
152
  else
151
153
  fail! "unrecognized date"
152
154
  end
@@ -182,8 +184,8 @@ module NOTAM
182
184
  # @return [Range<AIXM::Schedule::Time>]
183
185
  def time_range_from(string)
184
186
  case string
185
- when H24_RE
186
- H24
187
+ when HCODE_RE
188
+ const_get($~[:hcode].upcase)
187
189
  else
188
190
  from, to = string.split('-')
189
191
  (time_from(from)..time_from(to))
data/lib/notam/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module NOTAM
4
- VERSION = "1.1.2".freeze
4
+ VERSION = "1.1.3".freeze
5
5
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: notam
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sven Schwyn
@@ -29,7 +29,7 @@ cert_chain:
29
29
  kAyiRqgxF4dJviwtqI7mZIomWL63+kXLgjOjMe1SHxfIPo/0ji6+r1p4KYa7o41v
30
30
  fwIwU1MKlFBdsjkd
31
31
  -----END CERTIFICATE-----
32
- date: 2023-06-17 00:00:00.000000000 Z
32
+ date: 2023-06-30 00:00:00.000000000 Z
33
33
  dependencies:
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: aixm
@@ -257,7 +257,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
257
257
  - !ruby/object:Gem::Version
258
258
  version: '0'
259
259
  requirements: []
260
- rubygems_version: 3.4.14
260
+ rubygems_version: 3.4.15
261
261
  signing_key:
262
262
  specification_version: 4
263
263
  summary: Parser for NOTAM (Notice to Airmen) messages
metadata.gz.sig CHANGED
Binary file