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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +14 -0
- data/README.md +4 -3
- data/lib/airac/cycle.rb +10 -1
- data/lib/airac/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +21 -36
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e83b424d90786991809a9a02e00b6610f8ec90eb7d8172c1aabe3d1ea84b582
|
4
|
+
data.tar.gz: 8b88dbb7b4c361230bd6660fef5ffa7955458057689533933f48d47fc1ad4386
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d36d33c57f430cb5ed3a37c4dafc92fd88acf4102d92ce891288e7eb86d3ca4efd1e33ffc73a4094c9d4bb5f871ddcd1339e0f0849752238c279bf8d67130b9c
|
7
|
+
data.tar.gz: 990877de46331b9dbe74ee1e8d009fae72cfda6fe258abf8626b068b1dfa6cc11e140b9287ce95778566e2586aa0f126982d0b47c082e041f009516c5f435d61
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
# AIRAC
|
7
7
|
|
8
|
-
[AIRAC
|
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
|
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
|
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
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.
|
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
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
5JcY2h7owdMxXIvgk1oakgldFJc=
|
13
|
+
MIIDODCCAiCgAwIBAgIBATANBgkqhkiG9w0BAQsFADAjMSEwHwYDVQQDDBhydWJ5
|
14
|
+
L0RDPWJpdGNldGVyYS9EQz1jb20wHhcNMjIxMTA2MTIzNjUwWhcNMjMxMTA2MTIz
|
15
|
+
NjUwWjAjMSEwHwYDVQQDDBhydWJ5L0RDPWJpdGNldGVyYS9EQz1jb20wggEiMA0G
|
16
|
+
CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDcLg+IHjXYaUlTSU7R235lQKD8ZhEe
|
17
|
+
KMhoGlSUonZ/zo1OT3KXcqTCP1iMX743xYs6upEGALCWWwq+nxvlDdnWRjF3AAv7
|
18
|
+
ikC+Z2BEowjyeCCT/0gvn4ohKcR0JOzzRaIlFUVInlGSAHx2QHZ2N8ntf54lu7nd
|
19
|
+
L8CiDK8rClsY4JBNGOgH9UC81f+m61UUQuTLxyM2CXfAYkj/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-
|
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.
|
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
|