kitchen-puppet 3.4.2 → 3.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.
@@ -1,32 +1,33 @@
1
- # encoding: utf-8
2
-
3
- $LOAD_PATH.unshift File.expand_path('../lib', __FILE__)
4
- require 'kitchen-puppet/version'
5
-
6
- Gem::Specification.new do |s|
7
- s.name = 'kitchen-puppet'
8
- s.license = 'Apache-2.0'
9
- s.version = Kitchen::Puppet::VERSION
10
- s.authors = ['Neill Turner']
11
- s.email = ['neillwturner@gmail.com']
12
- s.homepage = 'https://github.com/neillturner/kitchen-puppet'
13
- s.summary = 'puppet provisioner for test-kitchen'
14
- candidates = Dir.glob('{lib}/**/*') + ['README.md', 'provisioner_options.md', 'kitchen-puppet.gemspec']
15
- s.files = candidates.sort
16
- s.platform = Gem::Platform::RUBY
17
- s.require_paths = ['lib']
18
- s.rubyforge_project = '[none]'
19
- s.required_ruby_version = '>= 2.1'
20
- s.add_dependency 'net-ssh', '>= 3'
21
- s.add_dependency 'test-kitchen', '~> 1.4'
22
- s.description = <<-TEXT
23
- == DESCRIPTION:
24
-
25
- Puppet Provisioner for Test Kitchen
26
-
27
- == FEATURES:
28
-
29
- Supports puppet apply, puppet agent, puppet bolt, hiera, hiera-eyaml, hiera-eyaml-gpg, custom facts, librarian-puppet, puppet collections
30
-
31
- TEXT
32
- end
1
+ # encoding: utf-8
2
+
3
+ $LOAD_PATH.unshift File.expand_path('../lib', __FILE__)
4
+ require 'kitchen-puppet/version'
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = 'kitchen-puppet'
8
+ s.license = 'Apache-2.0'
9
+ s.version = Kitchen::Puppet::VERSION
10
+ s.authors = ['Neill Turner']
11
+ s.email = ['neillwturner@gmail.com']
12
+ s.homepage = 'https://github.com/neillturner/kitchen-puppet'
13
+ s.summary = 'puppet provisioner for test-kitchen'
14
+ candidates = Dir.glob('{lib}/**/*') + ['README.md', 'provisioner_options.md', 'kitchen-puppet.gemspec']
15
+ s.files = candidates.sort
16
+ s.platform = Gem::Platform::RUBY
17
+ s.require_paths = ['lib']
18
+ s.rubyforge_project = '[none]'
19
+ s.required_ruby_version = '>= 2.1'
20
+ s.add_dependency 'net-ssh', '>= 3'
21
+ s.add_dependency 'test-kitchen', '>= 1.4'
22
+ s.add_dependency 'librarian-puppet', '>= 3.0'
23
+ s.description = <<-TEXT
24
+ == DESCRIPTION:
25
+
26
+ Puppet Provisioner for Test Kitchen
27
+
28
+ == FEATURES:
29
+
30
+ Supports puppet apply, puppet agent, puppet bolt, hiera, hiera-eyaml, hiera-eyaml-gpg, custom facts, librarian-puppet, puppet collections
31
+
32
+ TEXT
33
+ end
@@ -1,7 +1,7 @@
1
- # encoding: UTF-8
2
-
3
- module Kitchen
4
- module Puppet
5
- VERSION = '3.4.2'.freeze
6
- end
7
- end
1
+ # encoding: UTF-8
2
+
3
+ module Kitchen
4
+ module Puppet
5
+ VERSION = '3.5.0'.freeze
6
+ end
7
+ end
@@ -1,111 +1,111 @@
1
- # -*- encoding: utf-8 -*-
2
-
3
- #
4
- # Author:: Fletcher Nichol (<fnichol@nichol.ca>) Neill Turner (<neillwturner@gmail.com>)
5
- #
6
- # Copyright (C) 2013, Fletcher Nichol, Neill Turner
7
- #
8
- # Licensed under the Apache License, Version 2.0 (the "License");
9
- # you may not use this file except in compliance with the License.
10
- # You may obtain a copy of the License at
11
- #
12
- # http://www.apache.org/licenses/LICENSE-2.0
13
- #
14
- # Unless required by applicable law or agreed to in writing, software
15
- # distributed under the License is distributed on an "AS IS" BASIS,
16
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
- # See the License for the specific language governing permissions and
18
- # limitations under the License.
19
-
20
- require 'kitchen/errors'
21
- require 'kitchen/logging'
22
- require 'librarian/ui'
23
-
24
- module Kitchen
25
- module Provisioner
26
- module Puppet
27
- # Puppet module resolver that uses Librarian-Puppet and a Puppetfile to
28
- # calculate # dependencies.
29
- #
30
- class Librarian
31
- include Logging
32
-
33
- class LoggerUI < ::Librarian::UI
34
- attr_writer :logger
35
-
36
- def initialize(logger)
37
- @logger = logger
38
- end
39
-
40
- def warn(message = nil)
41
- @logger.warn(message || yield)
42
- end
43
-
44
- def debug(message = nil)
45
- @logger.debug(message || yield)
46
- end
47
-
48
- def error(message = nil)
49
- @logger.error(message || yield)
50
- end
51
-
52
- def info(message = nil)
53
- @logger.info(message || yield)
54
- end
55
-
56
- def confirm(message = nil)
57
- @logger.info(message || yield)
58
- end
59
- end
60
-
61
- def initialize(puppetfile, path, logger = Kitchen.logger)
62
- @puppetfile = puppetfile
63
- @path = path
64
- @logger = logger
65
- end
66
-
67
- def self.load!(logger = Kitchen.logger)
68
- load_librarian!(logger)
69
- end
70
-
71
- def resolve
72
- version = ::Librarian::Puppet::VERSION
73
- info("Resolving module dependencies with Librarian-Puppet #{version}...")
74
- debug("Using Puppetfile from #{puppetfile}")
75
-
76
- env = ::Librarian::Puppet::Environment.new(
77
- project_path: File.expand_path(File.dirname(puppetfile))
78
- )
79
- env.ui = LoggerUI.new(@logger)
80
-
81
- env.config_db.local['path'] = path
82
- ::Librarian::Action::Resolve.new(env).run
83
- ::Librarian::Action::Install.new(env).run
84
- end
85
-
86
- attr_reader :puppetfile, :path, :logger
87
-
88
- def self.load_librarian!(logger)
89
- first_load = require 'librarian/puppet'
90
- require 'librarian/puppet/environment'
91
- require 'librarian/action/resolve'
92
- require 'librarian/action/install'
93
-
94
- version = ::Librarian::Puppet::VERSION
95
- if first_load
96
- logger.debug("Librarian-Puppet #{version} library loaded")
97
- else
98
- logger.debug("Librarian-Puppet #{version} previously loaded")
99
- end
100
- rescue LoadError => e
101
- logger.fatal("The `librarian-puppet' gem is missing and must be installed" \
102
- ' or cannot be properly activated. Run' \
103
- ' `gem install librarian-puppet` or add the following to your' \
104
- " Gemfile if you are using Bundler: `gem 'librarian-puppet'`.")
105
- raise UserError,
106
- "Could not load or activate Librarian-Puppet (#{e.message})"
107
- end
108
- end
109
- end
110
- end
111
- end
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ #
4
+ # Author:: Fletcher Nichol (<fnichol@nichol.ca>) Neill Turner (<neillwturner@gmail.com>)
5
+ #
6
+ # Copyright (C) 2013, Fletcher Nichol, Neill Turner
7
+ #
8
+ # Licensed under the Apache License, Version 2.0 (the "License");
9
+ # you may not use this file except in compliance with the License.
10
+ # You may obtain a copy of the License at
11
+ #
12
+ # http://www.apache.org/licenses/LICENSE-2.0
13
+ #
14
+ # Unless required by applicable law or agreed to in writing, software
15
+ # distributed under the License is distributed on an "AS IS" BASIS,
16
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ # See the License for the specific language governing permissions and
18
+ # limitations under the License.
19
+
20
+ require 'kitchen/errors'
21
+ require 'kitchen/logging'
22
+ require 'librarian/ui'
23
+
24
+ module Kitchen
25
+ module Provisioner
26
+ module Puppet
27
+ # Puppet module resolver that uses Librarian-Puppet and a Puppetfile to
28
+ # calculate # dependencies.
29
+ #
30
+ class Librarian
31
+ include Logging
32
+
33
+ class LoggerUI < ::Librarian::UI
34
+ attr_writer :logger
35
+
36
+ def initialize(logger)
37
+ @logger = logger
38
+ end
39
+
40
+ def warn(message = nil)
41
+ @logger.warn(message || yield)
42
+ end
43
+
44
+ def debug(message = nil)
45
+ @logger.debug(message || yield)
46
+ end
47
+
48
+ def error(message = nil)
49
+ @logger.error(message || yield)
50
+ end
51
+
52
+ def info(message = nil)
53
+ @logger.info(message || yield)
54
+ end
55
+
56
+ def confirm(message = nil)
57
+ @logger.info(message || yield)
58
+ end
59
+ end
60
+
61
+ def initialize(puppetfile, path, logger = Kitchen.logger)
62
+ @puppetfile = puppetfile
63
+ @path = path
64
+ @logger = logger
65
+ end
66
+
67
+ def self.load!(logger = Kitchen.logger)
68
+ load_librarian!(logger)
69
+ end
70
+
71
+ def resolve
72
+ version = ::Librarian::Puppet::VERSION
73
+ info("Resolving module dependencies with Librarian-Puppet #{version}...")
74
+ debug("Using Puppetfile from #{puppetfile}")
75
+
76
+ env = ::Librarian::Puppet::Environment.new(
77
+ project_path: File.expand_path(File.dirname(puppetfile))
78
+ )
79
+ env.ui = LoggerUI.new(@logger)
80
+
81
+ env.config_db.local['path'] = path
82
+ ::Librarian::Action::Resolve.new(env).run
83
+ ::Librarian::Action::Install.new(env).run
84
+ end
85
+
86
+ attr_reader :puppetfile, :path, :logger
87
+
88
+ def self.load_librarian!(logger)
89
+ first_load = require 'librarian/puppet'
90
+ require 'librarian/puppet/environment'
91
+ require 'librarian/action/resolve'
92
+ require 'librarian/action/install'
93
+
94
+ version = ::Librarian::Puppet::VERSION
95
+ if first_load
96
+ logger.debug("Librarian-Puppet #{version} library loaded")
97
+ else
98
+ logger.debug("Librarian-Puppet #{version} previously loaded")
99
+ end
100
+ rescue LoadError => e
101
+ logger.fatal("The `librarian-puppet' gem is missing and must be installed" \
102
+ ' or cannot be properly activated. Run' \
103
+ ' `gem install librarian-puppet` or add the following to your' \
104
+ " Gemfile if you are using Bundler: `gem 'librarian-puppet'`.")
105
+ raise UserError,
106
+ "Could not load or activate Librarian-Puppet (#{e.message})"
107
+ end
108
+ end
109
+ end
110
+ end
111
+ end
@@ -1,73 +1,73 @@
1
- # -*- encoding: utf-8 -*-
2
-
3
- #
4
- # Author:: Fletcher Nichol (<fnichol@nichol.ca>) Neill Turner (<neillwturner@gmail.com>) Dennis Lerch (<dennis.lerch@transporeon.com>)
5
- #
6
- # Copyright (C) 2018, Fletcher Nichol, Neill Turner, Dennis Lerch
7
- #
8
- # Licensed under the Apache License, Version 2.0 (the "License");
9
- # you may not use this file except in compliance with the License.
10
- # You may obtain a copy of the License at
11
- #
12
- # http://www.apache.org/licenses/LICENSE-2.0
13
- #
14
- # Unless required by applicable law or agreed to in writing, software
15
- # distributed under the License is distributed on an "AS IS" BASIS,
16
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
- # See the License for the specific language governing permissions and
18
- # limitations under the License.
19
-
20
- require 'kitchen/errors'
21
- require 'kitchen/logging'
22
-
23
- module Kitchen
24
- module Provisioner
25
- module Puppet
26
- # Puppet module resolver that uses R10K and a Puppetfile to
27
- # calculate # dependencies.
28
- #
29
- class R10K
30
- include Logging
31
-
32
- def initialize(puppetfile, path, logger = Kitchen.logger)
33
- @puppetfile = puppetfile
34
- @path = path
35
- @logger = logger
36
- end
37
-
38
- def self.load!(logger = Kitchen.logger)
39
- load_r10k!(logger)
40
- end
41
-
42
- def resolve
43
- version = ::R10K::VERSION
44
- info("Resolving module dependencies with R10K-Puppet #{version}...")
45
- debug("Using Puppetfile from #{puppetfile}")
46
-
47
- ::R10K::Git::Cache.settings[:cache_root] = '.r10k/git'
48
- ::R10K::Forge::ModuleRelease.settings[:cache_root] = '.r10k/cache'
49
-
50
- pf = ::R10K::Puppetfile.new(nil, path, puppetfile)
51
- pf.load
52
- pf.modules.map(&:sync)
53
- end
54
-
55
- attr_reader :puppetfile, :path, :logger
56
-
57
- def self.load_r10k!(logger)
58
- require 'r10k/puppetfile'
59
-
60
- version = ::R10K::VERSION
61
- logger.debug("R10K #{version} library loaded")
62
- rescue LoadError => e
63
- logger.fatal("The `r10k' gem is missing and must be installed" \
64
- ' or cannot be properly activated. Run' \
65
- ' `gem install r10k` or add the following to your' \
66
- " Gemfile if you are using Bundler: `gem 'r10k'`.")
67
- raise UserError,
68
- "Could not load or activate R10K (#{e.message})"
69
- end
70
- end
71
- end
72
- end
73
- end
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ #
4
+ # Author:: Fletcher Nichol (<fnichol@nichol.ca>) Neill Turner (<neillwturner@gmail.com>) Dennis Lerch (<dennis.lerch@transporeon.com>)
5
+ #
6
+ # Copyright (C) 2018, Fletcher Nichol, Neill Turner, Dennis Lerch
7
+ #
8
+ # Licensed under the Apache License, Version 2.0 (the "License");
9
+ # you may not use this file except in compliance with the License.
10
+ # You may obtain a copy of the License at
11
+ #
12
+ # http://www.apache.org/licenses/LICENSE-2.0
13
+ #
14
+ # Unless required by applicable law or agreed to in writing, software
15
+ # distributed under the License is distributed on an "AS IS" BASIS,
16
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ # See the License for the specific language governing permissions and
18
+ # limitations under the License.
19
+
20
+ require 'kitchen/errors'
21
+ require 'kitchen/logging'
22
+
23
+ module Kitchen
24
+ module Provisioner
25
+ module Puppet
26
+ # Puppet module resolver that uses R10K and a Puppetfile to
27
+ # calculate # dependencies.
28
+ #
29
+ class R10K
30
+ include Logging
31
+
32
+ def initialize(puppetfile, path, logger = Kitchen.logger)
33
+ @puppetfile = puppetfile
34
+ @path = path
35
+ @logger = logger
36
+ end
37
+
38
+ def self.load!(logger = Kitchen.logger)
39
+ load_r10k!(logger)
40
+ end
41
+
42
+ def resolve
43
+ version = ::R10K::VERSION
44
+ info("Resolving module dependencies with R10K-Puppet #{version}...")
45
+ debug("Using Puppetfile from #{puppetfile}")
46
+
47
+ ::R10K::Git::Cache.settings[:cache_root] = '.r10k/git'
48
+ ::R10K::Forge::ModuleRelease.settings[:cache_root] = '.r10k/cache'
49
+
50
+ pf = ::R10K::Puppetfile.new(nil, path, puppetfile)
51
+ pf.load
52
+ pf.modules.map(&:sync)
53
+ end
54
+
55
+ attr_reader :puppetfile, :path, :logger
56
+
57
+ def self.load_r10k!(logger)
58
+ require 'r10k/puppetfile'
59
+
60
+ version = ::R10K::VERSION
61
+ logger.debug("R10K #{version} library loaded")
62
+ rescue LoadError => e
63
+ logger.fatal("The `r10k' gem is missing and must be installed" \
64
+ ' or cannot be properly activated. Run' \
65
+ ' `gem install r10k` or add the following to your' \
66
+ " Gemfile if you are using Bundler: `gem 'r10k'`.")
67
+ raise UserError,
68
+ "Could not load or activate R10K (#{e.message})"
69
+ end
70
+ end
71
+ end
72
+ end
73
+ end