librarian-puppet 5.1.0 → 6.0.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ba4f67ad2636c73bc1518abdf5e8830f1825aeba7b901a6da47979bcaeb5a6a7
4
- data.tar.gz: b43000021593835a648e2021762ee09b6f860162b22149f724faf697c6cdaadb
3
+ metadata.gz: 9b2add44d823f709ce7dea9d14d6a9cd8df605f7b6098be361e4cb79450acc86
4
+ data.tar.gz: 7d02b688210f4152448290cb0666465301852fb2d01d01aa1d5e48e73ad73f37
5
5
  SHA512:
6
- metadata.gz: 1306cd3266b6587d4077a66b8f2282b400ffce1ee1eaa87844e261c9f9e9b39926776ea2c76d5d89d7c11958cc9c367fafbb4b9d7be0eb5375795cc2f05eab62
7
- data.tar.gz: 805bb0d66ec1df38c5d9a268dbed29d04d0fbe597e5a6ccfc0502c048287c7bfe537687cc0adf44a1fac77e577069d0e7f9c2c58643300f99ea6b208838466fc
6
+ metadata.gz: f68988df53f966dcb0ca39cc1471e9bc16dfdb5d185ac58be9b6331350525a61c5bd2898ce7f5be3a5bb499cbacf7e5f109ab5946176b2bdaa1ed3f25259b170
7
+ data.tar.gz: 6d1ec041c030d2ccb2831475e088125bb44a0578d689612eef7bdcafae6449fc1c6e56039c8216711d48a5f5bd9ab4b33c4da77ac8434fded18f8bcddd7f2b60
data/bin/librarian-puppet CHANGED
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
- lib = File.expand_path('../../lib', __FILE__)
4
+ lib = File.expand_path('../lib', __dir__)
4
5
  $:.unshift(lib) unless $:.include?(lib)
5
6
 
6
7
  require 'librarian/puppet/cli'
@@ -1,10 +1,11 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'librarian/action/install'
2
4
 
3
5
  module Librarian
4
6
  module Puppet
5
7
  module Action
6
8
  class Install < Librarian::Action::Install
7
-
8
9
  private
9
10
 
10
11
  def create_install_path
@@ -19,7 +20,6 @@ module Librarian
19
20
  def check_specfile
20
21
  # don't fail if Puppetfile doesn't exist as we'll use metadata.json
21
22
  end
22
-
23
23
  end
24
24
  end
25
25
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'librarian/action/resolve'
2
4
  require 'librarian/puppet/resolver'
3
5
 
@@ -9,17 +11,18 @@ module Librarian
9
11
 
10
12
  def run
11
13
  super
12
- manifests = environment.lock.manifests.select{ |m| m.name }
13
- dupes = manifests.group_by{ |m| module_name(m.name) }.select { |k, v| v.size > 1 }
14
- dupes.each do |k,v|
15
- warn("Dependency on module '#{k}' is fullfilled by multiple modules and only one will be used: #{v.map{|m|m.name}}")
14
+ manifests = environment.lock.manifests.select { |m| m.name }
15
+ dupes = manifests.group_by { |m| module_name(m.name) }.select { |_k, v| v.size > 1 }
16
+ dupes.each do |k, v|
17
+ warn("Dependency on module '#{k}' is fullfilled by multiple modules and only one will be used: #{v.map do |m|
18
+ m.name
19
+ end}")
16
20
  end
17
21
  end
18
22
 
19
23
  def resolver
20
24
  Resolver.new(environment)
21
25
  end
22
-
23
26
  end
24
27
  end
25
28
  end
@@ -1,2 +1,4 @@
1
- require "librarian/puppet/action/install"
2
- require "librarian/puppet/action/resolve"
1
+ # frozen_string_literal: true
2
+
3
+ require 'librarian/puppet/action/install'
4
+ require 'librarian/puppet/action/resolve'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'librarian/helpers'
2
4
 
3
5
  require 'librarian/cli'
@@ -18,79 +20,73 @@ module Librarian
18
20
  include Particularity
19
21
  extend Particularity
20
22
 
21
- source_root Pathname.new(__FILE__).dirname.join("templates")
23
+ source_root Pathname.new(__FILE__).dirname.join('templates')
22
24
 
