brpm_content_framework 0.2.14 → 0.2.15

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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- OGU3ZDU0OWIwNTRjMjA5NzgwOTQ1MjRiODg1ZWI0NDI2YTYwZThhZA==
4
+ YTYzNTgyN2Y4MTk2YzU3OWRlMWIwZjk1Mjk5NDBjZjQyNmYyNjEwYw==
5
5
  data.tar.gz: !binary |-
6
- MjIyMGQ5ZTIxOTJkYzlmM2IyNGEyNjY2YzZmY2NiYTJkOTA4NTZmYg==
6
+ MzIwN2IzNDllMGQxYWI3ZDQ0YTIwZmMxZDMwZmUwYmZmZTdlODhlNA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NWY5Y2EwMjAyYzg5MDFhMTBmOGY3ZWFmZWIyNjI0ZmFiZGRiYTlmZjg0ODBi
10
- OTIwZWUwMjRiN2M3ZGQ0NDUzMzRhYTU4YTNjMGYzNjc2ODYzMTE5ZDg2OTcx
11
- MDkzZGY2YTAzNGVlMWFhZjMxY2U0ZmU5MmU0ZWRjNTZhYzljOTg=
9
+ OTM2NzdiYzRiOTg3NjZkNzNiMDdmYTU3Zjg2OWUyZDY2ODJkMDk2OTQ0YWZh
10
+ YTg3NDNmYmRhMWNlZGU2MTNiOTdjNzAwMTljYjczMTBhZGM0ZjQ0ZTkwYWJk
11
+ YmZlZWZkMzZmYjA1Yzg1NzAxNTE0NDE1YTc4M2NmODZiZDYwOGU=
12
12
  data.tar.gz: !binary |-
13
- MzkyZDQ5NzI3N2ExMjQzMDhkYTM0NTY2MzU4OTc4ZDQwZTM1OThjM2YyMWU3
14
- MWQ5ZmZjOWYxY2IyYjQxNWQ5MDQ4MGNlYzZkYTY2MzBkZTZkNzU3NjIxNTE0
15
- NTk3ZjI0ZDI2MmI3MTYxNDgwNjEwN2RlNWJiMjk3YWE1MzYwYjg=
13
+ ZGQ2MTc4ZmUwNDIxODU3NTVjZDRmMTg5OGVhNTYyMDc1YTdjNDg2OTkwMDZh
14
+ ZjQzMDBmODM3ZmZlOWU1ODI4YWNkMGQ3ODljMDYyZjJhYzNlMDZiMmE0YWMy
15
+ OTk5MTlkYmU0MjJiM2EyNzJjYWYwMGI0NTZhNGU2ZTk0YjNjYmQ=
data/config.yml CHANGED
@@ -1,4 +1,4 @@
1
- version: 0.2.14
1
+ version: 0.2.15
2
2
 
3
3
  author: Niek Bartholomeus
4
4
  email: niek.bartholomeus@gmail.com
@@ -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
- BrpmAuto.log_error("The process that executed the automation script returned with 'Command execution failed'.")
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
- BrpmAuto.log_error("The process that executed the automation script returned with non-zero exit code: #{$?.exitstatus}")
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
 
@@ -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)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brpm_content_framework
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.14
4
+ version: 0.2.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Niek Bartholomeus