aixm 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +1 -1
- data/lib/aixm/feature/airspace.rb +4 -4
- data/lib/aixm/feature/navigational_aid/base.rb +3 -3
- data/lib/aixm/feature/navigational_aid/designated_point.rb +2 -2
- data/lib/aixm/feature/navigational_aid/dme.rb +1 -1
- data/lib/aixm/feature/navigational_aid/marker.rb +1 -1
- data/lib/aixm/feature/navigational_aid/ndb.rb +1 -1
- data/lib/aixm/feature/navigational_aid/tacan.rb +1 -1
- data/lib/aixm/feature/navigational_aid/vor.rb +1 -1
- data/lib/aixm/version.rb +1 -1
- data/spec/lib/aixm/feature/navigational_aid/base_spec.rb +4 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 273c3a151ac0b4c91488692c47918ba3ca36e044e4d1392ba48b98d2ad45f08e
|
4
|
+
data.tar.gz: 4dca28d512bd61ea981ea7e24889e6796b5eeab8ee950e7859bb4b6604848d50
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87471ca95b1590688987f08d7c40c910f63395cb2ab109947acd8be0d28ad704e4a7ff82facb3c510253349dc083de93866f91cc9f750472ef8782019f36a628
|
7
|
+
data.tar.gz: f1004c94f130cdb333863701746b20eaa23fd36e7ddabfc60c37ad156d49c1f30753663bdcc2a32a60cc8ff3d462f6ad8b23ec649d0d0a4be4d9e3a1bb322463
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -23,17 +23,17 @@ module AIXM
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def name=(value)
|
26
|
-
fail(
|
26
|
+
fail(ArgumentError, "invalid name") unless value.is_a? String
|
27
27
|
@name = value.uptrans
|
28
28
|
end
|
29
29
|
|
30
30
|
def short_name=(value)
|
31
|
-
fail(
|
31
|
+
fail(ArgumentError, "invalid short name") unless value.nil? || value.is_a?(String)
|
32
32
|
@short_name = value&.uptrans
|
33
33
|
end
|
34
34
|
|
35
35
|
def type=(value)
|
36
|
-
fail(
|
36
|
+
fail(ArgumentError, "invalid type") unless value.is_a?(String)
|
37
37
|
@type = value.upcase
|
38
38
|
end
|
39
39
|
|
@@ -43,7 +43,7 @@ module AIXM
|
|
43
43
|
end
|
44
44
|
|
45
45
|
def remarks=(value)
|
46
|
-
fail(
|
46
|
+
fail(ArgumentError, "invalid remarks") unless value.is_a?(String)
|
47
47
|
@remarks = value
|
48
48
|
end
|
49
49
|
|
@@ -13,7 +13,7 @@ module AIXM
|
|
13
13
|
|
14
14
|
private_class_method :new
|
15
15
|
|
16
|
-
def initialize(id:, name
|
16
|
+
def initialize(id:, name: nil, xy:, z: nil)
|
17
17
|
self.id, self.name, self.xy, self.z = id, name, xy, z
|
18
18
|
end
|
19
19
|
|
@@ -23,8 +23,8 @@ module AIXM
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def name=(value)
|
26
|
-
fail(ArgumentError, "invalid name") unless value.is_a?
|
27
|
-
@name = value
|
26
|
+
fail(ArgumentError, "invalid name") unless value.nil? || value.is_a?(String)
|
27
|
+
@name = value&.upcase
|
28
28
|
end
|
29
29
|
|
30
30
|
def xy=(value)
|
@@ -23,7 +23,7 @@ module AIXM
|
|
23
23
|
|
24
24
|
public_class_method :new
|
25
25
|
|
26
|
-
def initialize(id:, name
|
26
|
+
def initialize(id:, name: nil, xy:, z: nil, type:)
|
27
27
|
super(id: id, name: name, xy: xy, z: z)
|
28
28
|
self.type = type
|
29
29
|
end
|
@@ -60,7 +60,7 @@ module AIXM
|
|
60
60
|
builder.Dpn do |dpn|
|
61
61
|
dpn << to_uid(*extensions).indent(2)
|
62
62
|
dpn.OrgUid
|
63
|
-
dpn.txtName(name)
|
63
|
+
dpn.txtName(name) if name
|
64
64
|
dpn.codeDatum('WGE')
|
65
65
|
dpn.codeType(type_key.to_s)
|
66
66
|
if z
|
data/lib/aixm/version.rb
CHANGED
@@ -12,6 +12,10 @@ describe AIXM::Feature::NavigationalAid::Base do
|
|
12
12
|
-> { base.send(:new, id: 'id', name: 'name', xy: AIXM::Factory.xy, z: AIXM.z(1, :qne)) }.must_raise ArgumentError
|
13
13
|
end
|
14
14
|
|
15
|
+
it "accepts name to be nil" do
|
16
|
+
base.send(:new, id: 'id', xy: AIXM::Factory.xy).name.must_be_nil
|
17
|
+
end
|
18
|
+
|
15
19
|
context "downcase attributes" do
|
16
20
|
subject do
|
17
21
|
base.send(:new, id: 'id', name: 'name', xy: AIXM::Factory.xy)
|