capistrano-karaf 1.8.3 → 1.8.4

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.
Files changed (3) hide show
  1. checksums.yaml +5 -13
  2. data/lib/capistrano-karaf/install.rb +15 -2
  3. metadata +4 -4
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- ZTcyYjYxYzE3OTkzMzBmMzY0ODBkMzUzZGE4MjIwYjI1M2RjZjRjOA==
5
- data.tar.gz: !binary |-
6
- Mjk0MzQ3NmFhOThhYTUxZGIxN2RkMjUwOTA0MWNjNWMyNjgwYTM2MQ==
2
+ SHA1:
3
+ metadata.gz: 8dd125d271ef479fdd7468ef725f2d71fe9081d0
4
+ data.tar.gz: 236381e74bb0b408a987a4db6a689700f916f840
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- YTQ3YTE1OGVhYTMxNDM1MDU1Zjk3Y2Q1NjQ0OTgyMzQ4YjJlZjRjMjkwYjMy
10
- OTZjMmMyOWU1OWFkNGU5NmU4NmY4NTkwOTlmNWQ5NTY1NDkzZjE4ZWQxMDVl
11
- MDA5Y2U1ZDFjYTZhMTY2ODhhYjViODQyOGE2NWEyMDc1Y2YxNjc=
12
- data.tar.gz: !binary |-
13
- MmQ5N2MwYTAyNzY1NTM1OWYyYTA2OTc2Y2ZjZTE4YjYzNmMwNjQ4YmZiYjk1
14
- ZGZlYzg2MjI4OWNiYjM2ZWM1NDBmOWQ2YzJhNDk2NzRiNzc5NDliMDI4MjAy
15
- MmNmYzkyMWE1YmU4M2Q0NGZiNjFiYTY4NWE5MGQ2MTE4YjkxMDg=
6
+ metadata.gz: eff07db9277c9656b6f835eddf49960c30b4adaa4a8f9b91f59ac4cd2c8e4c37c37f8e9fba0e0253d71040521cb7a9fbe6a26417fb01dae68fc0d2a07e9631ad
7
+ data.tar.gz: b348f1993732ba1f74a81269e858cb8f673c8b080bf4f103cfacf375b328c3e52597c6e145f60703e6da19a4234e117c31bb0b263e024760d1eed6957743da21
@@ -142,6 +142,9 @@ module Install
142
142
  true
143
143
  end
144
144
 
145
+ class LatestVersionNotDefinedError < StandardError
146
+ end
147
+
145
148
  # Extract the latest version from a maven-metadata file
146
149
  #
147
150
  # Parameters
@@ -154,7 +157,13 @@ module Install
154
157
  # Returns a string containing the version
155
158
  def extract_latest_version (xml)
156
159
  doc = REXML::Document.new(xml)
157
- version = REXML::XPath.first(doc, "/metadata/versioning/latest").text
160
+ latest = REXML::XPath.first(doc, "/metadata/versioning/latest")
161
+
162
+ unless latest.nil? then
163
+ latest.text
164
+ else
165
+ raise LatestVersionNotDefinedError
166
+ end
158
167
  end
159
168
 
160
169
  private
@@ -201,7 +210,11 @@ module Install
201
210
  def create_feature_hash(groupId, repository, feature, version, condition, hooks)
202
211
  version1 = nil
203
212
  if version == :latest then
204
- version1 = extract_latest_version(latest_snapshot_version(groupId, repository))
213
+ begin
214
+ version1 = extract_latest_version(latest_snapshot_version(groupId, repository))
215
+ rescue LatestVersionNotDefinedError
216
+ raise "Latest version not defined for #{groupId}/#{repository} #{feature}"
217
+ end
205
218
  else
206
219
  version1 = version
207
220
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-karaf
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.3
4
+ version: 1.8.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brecht Hoflack
@@ -33,17 +33,17 @@ require_paths:
33
33
  - lib
34
34
  required_ruby_version: !ruby/object:Gem::Requirement
35
35
  requirements:
36
- - - ! '>='
36
+ - - ">="
37
37
  - !ruby/object:Gem::Version
38
38
  version: '0'
39
39
  required_rubygems_version: !ruby/object:Gem::Requirement
40
40
  requirements:
41
- - - ! '>='
41
+ - - ">="
42
42
  - !ruby/object:Gem::Version
43
43
  version: '0'
44
44
  requirements: []
45
45
  rubyforge_project:
46
- rubygems_version: 2.4.8
46
+ rubygems_version: 2.4.5.1
47
47
  signing_key:
48
48
  specification_version: 4
49
49
  summary: Capistrano functions for communicating with karaf