brpm_content_framework 0.2.14 → 0.2.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/config.yml +1 -1
- data/lib/brpm_script_executor.rb +11 -4
- data/lib/module_installer.rb +0 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YTYzNTgyN2Y4MTk2YzU3OWRlMWIwZjk1Mjk5NDBjZjQyNmYyNjEwYw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MzIwN2IzNDllMGQxYWI3ZDQ0YTIwZmMxZDMwZmUwYmZmZTdlODhlNA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OTM2NzdiYzRiOTg3NjZkNzNiMDdmYTU3Zjg2OWUyZDY2ODJkMDk2OTQ0YWZh
|
10
|
+
YTg3NDNmYmRhMWNlZGU2MTNiOTdjNzAwMTljYjczMTBhZGM0ZjQ0ZTkwYWJk
|
11
|
+
YmZlZWZkMzZmYjA1Yzg1NzAxNTE0NDE1YTc4M2NmODZiZDYwOGU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZGQ2MTc4ZmUwNDIxODU3NTVjZDRmMTg5OGVhNTYyMDc1YTdjNDg2OTkwMDZh
|
14
|
+
ZjQzMDBmODM3ZmZlOWU1ODI4YWNkMGQ3ODljMDYyZjJhYzNlMDZiMmE0YWMy
|
15
|
+
OTk5MTlkYmU0MjJiM2EyNzJjYWYwMGI0NTZhNGU2ZTk0YjNjYmQ=
|
data/config.yml
CHANGED
data/lib/brpm_script_executor.rb
CHANGED
@@ -85,14 +85,17 @@ class BrpmScriptExecutor
|
|
85
85
|
BrpmAuto.log "Using Gemfile #{gemfile_path}."
|
86
86
|
env_vars["BUNDLE_GEMFILE"] = gemfile_path
|
87
87
|
require_statements += "require 'bundler/setup'; "
|
88
|
-
# TODO Bundler.require
|
89
88
|
|
90
89
|
BrpmAuto.log "Executing automation script '#{name}' from module '#{modul}' in a separate process..."
|
91
90
|
result = Bundler.clean_system(env_vars, RbConfig.ruby, "-e", "#{require_statements}; require 'brpm_script_executor'; BrpmScriptExecutor.execute_automation_script_from_other_process(\"#{modul}\", \"#{name}\", \"#{params_file}\", \"#{automation_type}\", \"#{parent_id}\", \"#{offset}\", \"#{max_records}\")")
|
92
91
|
if result.nil?
|
93
|
-
|
92
|
+
message = "The process that executed the automation script returned with 'Command execution failed'."
|
93
|
+
BrpmAuto.log_error message
|
94
|
+
raise message
|
94
95
|
elsif result == false
|
95
|
-
|
96
|
+
message = "The process that executed the automation script returned with non-zero exit code: #{$?.exitstatus}"
|
97
|
+
BrpmAuto.log_error message
|
98
|
+
raise message
|
96
99
|
end
|
97
100
|
|
98
101
|
result
|
@@ -139,6 +142,9 @@ class BrpmScriptExecutor
|
|
139
142
|
#load File.expand_path("#{File.dirname(__FILE__)}/../infrastructure/write_to.rb") if BrpmAuto.params.run_from_brpm
|
140
143
|
end
|
141
144
|
end
|
145
|
+
|
146
|
+
############################################################################################################################################################
|
147
|
+
# These methods are used to find gems outside of the active bundle so they should not rely on any logic from the gem or bundler libraries
|
142
148
|
def get_module_gem_path(module_name, module_version)
|
143
149
|
"#{get_gems_root_path}/gems/#{module_name}-#{module_version}"
|
144
150
|
end
|
@@ -147,7 +153,6 @@ class BrpmScriptExecutor
|
|
147
153
|
latest_version_path = get_module_gem_path(module_name, "latest")
|
148
154
|
return "latest" if File.exists?(latest_version_path)
|
149
155
|
|
150
|
-
# TODO: use Gem::Specification.find_by_name(@module_name, Gem::Requirement.create(Gem::Version.new(@module_version)))
|
151
156
|
all_version_search = get_module_gem_path(module_name, "*")
|
152
157
|
version_paths = Dir.glob(all_version_search)
|
153
158
|
|
@@ -169,6 +174,8 @@ class BrpmScriptExecutor
|
|
169
174
|
raise "Unable to find out the gems root path."
|
170
175
|
end
|
171
176
|
end
|
177
|
+
############################################################################################################################################################
|
178
|
+
|
172
179
|
end
|
173
180
|
end
|
174
181
|
|
data/lib/module_installer.rb
CHANGED
@@ -35,9 +35,6 @@ class ModuleInstaller
|
|
35
35
|
|
36
36
|
BrpmAuto.log "Preparing the connectivity to BRPM..."
|
37
37
|
if prepare_brpm_connection
|
38
|
-
BrpmAuto.log "Creating an automation error for '******** ERROR ********' if one doesn't exist yet..."
|
39
|
-
create_automation_error_if_not_exists("******** ERROR ********")
|
40
|
-
|
41
38
|
module_friendly_name = get_module_friendly_name(module_spec)
|
42
39
|
BrpmAuto.log "Creating an automation category for #{module_friendly_name} if one doesn't exist yet..."
|
43
40
|
create_automation_category_if_not_exists(module_friendly_name)
|