brpm_content 0.1.45 → 0.1.46
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/.travis.yml +0 -2
- data/config.yml +1 -1
- data/modules/framework/lib/module_installer.rb +20 -2
- data/modules/framework/tests/module_installer_spec.rb +1 -0
- data/modules/framework/tests/spec_helper.rb +11 -9
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MmMzMmVhMDQ0MzMzZTdlZTU5MDYzNGYxNWRjNzgzMzBkZTU3NTBhNg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NWZkMTlhOTgwOWI5OWIwYjFjZDUzYzYwY2E0MGJhNzg4MjM4ODE3Mw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MzcyZWZlNGQxMTY0YTgwYzhlMDYxZTMyNjQwNDM3NjA4Njg2NjdiNDc4OWVm
|
10
|
+
N2E2NDAwOTAzNGE0ZmIwNWIxMmY3YTY0YTlkMGE2ZDc4ZTNhNzBiNmMwM2Ux
|
11
|
+
Njg4N2I4ZDUwNDM5ZWVkYjEzZDdkMjFiZjI4YzU4ODhiNjA1NzI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZjIwZjIzYmFiMTUwN2M1NDI3ZmVmOGM4M2Q0YTliMjE1YjBlM2E2NjY3MWJh
|
14
|
+
MjdlNmNkYjljNTAyY2ZjNjBlNWU4NTY5OGJlZjc5NzgyNDc0ODU2Njg2Mjgz
|
15
|
+
OTA3MTZhOGQ4ZDc2MGNiMzMzMDQwNDViZWU3M2M4NGYxM2U1ZjM=
|
data/.travis.yml
CHANGED
data/config.yml
CHANGED
@@ -89,8 +89,10 @@ class ModuleInstaller
|
|
89
89
|
end
|
90
90
|
end
|
91
91
|
|
92
|
-
|
93
|
-
|
92
|
+
unless ENV["TRAVIS"] == "true" #TODO: make this work on the travisci server
|
93
|
+
BrpmAuto.log "Uninstalling module #{module_name}#{module_version.nil? ? "" : " " + module_version}..."
|
94
|
+
BrpmAuto.log `gem uninstall #{module_name}#{module_version.nil? ? "" : " -v " + module_version}`
|
95
|
+
end
|
94
96
|
|
95
97
|
return true
|
96
98
|
end
|
@@ -358,6 +360,22 @@ class ModuleInstaller
|
|
358
360
|
script_to_update["aasm_state"] = "released"
|
359
361
|
script = @brpm_rest_client.update_script_from_hash(script_to_update)
|
360
362
|
end
|
363
|
+
|
364
|
+
if script["aasm_state"] == "archived_state"
|
365
|
+
BrpmAuto.log "Updating the aasm_state of the wrapper script to 'released'..."
|
366
|
+
script_to_update = {}
|
367
|
+
script_to_update["id"] = script["id"]
|
368
|
+
script_to_update["aasm_state"] = "retired"
|
369
|
+
script = @brpm_rest_client.update_script_from_hash(script_to_update)
|
370
|
+
end
|
371
|
+
|
372
|
+
if script["aasm_state"] == "retired"
|
373
|
+
BrpmAuto.log "Updating the aasm_state of the wrapper script to 'released'..."
|
374
|
+
script_to_update = {}
|
375
|
+
script_to_update["id"] = script["id"]
|
376
|
+
script_to_update["aasm_state"] = "released"
|
377
|
+
script = @brpm_rest_client.update_script_from_hash(script_to_update)
|
378
|
+
end
|
361
379
|
end
|
362
380
|
|
363
381
|
def uninstall_auto_script_wrapper(auto_script_path, automation_type, module_friendly_name)
|
@@ -49,14 +49,16 @@ def decrypt_string_with_prefix(input) # mocked method
|
|
49
49
|
end
|
50
50
|
|
51
51
|
def create_brpm_file
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
52
|
+
if File.exists?("~/.brpm")
|
53
|
+
FileUtils.rm("~/.brpm")
|
54
|
+
end
|
55
|
+
|
56
|
+
params = get_default_params
|
57
|
+
brpm_params = {}
|
58
|
+
brpm_params["brpm_url"] = params["brpm_url"]
|
59
|
+
brpm_params["brpm_api_token"] = params["brpm_api_token"]
|
60
|
+
|
61
|
+
File.open(File.expand_path("~/.brpm"), "w") do |file|
|
62
|
+
file.puts(brpm_params.to_yaml)
|
61
63
|
end
|
62
64
|
end
|