23
25
  def init
24
26
  copy_file environment.specfile_name
25
27
 
26
- if File.exist? ".gitignore"
27
- gitignore = File.read('.gitignore').split("\n")
28
- else
29
- gitignore = []
30
- end
28
+ gitignore = if File.exist? '.gitignore'
29
+ File.read('.gitignore').split("\n")
30
+ else
31
+ []
32
+ end
31
33
 
32
- gitignore << ".tmp/" unless gitignore.include? ".tmp/"
33
- gitignore << "modules/" unless gitignore.include? "modules/"
34
+ gitignore << '.tmp/' unless gitignore.include? '.tmp/'
35
+ gitignore << 'modules/' unless gitignore.include? 'modules/'
34
36
 
35
- File.open(".gitignore", 'w') do |f|
37
+ File.open('.gitignore', 'w') do |f|
36
38
  f.puts gitignore.join("\n")
37
39
  end
38
40
  end
39
41
 
40
- desc "install", "Resolves and installs all of the dependencies you specify."
41
- option "quiet", :type => :boolean, :default => false
42
- option "verbose", :type => :boolean, :default => false
43
- option "line-numbers", :type => :boolean, :default => false
44
- option "clean", :type => :boolean, :default => false
45
- option "strip-dot-git", :type => :boolean
46
- option "path", :type => :string
47
- option "destructive", :type => :boolean, :default => false
48
- option "local", :type => :boolean, :default => false
49
- option "use-v1-api", :type => :boolean, :default => false
42
+ desc 'install', 'Resolves and installs all of the dependencies you specify.'
43
+ option 'quiet', type: :boolean, default: false
44
+ option 'verbose', type: :boolean, default: false
45
+ option 'line-numbers', type: :boolean, default: false
46
+ option 'clean', type: :boolean, default: false
47
+ option 'strip-dot-git', type: :boolean
48
+ option 'path', type: :string
49
+ option 'destructive', type: :boolean, default: false
50
+ option 'local', type: :boolean, default: false
51
+ option 'use-v1-api', type: :boolean, default: false
50
52
  def install
51
-
52
53
  ensure!
53
- clean! if options["clean"]
54
- unless options["destructive"].nil?
55
- environment.config_db.local['destructive'] = options['destructive'].to_s
56
- end
57
- if options.include?("strip-dot-git")
58
- strip_dot_git_val = options["strip-dot-git"] ? "1" : nil
59
- environment.config_db.local["install.strip-dot-git"] = strip_dot_git_val
60
- end
61
- if options.include?("path")
62
- environment.config_db.local["path"] = options["path"]
54
+ clean! if options['clean']
55
+ environment.config_db.local['destructive'] = options['destructive'].to_s unless options['destructive'].nil?
56
+ if options.include?('strip-dot-git')
57
+ strip_dot_git_val = options['strip-dot-git'] ? '1' : nil
58
+ environment.config_db.local['install.strip-dot-git'] = strip_dot_git_val
63
59
  end
60
+ environment.config_db.local['path'] = options['path'] if options.include?('path')
64
61
 
65
62
  environment.config_db.local['use-v1-api'] = options['use-v1-api'] ? '1' : nil
66
63
  environment.config_db.local['mode'] = options['local'] ? 'local' : nil
67
64
 
68
65
  resolve!
69
- debug { "Install: dependencies resolved"}
66
+ debug { 'Install: dependencies resolved' }
70
67
  install!
71
68
  end
72
69
 
73
- desc "update", "Updates and installs the dependencies you specify."
74
- option "verbose", :type => :boolean, :default => false
75
- option "line-numbers", :type => :boolean, :default => false
76
- option "use-v1-api", :type => :boolean, :default => false
70
+ desc 'update', 'Updates and installs the dependencies you specify.'
71
+ option 'verbose', type: :boolean, default: false
72
+ option 'line-numbers', type: :boolean, default: false
73
+ option 'use-v1-api', type: :boolean, default: false
77
74
  def update(*names)
78
-
79
75
  environment.config_db.local['use-v1-api'] = options['use-v1-api'] ? '1' : nil
80
76
 
