aipp 2.1.0 → 2.1.1
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 +3 -2
- data/CHANGELOG.md +6 -0
- data/lib/aipp/executable.rb +21 -4
- data/lib/aipp/runner.rb +7 -3
- data/lib/aipp/scopes/aip/executable.rb +1 -1
- data/lib/aipp/scopes/aip/runner.rb +1 -3
- data/lib/aipp/scopes/notam/runner.rb +1 -3
- data/lib/aipp/scopes/shoot/runner.rb +1 -3
- data/lib/aipp/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +3 -3
- 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: 5a3f910ee20e31b9a2d0ee0644714c43898917cd9fda36bb5f721c17fcb758be
|
4
|
+
data.tar.gz: a996dd39757199cdadd5ceab2c7014b871785c857dc2054c4d9e5c264b16b5a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8cea4595823cf29656e25e252e205007de55a74240c1bca96f47ccd4e69194a112cb4665da0c784c24289f2d117d9b04e1a43625f86820763553a04bde03ab0
|
7
|
+
data.tar.gz: 7b3ae6c428f88231456a94a882c51ec8c5436bd2ff1398e61a0465b48939ccc3a443ff20ab98039a9ee9fc1ac2a5b70cbbc54ebdf29f9712a84a35460250b312
|
checksums.yaml.gz.sig
CHANGED
@@ -1,2 +1,3 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
�(��F���S�> *���
|
2
|
+
ͻ��\��� k��1�<��>%���#cu�Q�L��Y+<��`%e��#�{k 2�'���M�����&a����*�ɝ7W��T��L��fX�Oki<i�����{��i�+�ޔ
|
3
|
+
r�}��Q==J����ÑeF��0*L2��!���?���r�L�������
|
data/CHANGELOG.md
CHANGED
data/lib/aipp/executable.rb
CHANGED
@@ -5,30 +5,35 @@ module AIPP
|
|
5
5
|
include AIPP::Debugger
|
6
6
|
|
7
7
|
def initialize(exe_file)
|
8
|
+
@exe_file = exe_file
|
9
|
+
help if ARGV.none? || ARGV.first == '--help'
|
8
10
|
require_scope
|
9
11
|
AIPP.options.replace(
|
10
12
|
scope: scope,
|
11
|
-
schema:
|
13
|
+
schema: schema,
|
12
14
|
storage: Pathname(Dir.home).join('.aipp'),
|
15
|
+
check_links: false,
|
13
16
|
clean: false,
|
14
17
|
force: false,
|
15
18
|
mid: false,
|
19
|
+
write_empty: false,
|
16
20
|
quiet: false,
|
17
21
|
verbose: false,
|
18
22
|
debug_on_warning: false,
|
19
23
|
debug_on_error: false
|
20
24
|
)
|
21
|
-
options
|
25
|
+
options if respond_to? :options
|
22
26
|
OptionParser.new do |o|
|
23
27
|
o.on('-r', '--region STRING', String, 'region (e.g. "LF")') { AIPP.options.region = _1.upcase }
|
24
28
|
o.on('-s', '--section STRING', String, 'process this section only') { AIPP.options.section = _1.classify }
|
25
29
|
o.on('-d', '--storage DIR', String, 'storage directory (default: "~/.aipp")') { AIPP.options.storage = Pathname(_1) }
|
26
30
|
o.on('-o', '--output FILE', String, 'output file') { AIPP.options.output_file = _1 }
|
27
31
|
option_parser(o)
|
28
|
-
if
|
32
|
+
if schema == :ofmx
|
29
33
|
o.on('-m', '--[no-]mid', 'insert mid attributes into all Uid elements (default: false)') { AIPP.options.mid = _1 }
|
34
|
+
o.on('-0', '--[no-]empty', 'write empty OFMX files in case of no upstream data (default: false)') { AIPP.options.write_empty = _1 }
|
30
35
|
end
|
31
|
-
o.on('-h', '--[no-]check-links', 'check all links with HEAD requests') { AIPP.options.check_links = _1 }
|
36
|
+
o.on('-h', '--[no-]check-links', 'check all links with HEAD requests (default: false)') { AIPP.options.check_links = _1 }
|
32
37
|
o.on('-c', '--[no-]clean', 'clean cache and download from sources anew (default: false)') { AIPP.options.clean = _1 }
|
33
38
|
o.on('-f', '--[no-]force', 'continue on non-fatal errors (default: false)') { AIPP.options.force = _1 }
|
34
39
|
o.on('-q', '--[no-]quiet', 'suppress all informational output (default: false)') { AIPP.options.quiet = _1 }
|
@@ -55,6 +60,14 @@ module AIPP
|
|
55
60
|
|
56
61
|
private
|
57
62
|
|
63
|
+
def help
|
64
|
+
puts <<~END
|
65
|
+
Download online aeronautical data and convert it to #{schema.upcase}.
|
66
|
+
Usage: #{File.basename($0)} [aip|notam|shoot] --help
|
67
|
+
END
|
68
|
+
exit
|
69
|
+
end
|
70
|
+
|
58
71
|
def about
|
59
72
|
puts 'Written by Sven Schwyn (bitcetera.com) and distributed under MIT license.'
|
60
73
|
exit
|
@@ -90,6 +103,10 @@ module AIPP
|
|
90
103
|
Pathname(__FILE__).dirname
|
91
104
|
end
|
92
105
|
|
106
|
+
def schema
|
107
|
+
@schema ||= @exe_file.split('2').last.to_sym
|
108
|
+
end
|
109
|
+
|
93
110
|
def scope
|
94
111
|
@scope ||= ARGV.first.match?(/^-/) ? 'AIP' : ARGV.shift.upcase
|
95
112
|
end
|
data/lib/aipp/runner.rb
CHANGED
@@ -128,9 +128,13 @@ module AIPP
|
|
128
128
|
|
129
129
|
# Write the AIXM document.
|
130
130
|
def write_aixm(file)
|
131
|
-
|
132
|
-
|
133
|
-
|
131
|
+
if aixm.features.any? || AIPP.options.write_empty
|
132
|
+
info("writing #{file}")
|
133
|
+
AIXM.config.mid = AIPP.options.mid
|
134
|
+
File.write(file, aixm.to_xml)
|
135
|
+
else
|
136
|
+
info("no features to write")
|
137
|
+
end
|
134
138
|
end
|
135
139
|
|
136
140
|
# Write build information.
|
@@ -14,7 +14,7 @@ module AIPP
|
|
14
14
|
def option_parser(o)
|
15
15
|
o.banner = <<~END
|
16
16
|
Download online AIP and convert it to #{AIPP.options.schema.upcase}.
|
17
|
-
Usage: #{File.basename($0)} [options]
|
17
|
+
Usage: #{File.basename($0)} [aip] [options]
|
18
18
|
END
|
19
19
|
o.on('-a', '--airac (DATE|INTEGER)', String, %Q[AIRAC date or delta e.g. "+1" (default: "#{AIPP.options.airac.date.xmlschema}")]) { AIPP.options.airac = airac_for(_1) }
|
20
20
|
if AIPP.options.schema == :ofmx
|
@@ -19,10 +19,8 @@ module AIPP
|
|
19
19
|
parse_sections
|
20
20
|
if aixm.features.any?
|
21
21
|
validate_aixm
|
22
|
-
write_aixm(AIPP.options.output_file || output_file)
|
23
|
-
else
|
24
|
-
warn("no features to write")
|
25
22
|
end
|
23
|
+
write_aixm(AIPP.options.output_file || output_file)
|
26
24
|
write_config
|
27
25
|
end
|
28
26
|
|
@@ -19,10 +19,8 @@ module AIPP
|
|
19
19
|
parse_sections
|
20
20
|
if aixm.features.any?
|
21
21
|
validate_aixm
|
22
|
-
write_aixm(AIPP.options.output_file || output_file)
|
23
|
-
else
|
24
|
-
warn("no features to write")
|
25
22
|
end
|
23
|
+
write_aixm(AIPP.options.output_file || output_file)
|
26
24
|
write_config
|
27
25
|
end
|
28
26
|
|
data/lib/aipp/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: aipp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sven Schwyn
|
@@ -60,7 +60,7 @@ dependencies:
|
|
60
60
|
version: '1'
|
61
61
|
- - ">="
|
62
62
|
- !ruby/object:Gem::Version
|
63
|
-
version: 1.4.
|
63
|
+
version: 1.4.1
|
64
64
|
type: :runtime
|
65
65
|
prerelease: false
|
66
66
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -70,7 +70,7 @@ dependencies:
|
|
70
70
|
version: '1'
|
71
71
|
- - ">="
|
72
72
|
- !ruby/object:Gem::Version
|
73
|
-
version: 1.4.
|
73
|
+
version: 1.4.1
|
74
74
|
- !ruby/object:Gem::Dependency
|
75
75
|
name: notam
|
76
76
|
requirement: !ruby/object:Gem::Requirement
|
metadata.gz.sig
CHANGED
Binary file
|