capistrano-karaf 1.4.5 → 1.5.0

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.
@@ -3,6 +3,27 @@ require 'capistrano-karaf/core'
3
3
 
4
4
  module Capistrano_Karaf
5
5
 
6
+ # Remove all feature repositories with a given groupID and artifactID
7
+ #
8
+ # url - the url to look for other versions with same url
9
+ #
10
+ #
11
+ # Examples
12
+ # remove_artifact_urls("mvn:com.melexis.esb/eventstore-feature/1.2/xml/features")
13
+ # # => nil
14
+ #
15
+ # Returns nothing
16
+ def remove_otherversion_urls (url)
17
+ url_details_regex = %r{(?<groupID> [\w\.]+){0}
18
+ (?<artifactID> [\w\-]+){0}
19
+ ^mvn:\g<groupID>\/\g<artifactID>\/.*
20
+ }x
21
+ urls_to_remove=matcher_to_hash(url_details_regex,url)
22
+ urls_to_remove.each do |u|
23
+ remove_artifact_urls(u['groupID'],u['artifactID'])
24
+ end
25
+ end
26
+
6
27
  # Remove all feature repositories with a given groupID and artifactID
7
28
  #
8
29
  # groupID - a string containing the groupID
@@ -118,6 +118,8 @@ module Install
118
118
  install_new_feature = false
119
119
  end
120
120
  end
121
+
122
+ remove_otherversion_urls(feature[:feature_url])
121
123
 
122
124
  if install_new_feature
123
125
  add_url(feature[:feature_url])
metadata CHANGED
@@ -1,15 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-karaf
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.5
4
+ version: 1.5.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Brecht Hoflack
9
+ - Jerome Morel
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
- date: 2014-01-23 00:00:00.000000000 Z
13
+ date: 2014-03-19 00:00:00.000000000 Z
13
14
  dependencies: []
14
15
  description:
15
16
  email: brecht.hoflack@gmail.com