nyx 1.3.1 → 1.3.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/nyx.rb +22 -2
  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.1'
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 |key, value|
113
+ files.each do |value|
94
114
  if value.kind_of? Array
95
115
  cleaned_files.push value[1]
96
116
  else # not array
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nyx
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.3.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: