librarian-puppet-maestrodev 0.9.7.3 → 0.9.7.4
Sign up to get free protection for your applications and to get access to all the features.
@@ -24,17 +24,23 @@ module Librarian
|
|
24
24
|
when String
|
25
25
|
puppet_to_gem_version(arg)
|
26
26
|
else
|
27
|
-
# Gem::Requirement,
|
28
|
-
|
27
|
+
# Gem::Requirement, convert to string (ie. =1.0) so we can concat later
|
28
|
+
# Gem::Requirements can not be concatenated
|
29
|
+
arg.requirements.map{|x,y| "#{x}#{y}"}
|
29
30
|
end
|
30
|
-
end
|
31
|
+
end.flatten
|
31
32
|
end
|
32
33
|
|
33
|
-
# convert Puppet
|
34
|
+
# convert Puppet versions to gem supported versions
|
35
|
+
# '1.x' to '~>1.0'
|
36
|
+
# '>=1.1.0 <2.0.0' to ['>=1.1.0', '<2.0.0']
|
34
37
|
# http://docs.puppetlabs.com/puppet/2.7/reference/modules_publishing.html
|
35
38
|
def puppet_to_gem_version(version)
|
36
|
-
|
37
|
-
|
39
|
+
constraints = version.scan(/([~<>=]*[ ]*[\d\.x]+)/).flatten # split the constraints
|
40
|
+
constraints.map do |constraint|
|
41
|
+
matched = /(.*)\.x/.match(constraint)
|
42
|
+
matched.nil? ? constraint : "~>#{matched[1]}.0"
|
43
|
+
end
|
38
44
|
end
|
39
45
|
end
|
40
46
|
end
|
@@ -268,8 +268,13 @@ module Librarian
|
|
268
268
|
end
|
269
269
|
|
270
270
|
def fetch_dependencies(name, version, version_uri)
|
271
|
+
environment.logger.debug { " Fetching dependencies for #{name} #{version}" }
|
271
272
|
repo(name).dependencies(version).map do |k, v|
|
272
|
-
|
273
|
+
begin
|
274
|
+
Dependency.new(k, v, nil)
|
275
|
+
rescue ArgumentError => e
|
276
|
+
raise Error, "Error fetching dependency for #{name} [#{version}]: #{k} [#{v}]: #{e}"
|
277
|
+
end
|
273
278
|
end
|
274
279
|
end
|
275
280
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: librarian-puppet-maestrodev
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.7.
|
4
|
+
version: 0.9.7.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -244,7 +244,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
244
244
|
version: '0'
|
245
245
|
segments:
|
246
246
|
- 0
|
247
|
-
hash:
|
247
|
+
hash: -150972363980444721
|
248
248
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
249
249
|
none: false
|
250
250
|
requirements:
|
@@ -253,7 +253,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
253
253
|
version: '0'
|
254
254
|
segments:
|
255
255
|
- 0
|
256
|
-
hash:
|
256
|
+
hash: -150972363980444721
|
257
257
|
requirements: []
|
258
258
|
rubyforge_project:
|
259
259
|
rubygems_version: 1.8.24
|