nyx 1.3.1 → 1.3.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.
- data/lib/nyx.rb +22 -2
- metadata +1 -1
data/lib/nyx.rb
CHANGED
@@ -12,7 +12,7 @@ require 'fssm'
|
|
12
12
|
|
13
13
|
class Nyx
|
14
14
|
|
15
|
-
VERSION = '1.3.
|
15
|
+
VERSION = '1.3.3'
|
16
16
|
|
17
17
|
def compile_scripts(args = nil)
|
18
18
|
|
@@ -56,6 +56,26 @@ class Nyx
|
|
56
56
|
def read_script_configuration(dirpath)
|
57
57
|
conf = self.mjolnir_config(dirpath, '+scripts.php');
|
58
58
|
|
59
|
+
# normalize targeted common
|
60
|
+
if ! conf['targeted-common'].is_a?(Array)
|
61
|
+
temp = [];
|
62
|
+
conf['targeted-common'].each do |key, file|
|
63
|
+
temp.push(file)
|
64
|
+
end#each
|
65
|
+
conf['targeted-common'] = temp;
|
66
|
+
end#if
|
67
|
+
|
68
|
+
# normalize targeted mapping
|
69
|
+
conf['targeted-mapping'].each do |key, files|
|
70
|
+
if ! files.is_a?(Array) && ! files.is_a?(String)
|
71
|
+
temp = [];
|
72
|
+
files.each do |key, file|
|
73
|
+
temp.push(file)
|
74
|
+
end#each
|
75
|
+
conf['targeted-mapping'][key] = temp;
|
76
|
+
end#if
|
77
|
+
end#each
|
78
|
+
|
59
79
|
if conf['targeted-common'] == nil
|
60
80
|
conf['targeted-common'] = [];
|
61
81
|
else # not nil
|
@@ -90,7 +110,7 @@ class Nyx
|
|
90
110
|
item !~ /(^[a-z]+:\/\/|^\/\/).*$/
|
91
111
|
end#find_all
|
92
112
|
cleaned_files = []
|
93
|
-
files.each do |
|
113
|
+
files.each do |value|
|
94
114
|
if value.kind_of? Array
|
95
115
|
cleaned_files.push value[1]
|
96
116
|
else # not array
|