r10k 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/CHANGELOG.mkd +31 -0
- data/doc/dynamic-environments/configuration.mkd +6 -5
- data/lib/r10k/deployment/config/loader.rb +19 -1
- data/lib/r10k/version.rb +1 -1
- data/r10k.gemspec +1 -1
- data/spec/unit/deployment/config/loader_spec.rb +33 -5
- metadata +14 -13
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZTFjN2Q4ODIzMTI4MDAzZjc3MzI4MzA0ZDJlMzhmMDI0ODIyMDFiMQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YWZhNDNlN2RmMmFhNjRhMTNlNTJmZGExZDdkMmVjYjA3YTRkY2ZjMw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZGVjY2M1MDg2NTQ1NTRiZDViY2VmMTQxYTBjNDk4ZDM2NmNmY2YyODcyMWI0
|
10
|
+
NjMzYzcwNzQ5NzhlMTEwY2ZlOTNkYjUzYThiNGNhY2NhMzAxNzk2MzA3M2E1
|
11
|
+
YjYyMWJhZjJkMjZiZmIzOWI0MjVmZWE0MzI2M2ZkOGYxYWY3MmU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NjZjYzFkNTkyYWY0MmIwMWQzODI4NzE5YmM5YmZjYWY4NTVjZmUzZWYxMGE2
|
14
|
+
MWE2YzViZWVhNDc1NmMxYWQzYzE5OTExMTQ4MTBiYjdjMTQ3ZWY3ZWM3YTMz
|
15
|
+
NTg1OTgzYjE2Mzc4MzFiZGNhZDJhNjkzY2I2M2FkYjNlNWQxMmY=
|
data/CHANGELOG.mkd
CHANGED
@@ -1,6 +1,37 @@
|
|
1
1
|
CHANGELOG
|
2
2
|
=========
|
3
3
|
|
4
|
+
2.0.1
|
5
|
+
-----
|
6
|
+
|
7
|
+
2015/06/09
|
8
|
+
|
9
|
+
This release fixes a couple of issues and defects found in 2.0.0.
|
10
|
+
|
11
|
+
### Thanks
|
12
|
+
|
13
|
+
Thanks to Tim Meusel (https://github.com/bastelfreak) and ktreese
|
14
|
+
(https://github.com/ktreese) for reporting GH-443 and GH-447.
|
15
|
+
|
16
|
+
### User notes
|
17
|
+
|
18
|
+
(RK-117), (GH-443), (GH-447) Add minitar as runtime dependency
|
19
|
+
|
20
|
+
Minitar is a hard runtime dependency of r10k as part of the new Forge module
|
21
|
+
implementation, but was only added as a development dependency which means that
|
22
|
+
r10k could be installed without all of the required runtime dependencies. This
|
23
|
+
oversight has been corrected; r10k will now pull in minitar at installation
|
24
|
+
time.
|
25
|
+
|
26
|
+
(RK-118) Readd '/etc/r10k.yaml' to config search path
|
27
|
+
|
28
|
+
The '/etc/r10k.yaml' config path was deprecated in r10k 1.5.0, but this
|
29
|
+
deprecation was only a soft deprecation and was easy to miss. While 2.0.0 is a
|
30
|
+
backwards incompatible release it was too aggressive to remove this entirely, so
|
31
|
+
'/etc/r10k.yaml' will continue to be respected/read in r10k 2.x. If this file is
|
32
|
+
present and used then a deprecation notice will be logged. Apologies for the
|
33
|
+
churn on this!
|
34
|
+
|
4
35
|
2.0.0
|
5
36
|
-----
|
6
37
|
|
@@ -21,12 +21,13 @@ locations for a configuration file.
|
|
21
21
|
|
22
22
|
* `{current working directory}/r10k.yaml`
|
23
23
|
* `/etc/puppetlabs/r10k/r10k.yaml` (1.5.0 and later)
|
24
|
-
* `/etc/r10k.yaml` (
|
24
|
+
* `/etc/r10k.yaml` (deprecated in 1.5.0)
|
25
25
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
26
|
+
In 1.5.0 r10k added `/etc/puppetlabs/r10k/r10k.yaml` to the configuration search
|
27
|
+
path. The old location, `/etc/r10k.yaml` has been deprecated in favor of the new
|
28
|
+
location. If both `/etc/puppetlabs/r10k/r10k.yaml` and `/etc/r10k.yaml` exist
|
29
|
+
and explicit configuration file has not been given, r10k will log a warning and
|
30
|
+
use `/etc/puppetlabs/r10k/r10.yaml`.
|
30
31
|
|
31
32
|
General options
|
32
33
|
---------------
|
@@ -11,6 +11,7 @@ module R10K
|
|
11
11
|
|
12
12
|
CONFIG_FILE = 'r10k.yaml'
|
13
13
|
DEFAULT_LOCATION = File.join('/etc/puppetlabs/r10k', CONFIG_FILE)
|
14
|
+
OLD_DEFAULT_LOCATION = File.join('/etc', CONFIG_FILE)
|
14
15
|
|
15
16
|
# Search for a deployment configuration file (r10k.yaml) in several locations
|
16
17
|
def initialize
|
@@ -20,7 +21,21 @@ module R10K
|
|
20
21
|
|
21
22
|
# @return [String] The path to the first valid configfile
|
22
23
|
def search
|
23
|
-
|
24
|
+
|
25
|
+
# If both default files are present, issue a warning.
|
26
|
+
if (File.file? DEFAULT_LOCATION) && (File.file? OLD_DEFAULT_LOCATION)
|
27
|
+
logger.warn "Both #{DEFAULT_LOCATION} and #{OLD_DEFAULT_LOCATION} configuration files exist."
|
28
|
+
logger.warn "#{DEFAULT_LOCATION} will be used."
|
29
|
+
end
|
30
|
+
|
31
|
+
path = @loadpath.find {|filename| File.file? filename}
|
32
|
+
|
33
|
+
if path == OLD_DEFAULT_LOCATION
|
34
|
+
logger.warn "The r10k configuration file at #{OLD_DEFAULT_LOCATION} is deprecated."
|
35
|
+
logger.warn "Please move your r10k configuration to #{DEFAULT_LOCATION}."
|
36
|
+
end
|
37
|
+
|
38
|
+
path
|
24
39
|
end
|
25
40
|
|
26
41
|
private
|
@@ -33,6 +48,9 @@ module R10K
|
|
33
48
|
# Add the AIO location for of r10k.yaml
|
34
49
|
@loadpath << DEFAULT_LOCATION
|
35
50
|
|
51
|
+
# Add the old default location last.
|
52
|
+
@loadpath << OLD_DEFAULT_LOCATION
|
53
|
+
|
36
54
|
@loadpath
|
37
55
|
end
|
38
56
|
end
|
data/lib/r10k/version.rb
CHANGED
data/r10k.gemspec
CHANGED
@@ -33,10 +33,10 @@ Gem::Specification.new do |s|
|
|
33
33
|
s.add_dependency 'faraday_middleware-multi_json', '~> 0.0.6'
|
34
34
|
|
35
35
|
s.add_dependency 'semantic_puppet', '~> 0.1.0'
|
36
|
+
s.add_dependency 'minitar'
|
36
37
|
|
37
38
|
s.add_development_dependency 'rspec', '~> 3.1'
|
38
39
|
|
39
|
-
s.add_development_dependency 'minitar'
|
40
40
|
|
41
41
|
s.add_development_dependency 'yard', '~> 0.8.7.3'
|
42
42
|
|
@@ -8,16 +8,15 @@ describe R10K::Deployment::Config::Loader do
|
|
8
8
|
expect(subject.loadpath).to include('/etc/puppetlabs/r10k/r10k.yaml')
|
9
9
|
end
|
10
10
|
|
11
|
+
it 'includes /etc/r10k.yaml in the loadpath' do
|
12
|
+
expect(subject.loadpath).to include('/etc/r10k.yaml')
|
13
|
+
end
|
14
|
+
|
11
15
|
it 'does include the current working directory in the loadpath' do
|
12
16
|
allow(Dir).to receive(:getwd).and_return '/some/random/path/westvletren'
|
13
17
|
expect(subject.loadpath).to include('/some/random/path/westvletren/r10k.yaml')
|
14
18
|
end
|
15
19
|
|
16
|
-
# This was the old default location that is no longer supported as of 2.0.0.
|
17
|
-
it 'does not include /etc/r10k.yaml in the loadpath' do
|
18
|
-
expect(subject.loadpath).not_to include('/etc/r10k.yaml')
|
19
|
-
end
|
20
|
-
|
21
20
|
it 'does not include /some/random/path/atomium/r10k.yaml in the loadpath' do
|
22
21
|
expect(subject.loadpath).not_to include('/some/random/path/atomium/r10k.yaml')
|
23
22
|
end
|
@@ -28,7 +27,36 @@ describe R10K::Deployment::Config::Loader do
|
|
28
27
|
it 'returns the correct default location' do
|
29
28
|
allow(File).to receive(:file?).and_return false
|
30
29
|
allow(File).to receive(:file?).with('/etc/puppetlabs/r10k/r10k.yaml').and_return true
|
30
|
+
allow(File).to receive(:file?).with('/etc/r10k.yaml').and_return true
|
31
31
|
expect(subject.search).to eq '/etc/puppetlabs/r10k/r10k.yaml'
|
32
32
|
end
|
33
|
+
|
34
|
+
it 'issues a warning if both default locations are present' do
|
35
|
+
allow(File).to receive(:file?).and_return false
|
36
|
+
allow(File).to receive(:file?).with('/etc/puppetlabs/r10k/r10k.yaml').and_return true
|
37
|
+
allow(File).to receive(:file?).with('/etc/r10k.yaml').and_return true
|
38
|
+
|
39
|
+
logger_dbl = double('Logging')
|
40
|
+
allow(subject).to receive(:logger).and_return logger_dbl
|
41
|
+
|
42
|
+
expect(logger_dbl).to receive(:warn).with('Both /etc/puppetlabs/r10k/r10k.yaml and /etc/r10k.yaml configuration files exist.')
|
43
|
+
expect(logger_dbl).to receive(:warn).with('/etc/puppetlabs/r10k/r10k.yaml will be used.')
|
44
|
+
|
45
|
+
subject.search
|
46
|
+
end
|
47
|
+
|
48
|
+
it 'issues a warning if the old location is used' do
|
49
|
+
allow(File).to receive(:file?).and_return false
|
50
|
+
allow(File).to receive(:file?).with('/etc/puppetlabs/r10k/r10k.yaml').and_return false
|
51
|
+
allow(File).to receive(:file?).with('/etc/r10k.yaml').and_return true
|
52
|
+
|
53
|
+
logger_dbl = double('Logging')
|
54
|
+
allow(subject).to receive(:logger).and_return logger_dbl
|
55
|
+
|
56
|
+
expect(logger_dbl).to receive(:warn).with("The r10k configuration file at /etc/r10k.yaml is deprecated.")
|
57
|
+
expect(logger_dbl).to receive(:warn).with('Please move your r10k configuration to /etc/puppetlabs/r10k/r10k.yaml.')
|
58
|
+
|
59
|
+
subject.search
|
60
|
+
end
|
33
61
|
end
|
34
62
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: r10k
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adrien Thebo
|
@@ -123,33 +123,33 @@ dependencies:
|
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: 0.1.0
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
126
|
+
name: minitar
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
|
-
- -
|
129
|
+
- - ! '>='
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: '
|
132
|
-
type: :
|
131
|
+
version: '0'
|
132
|
+
type: :runtime
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
|
-
- -
|
136
|
+
- - ! '>='
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: '
|
138
|
+
version: '0'
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
|
-
name:
|
140
|
+
name: rspec
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
|
-
- -
|
143
|
+
- - ~>
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: '
|
145
|
+
version: '3.1'
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
|
-
- -
|
150
|
+
- - ~>
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version: '
|
152
|
+
version: '3.1'
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: yard
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -514,7 +514,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
514
514
|
version: '0'
|
515
515
|
requirements: []
|
516
516
|
rubyforge_project:
|
517
|
-
rubygems_version: 2.4.
|
517
|
+
rubygems_version: 2.4.8
|
518
518
|
signing_key:
|
519
519
|
specification_version: 4
|
520
520
|
summary: Puppet environment and module deployment
|
@@ -582,3 +582,4 @@ test_files:
|
|
582
582
|
- spec/unit/puppet_forge/unpacker_spec.rb
|
583
583
|
- spec/unit/puppet_forge/connection_spec.rb
|
584
584
|
- spec/unit/puppet_forge/tar/mini_spec.rb
|
585
|
+
has_rdoc:
|