brpm_content 0.1.36 → 0.1.37
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.
- checksums.yaml +8 -8
- data/modules/framework/brpm_auto.rb +12 -12
- data/modules/framework/config.yml +1 -1
- data/modules/framework/lib/module_installer.rb +7 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YTBkYWIzNTNiYWUyYjUxMTg2YzgxYmY0ZjgwZTQyZWVmYjZmY2M4ZA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
OGNmYThiOGIwYzM0NWI0ZGM5MTkyYjg4YWE1YjIwYjc2OWQ1MTFjYw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MzlmOTYyOWRkNmQ2YTg3ZmJkOTMzYzk1MjllNmJiZmY2MDYwNTE2ZjJhNzQ5
|
10
|
+
OWUyYmU4NzEyY2EwNGJlMDllNmEwNDY3ZTUwMTUyY2ZmYjkyYzM2ZDQzZWJj
|
11
|
+
MmQ1ZDAyOTA3MGM3NzMyYjBiYjBkNzdkMjVmMGVlMWI1NmQ1YmY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MDIwODY0NDg5ODI4MWQ2ZDYxNTY3MTQ2Yjg2NzJmNzYzZTBiYjJlZmFiNjE2
|
14
|
+
MmQ0ZmRiNGU3YWI0OTg0NDMxNjI4M2VhNDk4YTBiNzVkMjUwODNjNmU3NWQ0
|
15
|
+
OGEyYTkzYjNjYzlkMjJlYjllMTQ5ZDM3NDNkNjhjN2Q5MDEwYjE=
|
@@ -218,6 +218,18 @@ class BrpmAuto
|
|
218
218
|
@integration_settings = IntegrationSettings.new(dns, username, password, details)
|
219
219
|
end
|
220
220
|
|
221
|
+
def get_gems_root_path
|
222
|
+
if ENV["BRPM_CONTENT_HOME"]
|
223
|
+
ENV["BRPM_CONTENT_HOME"] # gemset location is overridden
|
224
|
+
elsif ENV["BRPM_HOME"]
|
225
|
+
"#{ENV["BRPM_HOME"]}/modules" # default gemset location when BRPM is installed
|
226
|
+
elsif ENV["GEM_HOME"]
|
227
|
+
ENV["GEM_HOME"] # default gemset location when BRPM is not installed
|
228
|
+
else
|
229
|
+
raise "Unable to find out the gems root path."
|
230
|
+
end
|
231
|
+
end
|
232
|
+
|
221
233
|
private
|
222
234
|
|
223
235
|
def require_module_internal(module_name, module_version)
|
@@ -271,18 +283,6 @@ class BrpmAuto
|
|
271
283
|
YAML.load_file(File.expand_path("#{File.dirname(__FILE__)}/config.yml"))
|
272
284
|
end
|
273
285
|
|
274
|
-
def get_gems_root_path
|
275
|
-
if ENV["BRPM_CONTENT_HOME"]
|
276
|
-
ENV["BRPM_CONTENT_HOME"] # gemset location is overridden
|
277
|
-
elsif ENV["BRPM_HOME"]
|
278
|
-
"#{ENV["BRPM_HOME"]}/modules" # default gemset location when BRPM is installed
|
279
|
-
elsif ENV["GEM_HOME"]
|
280
|
-
ENV["GEM_HOME"] # default gemset location when BRPM is not installed
|
281
|
-
else
|
282
|
-
raise "Unable to find out the gems root path."
|
283
|
-
end
|
284
|
-
end
|
285
|
-
|
286
286
|
def get_module_gem_path(module_name, module_version)
|
287
287
|
"#{@gems_root_path}/gems/#{module_name}-#{module_version}"
|
288
288
|
end
|
@@ -70,7 +70,7 @@ class ModuleInstaller
|
|
70
70
|
def install_gem(module_name, module_version)
|
71
71
|
if BrpmAuto.run_from_brpm or BrpmAuto.params.unit_test
|
72
72
|
# we need to override the GEM_HOME env var, otherwise the gems will be installed in BRPM's own gemset
|
73
|
-
ENV["GEM_HOME"] =
|
73
|
+
ENV["GEM_HOME"] = BrpmAuto.get_gems_root_path
|
74
74
|
Gem.paths = ENV
|
75
75
|
end
|
76
76
|
|
@@ -95,7 +95,12 @@ class ModuleInstaller
|
|
95
95
|
if File.exists?(gemfile) && File.exists?(gemfile_lock)
|
96
96
|
BrpmAuto.log "Found a Gemfile.lock so executing command 'bundle install --gemfile #{gemfile}'..."
|
97
97
|
# %x(bundle install --gemfile #{gemfile})
|
98
|
-
|
98
|
+
if BrpmAuto.run_from_brpm or BrpmAuto.params.unit_test
|
99
|
+
result = BrpmAuto.execute_shell("cd #{spec.gem_dir}; export GEM_HOME=#{BrpmAuto.get_gems_root_path}; bundle install")
|
100
|
+
else
|
101
|
+
result = BrpmAuto.execute_shell("cd #{spec.gem_dir}; bundle install")
|
102
|
+
end
|
103
|
+
|
99
104
|
BrpmAuto.log result["stdout"] if result["stdout"] and !result["stdout"].empty?
|
100
105
|
unless result["status"] == 0
|
101
106
|
raise result["stderr"]
|