airac 1.0.0 → 1.0.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: 471214b4bbc235944a133c4e4fb5b18889a88daab2ac740cc46b6d49af0389a2
4
- data.tar.gz: a2fec0e51d6625e029beaa45b5dc4e6490158773f69c738096cda61aff575909
3
+ metadata.gz: 0e83b424d90786991809a9a02e00b6610f8ec90eb7d8172c1aabe3d1ea84b582
4
+ data.tar.gz: 8b88dbb7b4c361230bd6660fef5ffa7955458057689533933f48d47fc1ad4386
5
5
  SHA512:
6
- metadata.gz: 79b78dbb5606224cc47d4750875373d3cf3fcbe04791d14415b26b7a37d96521759c85261a3796285ec42dc8c74c644608d1ee2aa81a6837f0480dec4094d404
7
- data.tar.gz: 2e69a17ad1aa19ca18cdbc469b762f726dbdcf528f3c5fe13068e27d52856fa14d1eafa79c0e4be331f0cbfdfbd900b459375efa114e680f2941460cfac04cc1
6
+ metadata.gz: d36d33c57f430cb5ed3a37c4dafc92fd88acf4102d92ce891288e7eb86d3ca4efd1e33ffc73a4094c9d4bb5f871ddcd1339e0f0849752238c279bf8d67130b9c
7
+ data.tar.gz: 990877de46331b9dbe74ee1e8d009fae72cfda6fe258abf8626b068b1dfa6cc11e140b9287ce95778566e2586aa0f126982d0b47c082e041f009516c5f435d61
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## Main
2
+
3
+ Nothing so far
4
+
5
+ ## 1.0.2
6
+
7
+ #### Changes
8
+ * Certificate updated
9
+
10
+ ## 1.0.1
11
+
12
+ #### Additions
13
+ * Effective time range for any given cycle
14
+
1
15
  ## 1.0.0
2
16
 
3
17
  #### Initial Implementation
data/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  # AIRAC
7
7
 