81
- warn("Usage of module/name is deprecated, use module-name") if names.any? {|n| n.include?("/")}
77
+ warn('Usage of module/name is deprecated, use module-name') if names.any? { |n| n.include?('/') }
82
78
  # replace / to - in the module names
83
- super(*names.map{|n| normalize_name(n)})
79
+ super(*names.map { |n| normalize_name(n) })
84
80
  end
85
81
 
86
- desc "package", "Cache the puppet modules in vendor/puppet/cache."
87
- option "quiet", :type => :boolean, :default => false
88
- option "verbose", :type => :boolean, :default => false
89
- option "line-numbers", :type => :boolean, :default => false
90
- option "clean", :type => :boolean, :default => false
91
- option "strip-dot-git", :type => :boolean
92
- option "path", :type => :string
93
- option "destructive", :type => :boolean, :default => false
82
+ desc 'package', 'Cache the puppet modules in vendor/puppet/cache.'
83
+ option 'quiet', type: :boolean, default: false
84
+ option 'verbose', type: :boolean, default: false
85
+ option 'line-numbers', type: :boolean, default: false
86
+ option 'clean', type: :boolean, default: false
87
+ option 'strip-dot-git', type: :boolean
88
+ option 'path', type: :string
89
+ option 'destructive', type: :boolean, default: false
94
90
  def package
95
91
  environment.vendor!
96
92
  install
@@ -104,10 +100,11 @@ module Librarian
104
100
 
105
101
  # override the actions to use our own
106
102
 
107
- def install!(options = { })
103
+ def install!(options = {})
108
104
  Action::Install.new(environment, options).run
109
105
  end
110
- def resolve!(options = { })
106
+
107
+ def resolve!(options = {})
111
108
  Action::Resolve.new(environment, options).run
112
109
  end
113
110
  end
@@ -1,8 +1,8 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Librarian
2
4
  module Puppet
3
-
4
5
  class Dependency < Librarian::Dependency
5
-
6
6
  include Librarian::Puppet::Util
7
7
 
8
8
  attr_accessor :parent
@@ -10,7 +10,7 @@ module Librarian
10
10
 
11
11
  def initialize(name, requirement, source, parent = nil)
12
12
  # Issue #235 fail if forge source is not defined
13
- raise Error, "forge entry is not defined in Puppetfile" if source.instance_of?(Array) && source.empty?
13
+ raise Error, 'forge entry is not defined in Puppetfile' if source.instance_of?(Array) && source.empty?
14
14
 
15
15
  self.parent = parent
16
16
  super(normalize_name(name), requirement, source)
@@ -19,8 +19,6 @@ module Librarian
19
19
  def to_s
20
20
  "#{name} (#{requirement}) <#{source}> (from #{parent.nil? ? '<nil>' : parent})"
21
21
  end
22
-
23
22
  end
24
-
25
23
  end
26
24
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'librarian/dsl'
2
4
  require 'librarian/dsl/target'
3
5
  require 'librarian/puppet/source'
@@ -6,18 +8,17 @@ require 'librarian/puppet/dependency'
6
8
  module Librarian
7
9
  module Puppet
8
10
  class Dsl < Librarian::Dsl
9
-
10
- FORGE_URL = "https://forgeapi.puppet.com"
11
+ FORGE_URL = 'https://forgeapi.puppet.com'
11
12
 
12
13
  dependency :mod
13
14
 
14
- source :forge => Source::Forge
15
- source :git => Source::Git
16
- source :path => Source::Path
17
- source :github_tarball => Source::GitHubTarball
15
+ source forge: Source::Forge
16
+ source git: Source::Git
17
+ source path: Source::Path
18
+ source github_tarball: Source::GitHubTarball
18
19
 
19
20
  def default_specfile
20
- Proc.new do
21
+ proc do
21
22
  forge FORGE_URL
22
23
  metadata
23
24
  end
@@ -29,8 +30,10 @@ module Librarian
29
30
 
30
31
  def post_process_target(target)
31
32
  # save the default forge defined
32
- default_forge = target.sources.select {|s| s.is_a? Librarian::Puppet::Source::Forge}.first
33
- Librarian::Puppet::Source::Forge.default = default_forge || Librarian::Puppet::Source::Forge.from_lock_options(environment, :remote => FORGE_URL)
33
+ default_forge = target.sources.select { |s| s.is_a? Librarian::Puppet::Source::Forge }.first
34
+ Librarian::Puppet::Source::Forge.default = default_forge || Librarian::Puppet::Source::Forge.from_lock_options(
35
+ environment, remote: FORGE_URL
36
+ )
34
37
  end
