fulmar 1.6.2 → 1.6.3
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2ce3e863c6645eee3a35494dda21e7a3551371a4
|
4
|
+
data.tar.gz: 7e9a4145d5ed01256cfcefe023416262d0bfa83e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86e8fe91f3ee252bc3d8d29d5a510d93c527ae44ee60ced123e9f5535b379ee4777434da2d2cbc0eaf6d7c8dfb020569c0612e4aab56099e86bc04fe5dc39121
|
7
|
+
data.tar.gz: 24e39441d9abe4843cb2185dda0c8ce11b395243ce575ccf0850256f4dc6ed00c3c23a55df4acf74299cf493a629a2f990e395b86e389f81a31755f67b03a751
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'yaml'
|
2
|
+
require 'pp'
|
2
3
|
|
3
4
|
module Fulmar
|
4
5
|
module Domain
|
@@ -172,7 +173,14 @@ module Fulmar
|
|
172
173
|
@config = @config.deep_merge((YAML.load_file(config_file) || {}).symbolize)
|
173
174
|
end
|
174
175
|
|
176
|
+
prepare_environments
|
177
|
+
prepare_dependencies
|
175
178
|
# Iterate over all environments and targets to prepare them
|
179
|
+
@config[:environments].delete(:all)
|
180
|
+
@config
|
181
|
+
end
|
182
|
+
|
183
|
+
def prepare_environments
|
176
184
|
@config[:environments].each_key do |env|
|
177
185
|
next if env == :all
|
178
186
|
@config[:environments][env].each_key do |target|
|
@@ -180,8 +188,16 @@ module Fulmar
|
|
180
188
|
check_path(env, target)
|
181
189
|
end
|
182
190
|
end
|
183
|
-
|
184
|
-
|
191
|
+
end
|
192
|
+
|
193
|
+
def prepare_dependencies
|
194
|
+
@config[:dependencies].each_pair do |_env, repos|
|
195
|
+
repos.each_pair do |_name, repo|
|
196
|
+
next if repo[:path].blank?
|
197
|
+
full_path = File.expand_path("#{base_path}/#{repo[:path]}")
|
198
|
+
repo[:path] = full_path unless repo[:path][0,1] == '/'
|
199
|
+
end
|
200
|
+
end
|
185
201
|
end
|
186
202
|
|
187
203
|
def check_path(env, target)
|
@@ -34,7 +34,7 @@ module Fulmar
|
|
34
34
|
end
|
35
35
|
|
36
36
|
# Pull
|
37
|
-
shell = Fulmar::Infrastructure::Service::ShellService.new
|
37
|
+
shell = Fulmar::Infrastructure::Service::ShellService.new data[:path]
|
38
38
|
unless shell.run 'git pull --rebase -q'
|
39
39
|
fail "Cannot update repository #{data[:path]}. Please update manually."
|
40
40
|
end
|
data/lib/fulmar/version.rb
CHANGED