notam 1.1.1 → 1.1.3.pre1

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: 417d4bc6e661b8d3a79cf54a3f191eea69643e6e40de00152589b12bedf8e768
4
- data.tar.gz: 51e949d622b8da7772b8dc1e2247ffe41529e787ec2ee133a7852d728bfdf251
3
+ metadata.gz: 18311585815e5dcf56f3d411ca05de397fa7cd02abc445d2e0a955b8a4184707
4
+ data.tar.gz: 0c96db85cdfe2813aa974087044b216f9ac9ced153d5b6661444a3bd74e8d239
5
5
  SHA512:
6
- metadata.gz: 6717133961de80fed0c49d88af287526e71654ea04ac51baeb69e1fc7b4bfdda8149bddec3949dc1292ad9bec69d1c4aa395224e6db5f17973bf9dd01a915b7e
7
- data.tar.gz: 1827871715ad368903c2a91bc8da784a248f7cb44bf926d982efab3243c3ddc3afde83e2fecd1474c8b7725bf8ca4e824fd00ecade6710e9447c1c7e2a98ec18
6
+ metadata.gz: 34c4edb2e848b573eab84636134291b6581dbfccc89eed657c785b6aa5afe8feb101ccee5277060fdc1efce095c6f5da14c8a455e9e5429ad608963747c03e74
7
+ data.tar.gz: e0ff937aa5b5d20dd429c837070ba9b8589f3cc1bda85f7fef959fba97d8199b727049acc60bf4f30fe26f70a331fd576193e41cc144391c5943f6f5867f4782
checksums.yaml.gz.sig CHANGED
@@ -1,3 +1,2 @@
1
- ��*-bxsk:� ��,�d'��������%3O��7$=B� ы�A�\�w�[�.�
2
- RCu�==���9=��4-fdqf&��j��xP��\2AF���|�g��լ~ǵ7ih��T��$nzg���h��Ù ��k�
3
- w&㛷r��G�۳��6�
1
+ )և,��%��ßt�4�,�AW�V�UCC�g�az!� �@ֱ��L?�+�I�P�K����C��x�sȂ�B]GI{��*�Co�.|����r�{��"���~]�����+{�Y�-�͡�K�Y*��X�?��ߤ���d_��w)��-� 'L
2
+ ȥ�uiE�,k/vLlQ1����`�Qq0;j��[�k\�V�ݪ�x9����㕃�?�k�+���l:����� �`��6`J�v�����
data/CHANGELOG.md CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
  Nothing so far
4
4
 
5
+ ## 1.1.3.pre1
6
+
7
+ #### Changes
8
+ * Don't wrap years when breaking down date ranges
9
+
10
+ ## 1.1.2
11
+
12
+ #### Fixes
13
+ * Carry over last base date instead of first base date
14
+
5
15
  ## 1.1.1
6
16
 
7
17
  #### 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>]
@@ -146,7 +146,7 @@ module NOTAM
146
146
  when /\A(?<day>#{DATE_RE})/ # single date
147
147
  array << base_date.at(day: $~[:day].to_i)
148
148
  when /\A(?<month>#{MONTH_RE})/
149
- base_date = base_date.at(month: MONTHS.fetch($~[:month]), wrap: true)
149
+ base_date = base_date.at(month: MONTHS.fetch($~[:month]), wrap: false)
150
150
  else
151
151
  fail! "unrecognized date"
152
152
  end
@@ -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.3.pre1".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.3.pre1
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-27 00:00:00.000000000 Z
33
33
  dependencies:
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: aixm
@@ -253,11 +253,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
253
253
  version: 3.0.0
254
254
  required_rubygems_version: !ruby/object:Gem::Requirement
255
255
  requirements:
256
- - - ">="
256
+ - - ">"
257
257
  - !ruby/object:Gem::Version
258
- version: '0'
258
+ version: 1.3.1
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