notam 1.1.1 → 1.1.2

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: 417d4bc6e661b8d3a79cf54a3f191eea69643e6e40de00152589b12bedf8e768
4
- data.tar.gz: 51e949d622b8da7772b8dc1e2247ffe41529e787ec2ee133a7852d728bfdf251
3
+ metadata.gz: 9ac9f9d9c891d07fa204936e712b43f3b872d0d79b07298e426e845916d8b20d
4
+ data.tar.gz: 33a5fdaadf77d20c37690e06147942c30167e296cb1e2c41f90d432c44a5f39d
5
5
  SHA512:
6
- metadata.gz: 6717133961de80fed0c49d88af287526e71654ea04ac51baeb69e1fc7b4bfdda8149bddec3949dc1292ad9bec69d1c4aa395224e6db5f17973bf9dd01a915b7e
7
- data.tar.gz: 1827871715ad368903c2a91bc8da784a248f7cb44bf926d982efab3243c3ddc3afde83e2fecd1474c8b7725bf8ca4e824fd00ecade6710e9447c1c7e2a98ec18
6
+ metadata.gz: a1d8eb8f529b8cfd2b0da1426093450451dffd85aa28e9ddee6e69e25ec993dc56f5035954c17e10e801dc9ecf90583a5e36306dab8ac4722c1c26305a557107
7
+ data.tar.gz: 17c930b744c09c3059592d8e859c8e3cb8a8e7dc805d847e8ef9eac4f43991f6125af70e5ae4e66f8d56217a922300ea69e7a5c7bc0a52e20dd8863411f350fe
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  Nothing so far
4
4
 
5
+ ## 1.1.2
6
+
7
+ #### Fixes
8
+ * Carry over last base date instead of first base date
9
+
5
10
  ## 1.1.1
6
11
 
7
12
  #### Fixes
data/README.md CHANGED
@@ -212,6 +212,7 @@ Parsed | `00:00` | `24:00` | the Ruby way
212
212
  ### References
213
213
 
214
214
  * [ICAO Doc 8126: Aeronautical Information Services Manual](https://www.icao.int/NACC/Documents/eDOCS/AIM/8126_unedited_en%20Jul2021.pdf)
215
+ * [ICAO Doc 10066: Aeronautical Information Management](https://ffac.ch/wp-content/uploads/2020/11/ICAO-Doc-10066-Aeronautical-Information-Management.pdf)
215
216
  * [EUROCONTROL Guidelines Operating Procedures AIS Dynamic Data (OPADD)](https://www.eurocontrol.int/sites/default/files/2021-07/eurocontrol-guidelines-opadd-ed4-1.pdf)
216
217
  * [NOTAM Q Codes](https://www.faa.gov/air_traffic/publications/atpubs/notam_html/appendix_b.html)
217
218
  * [NOTAM Contractions](https://www.notams.faa.gov/downloads/contractions.pdf)
data/lib/notam/item/d.rb CHANGED
@@ -16,9 +16,7 @@ module NOTAM
16
16
  base_date = AIXM.date(data[:effective_at])
17
17
  @schedules = text.sub(/\AD\)/, '').split(',').flat_map do |string|
18
18
  Schedule.parse(string, base_date: base_date).tap do |schedule|
19
- if (date = schedule.first.actives.first).instance_of? AIXM::Schedule::Date
20
- base_date = date # carry over month
21
- end
19
+ base_date = schedule.last.last_date || base_date # carry over month
22
20
  end
23
21
  end
24
22
  self
@@ -28,7 +28,7 @@ module NOTAM
28
28
 
29
29
  # Active dates or days
30
30
  #
31
- # @note If {#active} lists dates, then {#inactive} must list days and
31
+ # @note If {#actives} lists dates, then {#inactives} must list days and
32
32
  # vice versa.
33
33
  #
34
34
  # @return [Array<NOTAM::Schedule::Dates>, Array<NOTAM::Schedule::Days>]
@@ -41,7 +41,7 @@ module NOTAM
41
41
 
42
42
  # Inactive dates or days
43
43
  #
44
- # @note If {#inactive} lists dates, then {#active} must list days and
44
+ # @note If {#inactives} lists dates, then {#actives} must list days and
45
45
  # vice versa.
46
46
  #
47
47
  # @return [Array<NOTAM::Schedule::Dates>, Array<NOTAM::Schedule::Days>]
@@ -274,6 +274,16 @@ module NOTAM
274
274
  resolve(on: date, xy: xy).slice(date).times.cover? AIXM.time(at)
275
275
  end
276
276
 
277
+ # Last +actives+ date of the schedule (+inatives+ are ignored).
278
+ #
279
+ # @return [AIXM::Date, nil] last date or +nil+ if schedule actives are days
280
+ def last_date
281
+ actives.last.then do |active|
282
+ active = active.last if active.respond_to? :last
283
+ active if active.instance_of? AIXM::Schedule::Date
284
+ end
285
+ end
286
+
277
287
  # @abstract
278
288
  class ScheduleArray < Array
279
289
  # @return [String]
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.1".freeze
4
+ VERSION = "1.1.2".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.1
4
+ version: 1.1.2
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-07 00:00:00.000000000 Z
32
+ date: 2023-06-17 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.13
260
+ rubygems_version: 3.4.14
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