brpm_content 0.1.34 → 0.1.35

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
- ZmVmMDAzMjQ5NmY3Yzk4ZmUwNDVmZmM3MmI0YTBkOGY0YmNhM2I2Yw==
4
+ YzJkYjhkZDYzZmM5NjFiZWNkYWQwYTNjNTAzMDM0MTM3ZmFlZjk5OA==
5
5
  data.tar.gz: !binary |-
6
- ZTMyOTI5OTA0YzhkYzg0NGVkZTc2OTYzOWQ4ZjM1MDBiM2NmMjZmMg==
6
+ ZmVhNmYyZTE2NGU2OTA1NDEyZDVjYmI2NmNmYmUxNTE5MGNlMDQwMw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YzQ5YjUzNWU5ODM1NWI3OTQ2NWVlZDhjMjA5M2I1NTg2YzIzOTIwY2IzMDNi
10
- Zjc0MDM1OTBjOTM4MTBiMTY4NzViNDk0MzI5MGU0OWVmMGI2NjM4MjFhM2Qw
11
- ZDdlYmY4MmJmYjgwZTkyNjkzOTNlZjliMzY0OTE1Y2U0NjM4ZGM=
9
+ MWY5NDU2ZjFlOWY0ZjdjNzI1OWQwMDI3MGQ1ZGJlNzA0ODM1ODUwOWNmYWZk
10
+ Y2JlMzViOWI5NDk2NGQxMmQ3Y2Y1MmVlZjQ4MjhlMjZlYzM1OTYxOGU3ZjE4
11
+ Y2QwYTczOTEzZDc5MDBkOGUyZjg1YTczZjJlYTZmZmE3YjE1NjA=
12
12
  data.tar.gz: !binary |-
13
- NWFlYTQxZjAyNTA1MmNlNDI5YWQyNDM5OGUwMGQzOWIyZTEwMjY2MzI5MjIy
14
- ZjU0OTc4MjYxYzQyZmJjNzBjNTEzYjgwZDQ2MmYzZjc5YzQ0NmU2M2I4Y2I2
15
- NzM0N2E0Njk0NmU0ZDJhZjVkZWMzNDI5OTQxODAyNTE4OTFlMDM=
13
+ YTI4Y2MyYWRhY2U0OGNkOTZjMTBjMzM5YTYwZDU3ZTEwN2M2MmJkZmViMzBj
14
+ NWQwYTk2MWJkYTM2NTZjYjFhMDYyNzkxYjdlMDlmZjkzODMzYjMzMjE5OGFh
15
+ YmQzNDI2ZjMzNTI1NmMyZWFlNDViYWQyZDY0ODdkZjU0YjRkMWU=
@@ -1,4 +1,4 @@
1
- version: 0.1.34
1
+ version: 0.1.35
2
2
 
3
3
  author: Niek Bartholomeus
4
4
  email: niek.bartholomeus@gmail.com
@@ -11,14 +11,16 @@ class ModuleInstaller
11
11
  BrpmAuto.log "A BRPM instance is installed locally"
12
12
 
13
13
  brpm_content_spec = specs.find { |spec| spec.name == "brpm_content" }
14
- if brpm_content_spec and brpm_content_spec.version > Gem::Version.new(BrpmAuto.version)
15
- BrpmAuto.log "WARNING - A newer version of brpm_content was installed."
16
-
17
- BrpmAuto.log "Updating the symlink to brpm_content-latest..."
18
- update_symlink_to_brpm_content(brpm_content_spec)
14
+ if brpm_content_spec
15
+ if brpm_content_spec.version > Gem::Version.new(BrpmAuto.version) or ! File.exist?(get_symlink_path)
16
+ BrpmAuto.log "Updating the symlink to brpm_content-latest..."
17
+ update_symlink_to_brpm_content(brpm_content_spec)
18
+ end
19
19
 
20
- BrpmAuto.log "Copying the log.html file to te automation_results directory..."
21
- FileUtils.cp("#{brpm_content_spec.gem_dir}/modules/framework/log.html", "#{ENV["BRPM_HOME"]}/automation_results")
20
+ if brpm_content_spec.version > Gem::Version.new(BrpmAuto.version) or ! File.exist?("#{ENV["BRPM_HOME"]}/automation_results/log.html")
21
+ BrpmAuto.log "Copying the log.html file to te automation_results directory..."
22
+ FileUtils.cp("#{brpm_content_spec.gem_dir}/modules/framework/log.html", "#{ENV["BRPM_HOME"]}/automation_results")
23
+ end
22
24
  end
23
25
 
24
26
  BrpmAuto.log "Preparing the connectivity to BRPM..."
@@ -102,9 +104,13 @@ class ModuleInstaller
102
104
  end
103
105
  end
104
106
 
107
+ def get_symlink_path
108
+ "#{ENV["GEM_HOME"]}/gems/brpm_content-latest"
109
+ end
110
+
105
111
  def update_symlink_to_brpm_content(brpm_content_spec)
106
112
  new_version_path = brpm_content_spec.gem_dir
107
- symlink_path = "#{ENV["GEM_HOME"]}/gems/brpm_content-latest"
113
+ symlink_path = get_symlink_path
108
114
 
109
115
  BrpmAuto.log "Linking #{symlink_path} to #{new_version_path}..."
110
116
  result = BrpmAuto.execute_shell("ln -sfn #{new_version_path} #{symlink_path}")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brpm_content
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.34
4
+ version: 0.1.35
5
5
  platform: ruby
6
6
  authors:
7
7
  - Niek Bartholomeus