genZPK 0.1.8 → 0.1.9
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.
- data/.idea/workspace.xml +14 -13
- data/bin/genZPK +19 -11
- data/lib/genZPK/version.rb +1 -1
- metadata +1 -1
data/.idea/workspace.xml
CHANGED
@@ -36,25 +36,25 @@
|
|
36
36
|
<file leaf-file-name="genZPK.rb" pinned="false" current="false" current-in-tab="false">
|
37
37
|
<entry file="file://$PROJECT_DIR$/lib/genZPK.rb">
|
38
38
|
<provider selected="true" editor-type-id="text-editor">
|
39
|
-
<state line="100" column="13" selection-start="2353" selection-end="2353" vertical-scroll-proportion="0.0" vertical-offset="
|
39
|
+
<state line="100" column="13" selection-start="2353" selection-end="2353" vertical-scroll-proportion="0.0" vertical-offset="663" max-vertical-offset="2465">
|
40
40
|
<folding />
|
41
41
|
</state>
|
42
42
|
</provider>
|
43
43
|
</entry>
|
44
44
|
</file>
|
45
|
-
<file leaf-file-name="genZPK" pinned="false" current="
|
45
|
+
<file leaf-file-name="genZPK" pinned="false" current="false" current-in-tab="false">
|
46
46
|
<entry file="file://$PROJECT_DIR$/bin/genZPK">
|
47
47
|
<provider selected="true" editor-type-id="text-editor">
|
48
|
-
<state line="
|
48
|
+
<state line="229" column="14" selection-start="7023" selection-end="7023" vertical-scroll-proportion="0.0" vertical-offset="3502" max-vertical-offset="5627">
|
49
49
|
<folding />
|
50
50
|
</state>
|
51
51
|
</provider>
|
52
52
|
</entry>
|
53
53
|
</file>
|
54
|
-
<file leaf-file-name="version.rb" pinned="false" current="
|
54
|
+
<file leaf-file-name="version.rb" pinned="false" current="true" current-in-tab="true">
|
55
55
|
<entry file="file://$PROJECT_DIR$/lib/genZPK/version.rb">
|
56
56
|
<provider selected="true" editor-type-id="text-editor">
|
57
|
-
<state line="1" column="18" selection-start="32" selection-end="32" vertical-scroll-proportion="0.
|
57
|
+
<state line="1" column="18" selection-start="32" selection-end="32" vertical-scroll-proportion="0.025993884" vertical-offset="0" max-vertical-offset="654">
|
58
58
|
<folding />
|
59
59
|
</state>
|
60
60
|
</provider>
|
@@ -63,7 +63,7 @@
|
|
63
63
|
<file leaf-file-name="test.xml" pinned="false" current="false" current-in-tab="false">
|
64
64
|
<entry file="file://$PROJECT_DIR$/test.xml">
|
65
65
|
<provider selected="true" editor-type-id="text-editor">
|
66
|
-
<state line="
|
66
|
+
<state line="34" column="21" selection-start="1590" selection-end="1590" vertical-scroll-proportion="0.0" vertical-offset="3774" max-vertical-offset="6851">
|
67
67
|
<folding />
|
68
68
|
</state>
|
69
69
|
</provider>
|
@@ -105,8 +105,8 @@
|
|
105
105
|
<option value="$PROJECT_DIR$/lib/genZPK/templates.rb" />
|
106
106
|
<option value="$PROJECT_DIR$/lib/genZPK.rb" />
|
107
107
|
<option value="$PROJECT_DIR$/test.xml" />
|
108
|
-
<option value="$PROJECT_DIR$/lib/genZPK/version.rb" />
|
109
108
|
<option value="$PROJECT_DIR$/bin/genZPK" />
|
109
|
+
<option value="$PROJECT_DIR$/lib/genZPK/version.rb" />
|
110
110
|
</list>
|
111
111
|
</option>
|
112
112
|
</component>
|
@@ -331,6 +331,7 @@
|
|
331
331
|
<frame x="56" y="-8" width="1872" height="1096" extended-state="6" />
|
332
332
|
<editor active="true" />
|
333
333
|
<layout>
|
334
|
+
<window_info id="Documentation" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="FLOATING" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" x="156" y="92" width="1672" height="896" />
|
334
335
|
<window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
335
336
|
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3275862" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
336
337
|
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
|
@@ -691,23 +692,23 @@
|
|
691
692
|
</state>
|
692
693
|
</provider>
|
693
694
|
</entry>
|
694
|
-
<entry file="file://$PROJECT_DIR$/
|
695
|
+
<entry file="file://$PROJECT_DIR$/test.xml">
|
695
696
|
<provider selected="true" editor-type-id="text-editor">
|
696
|
-
<state line="
|
697
|
+
<state line="34" column="21" selection-start="1590" selection-end="1590" vertical-scroll-proportion="0.0" vertical-offset="3774" max-vertical-offset="6851">
|
697
698
|
<folding />
|
698
699
|
</state>
|
699
700
|
</provider>
|
700
701
|
</entry>
|
701
|
-
<entry file="file://$PROJECT_DIR$/
|
702
|
+
<entry file="file://$PROJECT_DIR$/bin/genZPK">
|
702
703
|
<provider selected="true" editor-type-id="text-editor">
|
703
|
-
<state line="
|
704
|
+
<state line="229" column="14" selection-start="7023" selection-end="7023" vertical-scroll-proportion="0.0" vertical-offset="3502" max-vertical-offset="5627">
|
704
705
|
<folding />
|
705
706
|
</state>
|
706
707
|
</provider>
|
707
708
|
</entry>
|
708
|
-
<entry file="file://$PROJECT_DIR$/
|
709
|
+
<entry file="file://$PROJECT_DIR$/lib/genZPK/version.rb">
|
709
710
|
<provider selected="true" editor-type-id="text-editor">
|
710
|
-
<state line="
|
711
|
+
<state line="1" column="18" selection-start="32" selection-end="32" vertical-scroll-proportion="0.025993884" vertical-offset="0" max-vertical-offset="654">
|
711
712
|
<folding />
|
712
713
|
</state>
|
713
714
|
</provider>
|
data/bin/genZPK
CHANGED
@@ -54,7 +54,7 @@ rescue OptionParser::InvalidOption
|
|
54
54
|
exit -1
|
55
55
|
end
|
56
56
|
|
57
|
-
dir = String(ARGV[0]).end_with?('/') ? String(ARGV[0])
|
57
|
+
dir = String(ARGV[0]).end_with?('/') ? String(ARGV[0]) : String(ARGV[0]) + "/"
|
58
58
|
|
59
59
|
requireCondition File.exists?(File.expand_path '~/.genZPK/checks.xml'), "Unable to locate configuration files. Please run genZPK --configure"
|
60
60
|
requireCondition (File.read(File.expand_path('~/.genZPK/checks.xml')).gsub(/\s+/, "") != ""), "Configuration empty. Please run genZPK --configure"
|
@@ -209,7 +209,7 @@ for i in 0..(subdomainChecks.size - 1)
|
|
209
209
|
fieldPasses = 0
|
210
210
|
|
211
211
|
check.each do |field, value|
|
212
|
-
if
|
212
|
+
if field != "path"
|
213
213
|
if not configHash["definitions"]["definition"][field].nil?
|
214
214
|
begin
|
215
215
|
regex = /#{configHash["definitions"]["definition"][field]["regex"]["content"]}/
|
@@ -221,17 +221,25 @@ for i in 0..(subdomainChecks.size - 1)
|
|
221
221
|
matchgrp = Integer(configHash["definitions"]["definition"][field]["regex"]["group"]) - 1
|
222
222
|
matches = contents.scan(regex)
|
223
223
|
|
224
|
-
if matches
|
225
|
-
fieldPasses += 1
|
226
|
-
else
|
224
|
+
if matches == []
|
227
225
|
if display.end_with? "\n"
|
228
|
-
display << "\tField
|
229
|
-
|
230
|
-
display << "\
|
226
|
+
display << "\tField not found in file: #{field}\n"
|
227
|
+
else
|
228
|
+
display << "\n\tField not found in file: #{field}\n"
|
229
|
+
end
|
230
|
+
else
|
231
|
+
if matches[0][matchgrp] == value
|
232
|
+
fieldPasses += 1
|
231
233
|
else
|
232
|
-
display
|
233
|
-
|
234
|
-
|
234
|
+
if display.end_with? "\n"
|
235
|
+
display << "\tField Failed: #{field}\n"
|
236
|
+
display << "\t\tValue: #{matches[0][0]}\n"
|
237
|
+
display << "\t\tDefined value: #{value}\n"
|
238
|
+
else
|
239
|
+
display << "\n\tField Failed: #{field}\n"
|
240
|
+
display << "\t\tValue: #{matches[0][0]}\n"
|
241
|
+
display << "\t\tDefined value: #{value}\n"
|
242
|
+
end
|
235
243
|
end
|
236
244
|
end
|
237
245
|
else
|
data/lib/genZPK/version.rb
CHANGED