35
38
 
36
39
  def receiver(target)
@@ -38,15 +41,18 @@ module Librarian
38
41
  end
39
42
 
40
43
  def run(specfile = nil, sources = [])
41
- specfile, sources = nil, specfile if specfile.kind_of?(Array) && sources.empty?
44
+ if specfile.is_a?(Array) && sources.empty?
45
+ sources = specfile
46
+ specfile = nil
47
+ end
42
48
 
43
49
  Target.new(self).tap do |target|
44
50
  target.precache_sources(sources)
45
- debug_named_source_cache("Pre-Cached Sources", target)
51
+ debug_named_source_cache('Pre-Cached Sources', target)
46
52
 
47
53
  specfile ||= Proc.new if block_given?
48
54
 
49
- if specfile.kind_of?(Pathname) and !File.exist?(specfile)
55
+ if specfile.is_a?(Pathname) and !File.exist?(specfile)
50
56
  debug { "Specfile #{specfile} not found, using defaults" } unless specfile.nil?
51
57
  receiver(target).run(specfile, &default_specfile)
52
58
  else
@@ -55,7 +61,7 @@ module Librarian
55
61
 
56
62
  post_process_target(target)
57
63
 
58
- debug_named_source_cache("Post-Cached Sources", target)
64
+ debug_named_source_cache('Post-Cached Sources', target)
59
65
  end.to_spec
60
66
  end
61
67
 
@@ -73,7 +79,7 @@ module Librarian
73
79
 
74
80
  # save the specfile and call librarian
75
81
  def run(specfile = nil)
76
- @working_path = specfile.kind_of?(Pathname) ? specfile.parent : Pathname.new(Dir.pwd)
82
+ @working_path = specfile.is_a?(Pathname) ? specfile.parent : Pathname.new(Dir.pwd)
77
83
  @specfile = specfile
78
84
  super
79
85
  end
@@ -81,9 +87,8 @@ module Librarian
81
87
  # implement the 'metadata' syntax for Puppetfile
82
88
  def metadata
83
89
  f = working_path.join('metadata.json')
84
- unless File.exist?(f)
85
- raise Error, "Metadata file does not exist: #{f}"
86
- end
90
+ raise Error, "Metadata file does not exist: #{f}" unless File.exist?(f)
91
+
87
92
  begin
88
93
  json = JSON.parse(File.read(f))
89
94
  rescue JSON::ParserError => e
@@ -1,14 +1,15 @@
1
- require "librarian/environment"
2
- require "librarian/puppet/dsl"
3
- require "librarian/puppet/source"
4
- require "librarian/puppet/lockfile"
1
+ # frozen_string_literal: true
2
+
3
+ require 'librarian/environment'
4
+ require 'librarian/puppet/dsl'
5
+ require 'librarian/puppet/source'
6
+ require 'librarian/puppet/lockfile'
5
7
 
6
8
  module Librarian
7
9
  module Puppet
8
10
  class Environment < Librarian::Environment
9
-
10
11
  def adapter_name
11
- "puppet"
12
+ 'puppet'
12
13
  end
13
14
 
14
15
  def lockfile
@@ -20,12 +21,12 @@ module Librarian
20
21
  end
21
22
 
22
23
  def tmp_path
23
- part = config_db["tmp"] || ".tmp"
24
+ part = config_db['tmp'] || '.tmp'
24
25
  project_path.join(part)
25
26
  end
26
27
 
27
28
  def install_path
28
- part = config_db["path"] || "modules"
29
+ part = config_db['path'] || 'modules'
29
30
  project_path.join(part)
30
31
  end
31
32
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'librarian/puppet/environment'
2
4
  require 'librarian/action/base'
3
5
 
@@ -1,17 +1,17 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Extend Lockfile to normalize module names from acme/mod to acme-mod
2
4
  module Librarian
3
5
  module Puppet
4
6
  class Lockfile < Librarian::Lockfile
