forecast 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/forecast/config.rb +3 -3
- data/lib/forecast/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
Njg4ZDc4NzYyNGY2NTZhYjUzYWQxY2U0YWI4MjNiNzk2YzM2ZDlkMA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NzU1ZjUwMWI5ZTlhN2NhYWY3ZDlhZWU5MTBhN2RjNzhlYWI3ZTFhNQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZTMzMDA4ODBiMTJiZjU3MTY1NjYxOGNmNDE4OTc5MTQ2ZjM4YjEyNmYzZDk2
|
10
|
+
M2YzNDM2ZWJhOTY3YjEwMmNlNTVmYTZmMzBmZDQwYWFmMTc1NTFjNTRiMTgx
|
11
|
+
NjgxZGYzNjBkODg2ZTA1ZDA3MzVkMmZjYWZhZmNjYTc5YjFiNzQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
Y2MxYjg0ZWI3NjY0YjRiNTAxYjk2NDNhNDA4MjAyZGI0NTA1YmVkZDUwY2Q3
|
14
|
+
YWQ5NjFjMzI1OTU2ZTQ1MTY1YTA2ZmNmY2VkZTcwMjMxMTQ3MjI2YTc5ZmUw
|
15
|
+
ZDhlYjAwZjRjM2ZiMTM5YjE1YjQ4MjU4YzZiMzZiOTdjNDdiOTY=
|
data/lib/forecast/config.rb
CHANGED
@@ -25,14 +25,15 @@ class Forecast
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def load(pattern)
|
28
|
+
# puts 'load forecast pattern ' + pattern.to_s
|
28
29
|
Dir.glob(pattern).sort{ |a, b| a.split(/\//).length <=> b.split(/\//).length}.reverse.each do |f|
|
29
30
|
obj = YAML.load_file(f)
|
30
|
-
puts 'load forecast config ' + f.to_s
|
31
|
+
# puts 'load forecast config ' + f.to_s
|
31
32
|
if obj['forecast'] != nil
|
32
33
|
obj['forecast'].each do |k, v|
|
33
34
|
if respond_to?("#{k}")
|
34
35
|
o = send("#{k}")
|
35
|
-
if o.is_a?(Hash)
|
36
|
+
if v.is_a?(Hash) && o.is_a?(Hash)
|
36
37
|
v = deep_merge(o, v)
|
37
38
|
end
|
38
39
|
end
|
@@ -66,7 +67,6 @@ class Forecast
|
|
66
67
|
yield self.config
|
67
68
|
# puts 'configured'
|
68
69
|
if self.config.config_file != nil
|
69
|
-
puts '**** load config from file'
|
70
70
|
self.config.load(self.config.config_file)
|
71
71
|
end
|
72
72
|
end
|
data/lib/forecast/version.rb
CHANGED