librarian-puppet-maestrodev 0.9.9.3 → 0.9.9.4
Sign up to get free protection for your applications and to get access to all the features.
@@ -103,10 +103,14 @@ module Librarian
|
|
103
103
|
end
|
104
104
|
|
105
105
|
class Resolver
|
106
|
-
|
107
|
-
|
108
|
-
|
106
|
+
# ensure we don't return nil, if manifests is nil we return a resolution that is not valid
|
107
|
+
def resolve(spec, partial_manifests = [])
|
108
|
+
manifests = implementation(spec).resolve(partial_manifests)
|
109
|
+
if manifests
|
110
|
+
enforce_consistency!(spec.dependencies, manifests)
|
111
|
+
manifests = sort(manifests)
|
109
112
|
end
|
113
|
+
Resolution.new(spec.dependencies, manifests)
|
110
114
|
end
|
111
115
|
end
|
112
116
|
end
|
@@ -103,7 +103,7 @@ module Librarian
|
|
103
103
|
target = vendored?(name, version) ? vendored_path(name, version) : name
|
104
104
|
|
105
105
|
|
106
|
-
command = "puppet module install --version #{version} --target-dir '#{path}' --modulepath '#{path}' --ignore-dependencies '#{target}'"
|
106
|
+
command = "puppet module install --version #{version} --target-dir '#{path}' --module_repository '#{source}' --modulepath '#{path}' --ignore-dependencies '#{target}'"
|
107
107
|
output = `#{command}`
|
108
108
|
|
109
109
|
# Check for bad exit code
|
@@ -26,16 +26,21 @@ module Librarian
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def dependencies
|
29
|
-
return {} unless modulefile?
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
29
|
+
return {} unless modulefile? or puppetfile?
|
30
|
+
|
31
|
+
if modulefile?
|
32
|
+
metadata = ::Puppet::ModuleTool::Metadata.new
|
33
|
+
|
34
|
+
::Puppet::ModuleTool::ModulefileReader.evaluate(metadata, modulefile)
|
35
|
+
|
36
|
+
metadata.dependencies.map do |dependency|
|
37
|
+
name = dependency.instance_variable_get(:@full_module_name)
|
38
|
+
version = dependency.instance_variable_get(:@version_requirement)
|
39
|
+
v = Librarian::Puppet::Requirement.new(version).gem_requirement
|
40
|
+
Dependency.new(name, v, forge_source)
|
41
|
+
end
|
42
|
+
elsif puppetfile?
|
43
|
+
Librarian::Puppet::Environment.new(:project_path => path).specfile.read.dependencies
|
39
44
|
end
|
40
45
|
end
|
41
46
|
|
@@ -46,6 +51,14 @@ module Librarian
|
|
46
51
|
def modulefile?
|
47
52
|
File.exists?(modulefile)
|
48
53
|
end
|
54
|
+
|
55
|
+
def puppetfile?
|
56
|
+
File.exists?(File.join(path, 'Puppetfile'))
|
57
|
+
end
|
58
|
+
|
59
|
+
def forge_source
|
60
|
+
Librarian::Puppet::Source::Forge.from_lock_options(environment, :remote=>"http://forge.puppetlabs.com")
|
61
|
+
end
|
49
62
|
end
|
50
63
|
end
|
51
64
|
end
|
@@ -107,14 +120,7 @@ module Librarian
|
|
107
120
|
end
|
108
121
|
|
109
122
|
def fetch_dependencies(name, version, extra)
|
110
|
-
repository.dependencies
|
111
|
-
v = Requirement.new(v).gem_requirement
|
112
|
-
Dependency.new(k, v, forge_source)
|
113
|
-
end
|
114
|
-
end
|
115
|
-
|
116
|
-
def forge_source
|
117
|
-
Forge.from_lock_options(environment, :remote=>"http://forge.puppetlabs.com")
|
123
|
+
repository.dependencies
|
118
124
|
end
|
119
125
|
|
120
126
|
end
|
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.9.
|
4
|
+
version: 0.9.9.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-06-
|
12
|
+
date: 2013-06-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: librarian
|
@@ -165,7 +165,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
165
165
|
version: '0'
|
166
166
|
segments:
|
167
167
|
- 0
|
168
|
-
hash: -
|
168
|
+
hash: -3974085254619562597
|
169
169
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
170
170
|
none: false
|
171
171
|
requirements:
|
@@ -174,7 +174,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
174
174
|
version: '0'
|
175
175
|
segments:
|
176
176
|
- 0
|
177
|
-
hash: -
|
177
|
+
hash: -3974085254619562597
|
178
178
|
requirements: []
|
179
179
|
rubyforge_project:
|
180
180
|
rubygems_version: 1.8.25
|