vipnet_parser 2.4.2 → 2.4.3
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/lib/vipnet_parser/iplirconf.rb +8 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 61b4195ee76f1fa2f930b5567cec66bfddc7058e
|
|
4
|
+
data.tar.gz: eee60cb3b85ab6ebaecb915986c7895955717927
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ac521d3c9799f8768453b5670cba8fd8b8f73064ef36ef1255fde11bd72d46e04335c2488efb249b874d05ae5da332e7ff6f07e28082b5ab44118f58277317fe
|
|
7
|
+
data.tar.gz: 66517ae457ac1d19f0789739710a3bbf88784c74827f36f0220a2ddb4b9a5968b5b52f4677e5d679b8f09e0d98e6ee281db8a2f5a91aae8d628a2eee251c6b86
|
|
@@ -11,6 +11,14 @@ module VipnetParser
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
def parse(args = DEFAULT_PARSE_ARGS)
|
|
14
|
+
unless self.string
|
|
15
|
+
case format
|
|
16
|
+
when :hash
|
|
17
|
+
@hash = {}
|
|
18
|
+
return
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
|
|
14
22
|
args = DEFAULT_PARSE_ARGS.merge(args)
|
|
15
23
|
format, encoding, normalize_names = args.values_at(
|
|
16
24
|
:format, :encoding, :normalize_names,
|
|
@@ -81,7 +89,6 @@ module VipnetParser
|
|
|
81
89
|
|
|
82
90
|
# Returns config version.
|
|
83
91
|
def version
|
|
84
|
-
return nil unless self.string
|
|
85
92
|
self.parse(format: :hash) unless self.hash
|
|
86
93
|
return nil if self.hash.empty?
|
|
87
94
|
config_version = self.hash[:misc][:config_version]
|