dgd-tools 0.1.10 → 0.1.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dgd-tools/manifest.rb +9 -6
- data/lib/dgd-tools/version.rb +1 -1
- 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: 838abb7957cb56eb3f096e8e345b3afda6d12db91a6110b7fa07029d589124d5
|
4
|
+
data.tar.gz: aa0a2551b3763eb418f99352cb0d40d58bcae92ff50bfce31bff22c644ae7019
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a661db27d13a97f9086c7802769e1a08ac3f21f7c120f8bea6a6efe6e332a3d2ecb7e2571e0020dd36c8188019af907023662e248c1c1ffadfd9ee3c1b9c5b2a
|
7
|
+
data.tar.gz: 15e3742398cb16222e176dc5bc9385445219e23fce1a0cdf9205ced86ad47570c4c422d637734386f6f79e154282c3f57cf02784f9e4238f1ec8208dc4944878
|
data/lib/dgd-tools/manifest.rb
CHANGED
@@ -562,15 +562,18 @@ FILE_CONTENTS
|
|
562
562
|
|
563
563
|
def config_to_ports(data)
|
564
564
|
if data.is_a?(Hash)
|
565
|
-
|
566
|
-
return data
|
565
|
+
return data.map { |ip, port| [ip, Integer(port) ] }
|
567
566
|
elsif data.is_a?(Array)
|
568
|
-
|
569
|
-
|
570
|
-
|
567
|
+
if data[0].is_a?(Array)
|
568
|
+
ports = data.map { |ip, port| [ip, Integer(port) ] }
|
569
|
+
return ports
|
570
|
+
end
|
571
|
+
|
572
|
+
ports = data.map { |p| [ "*", Integer(p) ] }
|
573
|
+
STDERR.puts "Arrayified: #{ports.inspect}"
|
571
574
|
return ports
|
572
575
|
elsif data.is_a?(Integer)
|
573
|
-
return
|
576
|
+
return [ [ "*", data ] ]
|
574
577
|
else
|
575
578
|
raise "dgd-manifest: not sure how to get port data from a #{data.class.name} -- #{data.inspect}!"
|
576
579
|
end
|
data/lib/dgd-tools/version.rb
CHANGED