5
-
6
7
  # Extend the parser to normalize module names in old .lock files, converting / to -
7
8
  class Parser < Librarian::Lockfile::Parser
8
-
9
9
  include Librarian::Puppet::Util
10
10
 
11
11
  def extract_and_parse_sources(lines)
12
12
  sources = super
13
13
  sources.each do |source|
14
- source[:manifests] = Hash[source[:manifests].map do |name,manifest|
14
+ source[:manifests] = Hash[source[:manifests].map do |name, manifest|
15
15
  [normalize_name(name), manifest]
16
16
  end]
17
17
  end
@@ -23,13 +23,15 @@ module Librarian
23
23
  class << manifests_index
24
24
  include Librarian::Puppet::Util
25
25
  alias_method :old_lookup, :[]
26
- define_method(:[]) { |k| self.old_lookup(normalize_name(k)) }
26
+ define_method(:[]) { |k| old_lookup(normalize_name(k)) }
27
27
  end
28
28
  dependencies = []
29
- while lines.first =~ /^ {2}([\w\-\/]+)(?: \((.*)\))?$/
29
+ while lines.first =~ %r{^ {2}([\w\-/]+)(?: \((.*)\))?$}
30
30
  lines.shift
31
- name, requirement = $1, $2.split(/,\s*/)
32
- dependencies << environment.dsl_class.dependency_type.new(name, requirement, manifests_index[name].source, 'lockfile')
31
+ name = ::Regexp.last_match(1)
32
+ requirement = ::Regexp.last_match(2).split(/,\s*/)
33
+ dependencies << environment.dsl_class.dependency_type.new(name, requirement, manifests_index[name].source,
34
+ 'lockfile')
33
35
  end
34
36
  dependencies
35
37
  end
@@ -41,12 +43,12 @@ module Librarian
41
43
  source = source_type.from_lock_options(environment, source_ast[:options])
42
44
  source_ast[:manifests].each do |manifest_name, manifest_ast|
43
45
  manifests[manifest_name] = ManifestPlaceholder.new(
44
- source,
45
- manifest_name,
46
- manifest_ast[:version],
47
- manifest_ast[:dependencies].map do |k, v|
48
- environment.dsl_class.dependency_type.new(k, v, nil, manifest_name)
49
- end
46
+ source,
47
+ manifest_name,
48
+ manifest_ast[:version],
49
+ manifest_ast[:dependencies].map do |k, v|
50
+ environment.dsl_class.dependency_type.new(k, v, nil, manifest_name)
51
+ end,
50
52
  )
51
53
  end
52
54
  end
@@ -56,7 +58,7 @@ module Librarian
56
58
  def compile(sources_ast)
57
59
  manifests = compile_placeholder_manifests(sources_ast)
58
60
  manifests = manifests.map do |name, manifest|
59
- dependencies = manifest.dependencies.map do |d|
61
+ manifest.dependencies.map do |d|
60
62
  environment.dsl_class.dependency_type.new(d.name, d.requirement, manifests[d.name].source, name)
61
63
  end
62
64
  real = Manifest.new(manifest.source, manifest.name)
@@ -66,13 +68,11 @@ module Librarian
66
68
  end
67
69
  ManifestSet.sort(manifests)
68
70
  end
69
-
70
71
  end
71
72
 
72
73
  def load(string)
73
74
  Parser.new(environment).parse(string)
74
75
  end
75
-
76
76
  end
77
77
  end
78
78
  end
@@ -1,9 +1,10 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'librarian/resolver'
2
4
 
3
5
  module Librarian
4
6
  module Puppet
5
7
  class Resolver < Librarian::Resolver
6
-
7
8
  class Implementation < Librarian::Resolver::Implementation
8
9
  def sourced_dependency_for(dependency)
9
10
  return dependency if dependency.source
@@ -14,7 +15,7 @@ module Librarian
14
15
  end
15
16
 
16
17
  def implementation(spec)
17
- Implementation.new(self, spec, :cyclic => cyclic)
18
+ Implementation.new(self, spec, cyclic: cyclic)
18
19
  end
19
20
  end
20
21
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'json'
2
4
  require 'open-uri'
3
5
  require 'librarian/puppet/util'
@@ -12,11 +14,12 @@ module Librarian
12
14
 
13
15
  def versions
14
16
  return @versions if @versions
17
+
15
18
  @versions = get_versions
16
19
  if @versions.empty?
17
20
  info { "No versions found for module #{name}" }
18
21
  else
19
- debug { " Module #{name} found versions: #{@versions.join(", ")}" }
22
+ debug { " Module #{name} found versions: #{@versions.join(', ')}" }
20
23
  end
21
24
  @versions
22
25
  end
@@ -49,24 +52,19 @@ module Librarian
49
52
  raise Error, "Could not find a local copy of #{name} at #{version}."
50
53
  end
51
54
 
52
- if environment.vendor?
53
- vendor_cache(name, version) unless vendored?(name, version)
54
- end
55
+ vendor_cache(name, version) if environment.vendor? && !vendored?(name, version)
55
56
 
56
57
  cache_version_unpacked! version
57
58
 
58
- if install_path.exist? && rsync? != true
59
- install_path.rmtree
60
- end
59
+ install_path.rmtree if install_path.exist? && rsync? != true
61
60
 
62
61
  unpacked_path = version_unpacked_cache_path(version).join(module_name(name))
63
62
 
64
63
  unless unpacked_path.exist?
65
64
  raise Error, "#{unpacked_path} does not exist, something went wrong. Try removing it manually"
66
- else
67
- cp_r(unpacked_path, install_path)
68
65
  end
69
66
 
67
+ cp_r(unpacked_path, install_path)
70
68
  end
71
69
 
72
70
  def cache_version_unpacked!(version)
@@ -79,9 +77,13 @@ module Librarian
79
77
 
80
78
  module_repository = source.uri.to_s
81
79
 
82
- command = %W{puppet module install --version #{version} --target-dir}
83
- command.push(*[path.to_s, "--module_repository", module_repository, "--modulepath", path.to_s, "--module_working_dir", path.to_s, "--ignore-dependencies", target])
84
- debug { "Executing puppet module install for #{name} #{version}: #{command.join(" ").gsub(module_repository, source.to_s)}" }
80
+ command = %W[puppet module install --version #{version} --target-dir]
81
+ command.push(path.to_s, '--module_repository', module_repository, '--modulepath', path.to_s,
82
+ '--module_working_dir', path.to_s, '--ignore-dependencies', target)
83
+ debug do
84
+ "Executing puppet module install for #{name} #{version}: #{command.join(' ').gsub(module_repository,
85
+ source.to_s)}"
86
+ end
85
87
 
86
88
  begin
87
89
  Librarian::Posix.run!(command)
@@ -89,24 +91,24 @@ module Librarian
89
91
  # Rollback the directory if the puppet module had an error
90
92
  begin
91
93
  path.unlink
92
- rescue => u
94
+ rescue StandardError => u
93
95
  debug("Unable to rollback path #{path}: #{u}")
94
96
  end
95
- tar = Dir[File.join(path.to_s, "**/*.tar.gz")]
96
- msg = ""
97
+ tar = Dir[File.join(path.to_s, '**/*.tar.gz')]
98
+ msg = ''
97
99
  if e.message =~ /Unexpected EOF in archive/ and !tar.empty?
98
100
  file = tar.first
99
101
  msg = " (looks like an incomplete download of #{file})"
100
102
  end
101
- raise Error, "Error executing puppet module install#{msg}. Check that this command succeeds:\n#{command.join(" ")}\nError:\n#{e.message}"
103
+ raise Error,
104
+ "Error executing puppet module install#{msg}. Check that this command succeeds:\n#{command.join(' ')}\nError:\n#{e.message}"
102
105
  end
103
-
104
106
  end
105
107
 
106
108
  def vendor_cache(name, version)
107
109
  url = url(name, version)
108
110
  path = vendored_path(name, version).to_s
109
- debug { "Downloading #{url} into #{path}"}
111
+ debug { "Downloading #{url} into #{path}" }
110
112
  environment.vendor!
111
113
  File.open(path, 'wb') do |f|
112
114
  URI.open(url, 'rb') do |input|
@@ -114,7 +116,6 @@ module Librarian
114
116
  end
115
117
  end
116
118
  end
117
-
118
119
  end
119
120
  end
120
121
  end