aipp 0.2.5 → 0.2.6
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.tar.gz.sig +0 -0
- data/CHANGELOG.md +8 -0
- data/README.md +40 -14
- data/exe/aip2aixm +1 -1
- data/exe/aip2ofmx +1 -1
- data/lib/aipp.rb +2 -0
- data/lib/aipp/aip.rb +17 -12
- data/lib/aipp/downloader.rb +1 -1
- data/lib/aipp/executable.rb +15 -12
- data/lib/aipp/parser.rb +58 -43
- data/lib/aipp/pdf.rb +1 -1
- data/lib/aipp/regions/LF/AD-1.3.rb +7 -6
- data/lib/aipp/regions/LF/AD-1.6.rb +7 -5
- data/lib/aipp/regions/LF/AD-2.rb +16 -9
- data/lib/aipp/regions/LF/AD-3.1.rb +6 -6
- data/lib/aipp/regions/LF/ENR-2.1.rb +81 -6
- data/lib/aipp/regions/LF/ENR-4.1.rb +3 -1
- data/lib/aipp/regions/LF/ENR-4.3.rb +2 -3
- data/lib/aipp/regions/LF/ENR-5.1.rb +15 -2
- data/lib/aipp/regions/LF/ENR-5.4.rb +90 -0
- data/lib/aipp/regions/LF/ENR-5.5.rb +12 -10
- data/lib/aipp/regions/LF/fixtures/AD-1.3.yml +2 -2
- data/lib/aipp/regions/LF/helpers/base.rb +17 -9
- data/lib/aipp/regions/LF/helpers/radio_AD.rb +21 -13
- data/lib/aipp/t_hash.rb +3 -3
- data/lib/aipp/version.rb +1 -1
- data/lib/core_ext/enumerable.rb +7 -7
- data/lib/core_ext/string.rb +9 -4
- metadata +156 -168
- metadata.gz.sig +1 -0
- data/.github/workflows/test.yml +0 -26
- data/.gitignore +0 -8
- data/.ruby-version +0 -1
- data/.yardopts +0 -3
- data/Guardfile +0 -7
- data/TODO.md +0 -6
- data/aipp.gemspec +0 -45
- data/gems.rb +0 -3
- data/rakefile.rb +0 -12
- data/spec/fixtures/border.geojson +0 -201
- data/spec/fixtures/document.pdf +0 -0
- data/spec/fixtures/document.pdf.json +0 -1
- data/spec/fixtures/new.html +0 -6
- data/spec/fixtures/new.pdf +0 -0
- data/spec/fixtures/new.txt +0 -1
- data/spec/fixtures/source.zip +0 -0
- data/spec/lib/aipp/airac_spec.rb +0 -98
- data/spec/lib/aipp/border_spec.rb +0 -135
- data/spec/lib/aipp/downloader_spec.rb +0 -81
- data/spec/lib/aipp/patcher_spec.rb +0 -46
- data/spec/lib/aipp/pdf_spec.rb +0 -124
- data/spec/lib/aipp/t_hash_spec.rb +0 -44
- data/spec/lib/aipp/version_spec.rb +0 -7
- data/spec/lib/core_ext/enumberable_spec.rb +0 -76
- data/spec/lib/core_ext/hash_spec.rb +0 -27
- data/spec/lib/core_ext/integer_spec.rb +0 -15
- data/spec/lib/core_ext/nil_class_spec.rb +0 -11
- data/spec/lib/core_ext/string_spec.rb +0 -112
- data/spec/sounds/failure.mp3 +0 -0
- data/spec/sounds/success.mp3 +0 -0
- data/spec/spec_helper.rb +0 -29
metadata.gz.sig
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
��V?ǜ����o.h�yU�{_'��s/�'K!v�O+U�p~�o�!�Øw�l/^��H����ٌGu�H�����{�Ux�!}X&�{ȥ����Þ�1�Рb�9#��e:l�4�?d�zb��J�`��<�ܩ^̳�ӿ5|ʋ�-��6n\�g�c�SRv���(H=�����D�!���o�EX�*28���uLE3͑�X&M�ڔ1�&D��aa?�#,�RO{�2�qj`���� �zp��^�m����c�
|
data/.github/workflows/test.yml
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
name: Test
|
2
|
-
|
3
|
-
on:
|
4
|
-
push:
|
5
|
-
branches:
|
6
|
-
- master
|
7
|
-
|
8
|
-
jobs:
|
9
|
-
build:
|
10
|
-
|
11
|
-
runs-on: ubuntu-latest
|
12
|
-
strategy:
|
13
|
-
matrix:
|
14
|
-
ruby:
|
15
|
-
- 2.6.x
|
16
|
-
steps:
|
17
|
-
- uses: actions/checkout@v1
|
18
|
-
- name: Set up Ruby ${{ matrix.ruby }}
|
19
|
-
uses: actions/setup-ruby@v1
|
20
|
-
with:
|
21
|
-
ruby-version: ${{ matrix.ruby }}
|
22
|
-
- name: Build and test
|
23
|
-
run: |
|
24
|
-
gem install bundler
|
25
|
-
bundle install --jobs 4 --retry 3
|
26
|
-
bundle exec rake
|
data/.gitignore
DELETED
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
ruby-2.6.5
|
data/.yardopts
DELETED
data/Guardfile
DELETED
data/TODO.md
DELETED
data/aipp.gemspec
DELETED
@@ -1,45 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require 'aipp/version'
|
5
|
-
|
6
|
-
Gem::Specification.new do |spec|
|
7
|
-
spec.name = 'aipp'
|
8
|
-
spec.version = AIPP::VERSION
|
9
|
-
spec.authors = ['Sven Schwyn']
|
10
|
-
spec.email = ['ruby@bitcetera.com']
|
11
|
-
spec.description = %q(Parser for Aeronautical Information Publications (AIP).)
|
12
|
-
spec.summary = %q(Parser for Aeronautical Information Publications (AIP).)
|
13
|
-
spec.homepage = 'https://github.com/svoop/aipp'
|
14
|
-
spec.license = 'MIT'
|
15
|
-
|
16
|
-
spec.files = `git ls-files`.split($/)
|
17
|
-
spec.bindir = 'exe'
|
18
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
|
-
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
20
|
-
spec.require_paths = ['lib']
|
21
|
-
|
22
|
-
spec.required_ruby_version = '>= 2.6'
|
23
|
-
|
24
|
-
spec.add_development_dependency 'rake'
|
25
|
-
spec.add_development_dependency 'minitest'
|
26
|
-
spec.add_development_dependency 'minitest-reporters'
|
27
|
-
spec.add_development_dependency 'minitest-sound'
|
28
|
-
spec.add_development_dependency 'minitest-focus'
|
29
|
-
spec.add_development_dependency 'minitest-matchers'
|
30
|
-
spec.add_development_dependency 'spy'
|
31
|
-
spec.add_development_dependency 'guard'
|
32
|
-
spec.add_development_dependency 'guard-minitest'
|
33
|
-
|
34
|
-
spec.add_runtime_dependency 'aixm', '>= 0.3.8'
|
35
|
-
spec.add_runtime_dependency 'activesupport', '~> 5'
|
36
|
-
spec.add_runtime_dependency 'nokogiri', '~> 1'
|
37
|
-
spec.add_runtime_dependency 'nokogumbo', '~> 2'
|
38
|
-
spec.add_runtime_dependency 'pdf-reader', '~> 2'
|
39
|
-
spec.add_runtime_dependency 'json', '~> 2'
|
40
|
-
spec.add_runtime_dependency 'rubyzip', '~> 2'
|
41
|
-
spec.add_runtime_dependency 'colorize', '~> 0'
|
42
|
-
spec.add_runtime_dependency 'pry', '~> 0'
|
43
|
-
spec.add_runtime_dependency 'pry-rescue', '~> 1'
|
44
|
-
spec.add_runtime_dependency 'pry-stack_explorer', '~> 0'
|
45
|
-
end
|
data/gems.rb
DELETED
data/rakefile.rb
DELETED
@@ -1,201 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"type": "GeometryCollection",
|
3
|
-
"geometries": [
|
4
|
-
{
|
5
|
-
"type": "LineString",
|
6
|
-
"coordinates": [
|
7
|
-
[
|
8
|
-
4.757294654846191,
|
9
|
-
43.989202079482276
|
10
|
-
],
|
11
|
-
[
|
12
|
-
4.764375686645508,
|
13
|
-
43.99701327763528
|
14
|
-
],
|
15
|
-
[
|
16
|
-
4.7519731521606445,
|
17
|
-
44.00269350325321
|
18
|
-
],
|
19
|
-
[
|
20
|
-
4.745192527770996,
|
21
|
-
43.99506829280446
|
22
|
-
],
|
23
|
-
[
|
24
|
-
4.751286506652832,
|
25
|
-
43.99235138187902
|
26
|
-
],
|
27
|
-
[
|
28
|
-
4.750943183898926,
|
29
|
-
43.99198088438825
|
30
|
-
],
|
31
|
-
[
|
32
|
-
4.757294654846191,
|
33
|
-
43.989202079482276
|
34
|
-
]
|
35
|
-
]
|
36
|
-
},
|
37
|
-
{
|
38
|
-
"type": "LineString",
|
39
|
-
"coordinates": [
|
40
|
-
[
|
41
|
-
4.777421951293944,
|
42
|
-
44.00115001749186
|
43
|
-
],
|
44
|
-
[
|
45
|
-
4.78205680847168,
|
46
|
-
43.994111213373934
|
47
|
-
],
|
48
|
-
[
|
49
|
-
4.784030914306641,
|
50
|
-
43.99818641226534
|
51
|
-
],
|
52
|
-
[
|
53
|
-
4.787635803222656,
|
54
|
-
44.00077957493397
|
55
|
-
],
|
56
|
-
[
|
57
|
-
4.785747528076171,
|
58
|
-
44.00448389642906
|
59
|
-
],
|
60
|
-
[
|
61
|
-
4.790983200073242,
|
62
|
-
44.004669106432225
|
63
|
-
],
|
64
|
-
[
|
65
|
-
4.798364639282227,
|
66
|
-
44.008373185063874
|
67
|
-
],
|
68
|
-
[
|
69
|
-
4.793901443481445,
|
70
|
-
44.01528684632061
|
71
|
-
],
|
72
|
-
[
|
73
|
-
4.787378311157227,
|
74
|
-
44.01584237340163
|
75
|
-
],
|
76
|
-
[
|
77
|
-
4.785575866699219,
|
78
|
-
44.01960747533136
|
79
|
-
],
|
80
|
-
[
|
81
|
-
4.768667221069335,
|
82
|
-
44.01831131968508
|
83
|
-
],
|
84
|
-
[
|
85
|
-
4.763689041137695,
|
86
|
-
44.01460786170962
|
87
|
-
],
|
88
|
-
[
|
89
|
-
4.760427474975586,
|
90
|
-
44.01065725159039
|
91
|
-
],
|
92
|
-
[
|
93
|
-
4.770212173461914,
|
94
|
-
44.002940457248556
|
95
|
-
],
|
96
|
-
[
|
97
|
-
4.777421951293944,
|
98
|
-
44.00115001749186
|
99
|
-
]
|
100
|
-
]
|
101
|
-
},
|
102
|
-
{
|
103
|
-
"type": "LineString",
|
104
|
-
"coordinates": [
|
105
|
-
[
|
106
|
-
4.752960205078125,
|
107
|
-
43.93721446391471
|
108
|
-
],
|
109
|
-
[
|
110
|
-
4.744377136230469,
|
111
|
-
43.950068873803815
|
112
|
-
],
|
113
|
-
[
|
114
|
-
4.737510681152343,
|
115
|
-
43.97033364196856
|
116
|
-
],
|
117
|
-
[
|
118
|
-
4.7344207763671875,
|
119
|
-
43.98713332912919
|
120
|
-
],
|
121
|
-
[
|
122
|
-
4.7371673583984375,
|
123
|
-
44.00516299694704
|
124
|
-
],
|
125
|
-
[
|
126
|
-
4.743347167968749,
|
127
|
-
44.02195282780904
|
128
|
-
],
|
129
|
-
[
|
130
|
-
4.749870300292969,
|
131
|
-
44.037503870182896
|
132
|
-
],
|
133
|
-
[
|
134
|
-
4.755706787109375,
|
135
|
-
44.05379106204314
|
136
|
-
],
|
137
|
-
[
|
138
|
-
4.7646331787109375,
|
139
|
-
44.070073775703484
|
140
|
-
]
|
141
|
-
]
|
142
|
-
},
|
143
|
-
{
|
144
|
-
"type": "LineString",
|
145
|
-
"coordinates": [
|
146
|
-
[
|
147
|
-
4.7948455810546875,
|
148
|
-
43.95328204198018
|
149
|
-
],
|
150
|
-
[
|
151
|
-
4.801368713378906,
|
152
|
-
43.956989327857265
|
153
|
-
],
|
154
|
-
[
|
155
|
-
4.815788269042969,
|
156
|
-
43.9646503190861
|
157
|
-
],
|
158
|
-
[
|
159
|
-
4.82025146484375,
|
160
|
-
43.98614524381678
|
161
|
-
],
|
162
|
-
[
|
163
|
-
4.840850830078125,
|
164
|
-
43.98491011404692
|
165
|
-
],
|
166
|
-
[
|
167
|
-
4.845314025878906,
|
168
|
-
43.99479043262446
|
169
|
-
],
|
170
|
-
[
|
171
|
-
4.8538970947265625,
|
172
|
-
43.98367495857784
|
173
|
-
],
|
174
|
-
[
|
175
|
-
4.851493835449218,
|
176
|
-
43.967121395851485
|
177
|
-
],
|
178
|
-
[
|
179
|
-
4.8442840576171875,
|
180
|
-
43.96069638244953
|
181
|
-
],
|
182
|
-
[
|
183
|
-
4.829521179199219,
|
184
|
-
43.96069638244953
|
185
|
-
],
|
186
|
-
[
|
187
|
-
4.819221496582031,
|
188
|
-
43.95501213750488
|
189
|
-
],
|
190
|
-
[
|
191
|
-
4.805145263671875,
|
192
|
-
43.955506441260546
|
193
|
-
],
|
194
|
-
[
|
195
|
-
4.799995422363281,
|
196
|
-
43.952046228624724
|
197
|
-
]
|
198
|
-
]
|
199
|
-
}
|
200
|
-
]
|
201
|
-
}
|
data/spec/fixtures/document.pdf
DELETED
Binary file
|
@@ -1 +0,0 @@
|
|
1
|
-
["page 1, line 1\npage 1, line 2\npage 1, line 3\npage 1, line 4\npage 1, line 5\fpage 2, line 1\npage 2, line 2\npage 2, line 3\npage 2, line 4\npage 2, line 5\fpage 3, line 1\npage 3, line 2\npage 3, line 3\npage 3, line 4\npage 3, line 5",[74,149,225]]
|
data/spec/fixtures/new.html
DELETED
data/spec/fixtures/new.pdf
DELETED
Binary file
|
data/spec/fixtures/new.txt
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
fixture-txt-new
|
data/spec/fixtures/source.zip
DELETED
Binary file
|
data/spec/lib/aipp/airac_spec.rb
DELETED
@@ -1,98 +0,0 @@
|
|
1
|
-
require_relative '../../spec_helper'
|
2
|
-
|
3
|
-
describe AIPP::AIRAC do
|
4
|
-
describe :initialize do
|
5
|
-
it "won't accept invalid arguments" do
|
6
|
-
_{ AIPP::AIRAC.new(0) }.must_raise ArgumentError
|
7
|
-
_{ AIPP::AIRAC.new(AIPP::AIRAC::ROOT_DATE - 1) }.must_raise ArgumentError
|
8
|
-
end
|
9
|
-
end
|
10
|
-
|
11
|
-
context "on AIRAC date (as Date)" do
|
12
|
-
subject do
|
13
|
-
AIPP::AIRAC.new(Date.parse('2018-01-04'))
|
14
|
-
end
|
15
|
-
|
16
|
-
it "must calculate correct #date" do
|
17
|
-
_(subject.date).must_equal Date.parse('2018-01-04')
|
18
|
-
end
|
19
|
-
|
20
|
-
it "must calculate correct #id" do
|
21
|
-
_(subject.id).must_equal 1801
|
22
|
-
end
|
23
|
-
|
24
|
-
it "must calculate correct #next_date" do
|
25
|
-
_(subject.next_date).must_equal Date.parse('2018-02-01')
|
26
|
-
end
|
27
|
-
|
28
|
-
it "must calculate correct #next_id" do
|
29
|
-
_(subject.next_id).must_equal 1802
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
context "one day before AIRAC date (as String)" do
|
34
|
-
subject do
|
35
|
-
AIPP::AIRAC.new('2018-01-03')
|
36
|
-
end
|
37
|
-
|
38
|
-
it "must calculate correct #date" do
|
39
|
-
_(subject.date).must_equal Date.parse('2017-12-07')
|
40
|
-
end
|
41
|
-
|
42
|
-
it "must calculate correct #id" do
|
43
|
-
_(subject.id).must_equal 1713
|
44
|
-
end
|
45
|
-
|
46
|
-
it "must calculate correct #next_date" do
|
47
|
-
_(subject.next_date).must_equal Date.parse('2018-01-04')
|
48
|
-
end
|
49
|
-
|
50
|
-
it "must calculate correct #next_id" do
|
51
|
-
_(subject.next_id).must_equal 1801
|
52
|
-
end
|
53
|
-
end
|
54
|
-
|
55
|
-
context "one day after AIRAC date" do
|
56
|
-
subject do
|
57
|
-
AIPP::AIRAC.new(Date.parse('2018-01-05'))
|
58
|
-
end
|
59
|
-
|
60
|
-
it "must calculate correct #date" do
|
61
|
-
_(subject.date).must_equal Date.parse('2018-01-04')
|
62
|
-
end
|
63
|
-
|
64
|
-
it "must calculate correct #id" do
|
65
|
-
_(subject.id).must_equal 1801
|
66
|
-
end
|
67
|
-
|
68
|
-
it "must calculate correct #next_date" do
|
69
|
-
_(subject.next_date).must_equal Date.parse('2018-02-01')
|
70
|
-
end
|
71
|
-
|
72
|
-
it "must calculate correct #next_id" do
|
73
|
-
_(subject.next_id).must_equal 1802
|
74
|
-
end
|
75
|
-
end
|
76
|
-
|
77
|
-
context "end of year with 14 AIRAC cycles" do
|
78
|
-
subject do
|
79
|
-
AIPP::AIRAC.new(Date.parse('2020-12-31'))
|
80
|
-
end
|
81
|
-
|
82
|
-
it "must calculate correct #date" do
|
83
|
-
_(subject.date).must_equal Date.parse('2020-12-31')
|
84
|
-
end
|
85
|
-
|
86
|
-
it "must calculate correct #id" do
|
87
|
-
_(subject.id).must_equal 2014
|
88
|
-
end
|
89
|
-
|
90
|
-
it "must calculate correct #next_date" do
|
91
|
-
_(subject.next_date).must_equal Date.parse('2021-01-28')
|
92
|
-
end
|
93
|
-
|
94
|
-
it "must calculate correct #next_id" do
|
95
|
-
_(subject.next_id).must_equal 2101
|
96
|
-
end
|
97
|
-
end
|
98
|
-
end
|