8
- [AIRAC cycle](https://en.wikipedia.org/wiki/Aeronautical_Information_Publication) calculations for Ruby.
8
+ [AIRAC (Aeronautical Information Regulation And Control)](https://en.wikipedia.org/wiki/Aeronautical_Information_Publication) cycle calculations for Ruby.
9
9
 
10
10
  * [Homepage](https://github.com/svoop/airac)
11
11
  * [API](https://www.rubydoc.info/gems/airac)
@@ -26,7 +26,7 @@ gem cert --add <(curl -Ls https://raw.github.com/svoop/airac/main/certs/svoop.pe
26
26
  Add the following to the <tt>Gemfile</tt> or <tt>gems.rb</tt> of your [Bundler](https://bundler.io) powered Ruby project:
27
27
 
28
28
  ```ruby
29
- gem airac
29
+ gem 'airac'
30
30
  ```
31
31
 
32
32
  And then install the bundle:
@@ -41,7 +41,8 @@ You can use this gem in your Ruby project:
41
41
 
42
42
  ```ruby
43
43
  cycle = AIRAC::Cycle.new('2018-01-01')
44
- cycle.date # => #<Date: 2017-12-07 ((2458095j,0s,0n),+0s,2299161j)>
44
+ cycle.date # => #<Date: 2017-12-07>
45
+ cycle.effective # => 2017-12-07 00:00:00 UTC..2018-01-03 23:59:59 UTC
45
46
  cycle.id # => 1713
46
47
  (cycle + 5).id # => 1804
47
48
  (cycle - 5).id # => 1708
data/lib/airac/cycle.rb CHANGED
@@ -4,7 +4,8 @@ module AIRAC
4
4
  #
5
5
  # @example
6
6
  # cycle = AIRAC::Cycle.new('2018-01-01')
7
- # cycle.date # => #<Date: 2017-12-07 ((2458095j,0s,0n),+0s,2299161j)>
7
+ # cycle.date # => #<Date: 2017-12-07>
8
+ # cycle.effective # => 2017-12-07 00:00:00 UTC..2018-01-03 23:59:59 UTC
8
9
  # cycle.id # => 1713
9
10
  # (cycle + 5).id # => 1804
10
11
  # (cycle - 5).id # => 1708
@@ -50,6 +51,14 @@ module AIRAC
50
51
  date.strftime((template || '%i %Y-%m-%d').sub(/%i/, id))
51
52
  end
52
53
 
54
+ # Time range within which this cycle is effective.
55
+ #
56
+ # @return [Range<Time>]
57
+ def effective
58
+ next_date = date + DAYS_PER_CYCLE
59
+ (Time.utc(date.year, date.month, date.day)..(Time.utc(next_date.year, next_date.month, next_date.day) - 1))
60
+ end
61
+
53
62
  # @param days [Numerical] add this many days
54
63
  # @return [AIRAC::Cycle] new object with offset applied
55
64
  def +(cycles)
data/lib/airac/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AIRAC
4
- VERSION = "1.0.0"
4
+ VERSION = "1.0.2"
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: airac
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sven Schwyn
@@ -10,27 +10,26 @@ bindir: exe
10
10
  cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
- MIIDcDCCAligAwIBAgIBATANBgkqhkiG9w0BAQUFADA/MQ0wCwYDVQQDDARydWJ5
14
- MRkwFwYKCZImiZPyLGQBGRYJYml0Y2V0ZXJhMRMwEQYKCZImiZPyLGQBGRYDY29t
15
- MB4XDTIxMTEwODE0MzIyM1oXDTIyMTEwODE0MzIyM1owPzENMAsGA1UEAwwEcnVi
16
- eTEZMBcGCgmSJomT8ixkARkWCWJpdGNldGVyYTETMBEGCgmSJomT8ixkARkWA2Nv
17
- bTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANwuD4geNdhpSVNJTtHb
18
- fmVAoPxmER4oyGgaVJSidn/OjU5PcpdypMI/WIxfvjfFizq6kQYAsJZbCr6fG+UN
19
- 2dZGMXcAC/uKQL5nYESjCPJ4IJP/SC+fiiEpxHQk7PNFoiUVRUieUZIAfHZAdnY3
20
- ye1/niW7ud0vwKIMrysKWxjgkE0Y6Af1QLzV/6brVRRC5MvHIzYJd8BiSP+wY1O8
21
- VElw1f6d90KEz2vaQfX7vCxrzIbvAnYiSvM0AIPy/zigTqpW6w3w4sQxQj81oQ9U
22
- 9vDYtQzXj0c9VrSLvb0DgiGug2cU2b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uTLxyM2CXfAYkj/sGNTvFRJcNX+nfdC
20
+ hM9r2kH1+7wsa8yG7wJ2IkrzNACD8v84oE6qVusN8OLEMUI/NaEPVPbw2LUM149H
21
+ PVa0i729A4IhroNnFNmw4wOC93ARNbM1+LW36PLMmKjKudf5Exg8VmDVAgMBAAGj
22
+ dzB1MAkGA1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQWBBSfK8MtR62mQ6oN
23
+ yoX/VKJzFjLSVDAdBgNVHREEFjAUgRJydWJ5QGJpdGNldGVyYS5jb20wHQYDVR0S
24
+ BBYwFIEScnVieUBiaXRjZXRlcmEuY29tMA0GCSqGSIb3DQEBCwUAA4IBAQAYG2na
25
+ ye8OE2DANQIFM/xDos/E4DaPWCJjX5xvFKNKHMCeQYPeZvLICCwyw2paE7Otwk6p
26
+ uvbg2Ks5ykXsbk5i6vxDoeeOLvmxCqI6m+tHb8v7VZtmwRJm8so0eSX0WvTaKnIf
27
+ CAn1bVUggczVdNoBXw9WAILKyw9bvh3Ft740XZrR74sd+m2pGwjCaM8hzLvrVbGP
28
+ DyYhlBeRWyQKQ0WDIsiTSRhzK8HwSTUWjvPwx7SEdIU/HZgyrk0ETObKPakVu6bH
29
+ kAyiRqgxF4dJviwtqI7mZIomWL63+kXLgjOjMe1SHxfIPo/0ji6+r1p4KYa7o41v
30
+ fwIwU1MKlFBdsjkd
32
31
  -----END CERTIFICATE-----
33
- date: 2022-01-22 00:00:00.000000000 Z
32
+ date: 2022-11-06 00:00:00.000000000 Z
34
33
  dependencies:
35
34
  - !ruby/object:Gem::Dependency
36
35
  name: rake
@@ -60,20 +59,6 @@ dependencies:
60
59
  - - ">="
61
60
  - !ruby/object:Gem::Version
62
61
  version: '0'
63
- - !ruby/object:Gem::Dependency
64
- name: minitest-reporters
65
- requirement: !ruby/object:Gem::Requirement
66
- requirements:
67
- - - ">="
68
- - !ruby/object:Gem::Version
69
- version: '0'
70
- type: :development
71
- prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
73
- requirements:
74
- - - ">="
75
- - !ruby/object:Gem::Version
76
- version: '0'
77
62
  - !ruby/object:Gem::Dependency
78
63
  name: minitest-sound
79
64
  requirement: !ruby/object:Gem::Requirement
@@ -196,7 +181,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
196
181
  - !ruby/object:Gem::Version
197
182
  version: '0'
198
183
  requirements: []
199
- rubygems_version: 3.3.5
184
+ rubygems_version: 3.3.25
200
185
  signing_key:
201
186
  specification_version: 4
202
187
  summary: AIRAC cycle calculations
metadata.gz.sig CHANGED
Binary file