lib/bolt/module_installer/specs.rb in bolt-3.24.0 vs lib/bolt/module_installer/specs.rb in bolt-3.25.0
- old
+ new
@@ -5,12 +5,14 @@
require_relative 'specs/git_spec'
module Bolt
class ModuleInstaller
class Specs
- def initialize(specs = [])
- @specs = []
+ def initialize(specs = [], config = {})
+ @specs = []
+ @config = config
+
add_specs(specs)
assert_unique_names
end
# Creates a list of specs from the modules in a Puppetfile object.
@@ -47,10 +49,10 @@
# Parses a spec hash into a spec object.
#
private def spec_from_hash(hash)
return ForgeSpec.new(hash) if ForgeSpec.implements?(hash)
- return GitSpec.new(hash) if GitSpec.implements?(hash)
+ return GitSpec.new(hash, @config) if GitSpec.implements?(hash)
raise Bolt::ValidationError, <<~MESSAGE.chomp
Invalid module specification:
#{hash.to_yaml.lines.drop(1).join.chomp}