aixm 1.4.0 → 1.4.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: 893b141929be3f77025e38496a060f415c2262e48d0ef102ad4da84e601e4ff4
4
- data.tar.gz: fb65d43a1d2493b1ceadffdf9c8a0671cb8bb46dc5be026c538d9f86435620da
3
+ metadata.gz: 17c37db68c0bd400f252a05376c97844c89287a062c0dc26ceb4e8b4fc53fe62
4
+ data.tar.gz: 9fd668c694f127adfe07bceb74765785d913bb65413b93330e6870e8ce8761ee
5
5
  SHA512:
6
- metadata.gz: 9104a9562a75872c26780e711f2744c7717c1349901ad89e661ea08cf444b00de5fa344c314c9cfc082b12e3e9a8247553af1c225a21f2f85a75924a1136b432
7
- data.tar.gz: 4ce0eb72f3e26fde3aee41175771f83718d8dc2c4818fef1bcd6eaa47ae54d7f26d40d19df39ee449acdd2da0516a82ae552acb3c3ddfd90d224b4e41c49a50b
6
+ metadata.gz: 4b594ea96f955f07ad380ec021a6b330eb4ec569d92b9dc44897bdc46603431057db81c2091cefddab50d5d6ed1b12ad9cafd13be5fca20627bcaeb7f481cc15
7
+ data.tar.gz: 5b1910e5db2280d5e74a93ec7709c5ee7972ad1328b5de01c2c542f4c4c02b2e03bdfeeefd5ffd253078f8c65e4acc756d1ae606c116a1ba13d4f4f46ac67752
checksums.yaml.gz.sig CHANGED
@@ -1,3 +1,4 @@
1
- )S��N7H����øl����������#�m�?�X��}�|'0% 77��$�3��:�
2
- <�J&N[(y)���A����N��r���G*�9�3���K����0��5��s�㜅1���v�B�����t�Ķ7�ߵ(��Z��� A�8�HE���D����W��f�(���7F�{)1mVD]����]
3
- 9*C��
1
+ 6��h';������Y=��Qb W5}X�я�iL|T�1 ��lb�Q��W1�
2
+ ¼�{��]jV6
3
+ !c�%���R�y���7�-?��� Qh�ܒ��i�����t�J`�����h�es1߫o7v�B�I��D����m�)���&h��Q���j�CG� �iӌ>�DuE����
4
+ �`\
data/CHANGELOG.md CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
  Nothing so far
4
4
 
5
+ ## 1.4.2
6
+
7
+ #### Changes
8
+ * Fix 00:00 vs. 24:00 calculation for times with time zones
9
+
10
+ ## 1.4.1
11
+
12
+ #### Changes
13
+ * Update upstream OFMX schema
14
+
5
15
  ## 1.4.0
6
16
 
7
17
  #### Additions
@@ -29,7 +29,7 @@ module AIXM
29
29
 
30
30
  EVENTS = { sunrise: :up, sunset: :down }.freeze
31
31
  PRECEDENCES = { first: :min, last: :max }.freeze
32
- DATELESS_DATE = ::Date.parse('0000-01-01').freeze
32
+ DATELESS_DATE = ::Date.parse('0001-01-01').freeze
33
33
 
34
34
  # @api private
35
35
  attr_accessor :time
@@ -250,10 +250,15 @@ module AIXM
250
250
  # @param hour [Integer, String]
251
251
  # @param min [Integer, String]
252
252
  # @param offset [Integer, String] either UTC offset in seconds
253
- # (default: 0) or 'UTC'
253
+ # (default: 0), as '+01:00', '-0300' or 'UTC'
254
254
  # @return [Time]
255
255
  def set_time(hour, min, offset)
256
- @time = ::Time.new(DATELESS_DATE.year, DATELESS_DATE.month, DATELESS_DATE.day, hour, min, 0, offset || 0).utc
256
+ # TODO: Colon-workaround can be removed when support of Ruby 3.0 has ended
257
+ coloned_offset = offset.is_a?(String) ? offset.sub(/([+-]\d{2})(\d{2})/, '\1:\2') : offset
258
+ utc = ::Time.new(1, 1, 1, hour, min, 0, coloned_offset || 0).utc
259
+ # utc = ::Time.new(1, 1, 1, hour, min, 0, offset || 0).utc
260
+ day_shift = utc.hour.zero? && utc.min.zero? && hour.to_i >= 12 ? 1 : 0
261
+ @time = ::Time.utc(DATELESS_DATE.year, DATELESS_DATE.month, DATELESS_DATE.day + day_shift, utc.hour, utc.min, 0)
257
262
  end
258
263
 
259
264
  def event=(value)
@@ -267,7 +272,7 @@ module AIXM
267
272
  end
268
273
 
269
274
  def end_of_day?
270
- @time.day > DATELESS_DATE.day
275
+ @time.day != DATELESS_DATE.day
271
276
  end
272
277
 
273
278
  # @note Necessary to use this class in Range.
data/lib/aixm/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module AIXM
2
- VERSION = "1.4.0".freeze
2
+ VERSION = "1.4.2".freeze
3
3
  end
@@ -43,7 +43,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
43
43
  <xsd:attributeGroup name="Changes"/>
44
44
  <xsd:element name="OFMX-Snapshot">
45
45
  <xsd:complexType>
46
- <xsd:choice maxOccurs="unbounded">
46
+ <xsd:choice maxOccurs="unbounded" minOccurs="0">
47
47
  <xsd:element name="Aas" type="AirspaceAssociationType"/>
48
48
  <xsd:element name="Abd" type="AirspaceBorderType"/>
49
49
  <xsd:element name="Acr" type="AirspaceCorridorType"/>
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aixm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.4.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-01-22 00:00:00.000000000 Z
32
+ date: 2023-03-06 00:00:00.000000000 Z
33
33
  dependencies:
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: nokogiri
@@ -313,7 +313,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
313
313
  - !ruby/object:Gem::Version
314
314
  version: '0'
315
315
  requirements: []
316
- rubygems_version: 3.4.5
316
+ rubygems_version: 3.4.7
317
317
  signing_key:
318
318
  specification_version: 4
319
319
  summary: Builder for AIXM/OFMX aeronautical information
metadata.gz.sig CHANGED
Binary file