r10k 2.6.8 → 2.6.9
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 +4 -4
- data/.github/pull_request_template.md +4 -0
- data/.github/workflows/release.yml +0 -1
- data/CHANGELOG.mkd +8 -0
- data/CODEOWNERS +1 -1
- data/lib/r10k/puppetfile.rb +7 -3
- data/lib/r10k/version.rb +1 -1
- data/spec/unit/puppetfile_spec.rb +20 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 58f78e7f2b417c01a90fda95cecea6f68038be0f6ce34647874b1f3710955a78
|
4
|
+
data.tar.gz: 61f99c6c4e43c855680abf8dae75a2b6077750d59ecb121f0e343207bb9efc37
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c10471595015b12c3f5af303ea35e81baf43fa4d3ad483a3f47b5efa495a427d70a7706ba3c7ea5ec526d6a086138234017e6bc6a03cbb9aeb98c7beaad27a2
|
7
|
+
data.tar.gz: b4f5f724e5bd480d0ba52fc32d0c5d5584ea6e2724c616de1d3a60fd3c639ddbae2643990b9694999f3d497ce3197c5db241e9105c0dd9d843f696f4fcb5af83
|
data/CHANGELOG.mkd
CHANGED
data/CODEOWNERS
CHANGED
@@ -1 +1 @@
|
|
1
|
-
* @puppetlabs/puppetserver-maintainers
|
1
|
+
* @puppetlabs/puppetserver-maintainers @adrienthebo @dhollinger
|
data/lib/r10k/puppetfile.rb
CHANGED
@@ -128,7 +128,9 @@ class Puppetfile
|
|
128
128
|
def managed_directories
|
129
129
|
self.load unless @loaded
|
130
130
|
|
131
|
-
@managed_content.keys
|
131
|
+
dirs = @managed_content.keys
|
132
|
+
dirs.delete(real_basedir)
|
133
|
+
dirs
|
132
134
|
end
|
133
135
|
|
134
136
|
# Returns an array of the full paths to all the content being managed.
|
@@ -180,8 +182,6 @@ class Puppetfile
|
|
180
182
|
end
|
181
183
|
|
182
184
|
def validate_install_path(path, modname)
|
183
|
-
real_basedir = Pathname.new(basedir).cleanpath.to_s
|
184
|
-
|
185
185
|
unless /^#{Regexp.escape(real_basedir)}.*/ =~ path
|
186
186
|
raise R10K::Error.new("Puppetfile cannot manage content '#{modname}' outside of containing environment: #{path} is not within #{real_basedir}")
|
187
187
|
end
|
@@ -189,6 +189,10 @@ class Puppetfile
|
|
189
189
|
true
|
190
190
|
end
|
191
191
|
|
192
|
+
def real_basedir
|
193
|
+
Pathname.new(basedir).cleanpath.to_s
|
194
|
+
end
|
195
|
+
|
192
196
|
class DSL
|
193
197
|
# A barebones implementation of the Puppetfile DSL
|
194
198
|
#
|
data/lib/r10k/version.rb
CHANGED
@@ -2,5 +2,5 @@ module R10K
|
|
2
2
|
# When updating to a new major (X) or minor (Y) version, include `#major` or
|
3
3
|
# `#minor` (respectively) in your commit message to trigger the appropriate
|
4
4
|
# release. Otherwise, a new patch (Z) version will be released.
|
5
|
-
VERSION = '2.6.
|
5
|
+
VERSION = '2.6.9'
|
6
6
|
end
|
@@ -128,6 +128,26 @@ describe R10K::Puppetfile do
|
|
128
128
|
end
|
129
129
|
end
|
130
130
|
|
131
|
+
describe '#managed_directories' do
|
132
|
+
it 'returns an array of paths that can be purged' do
|
133
|
+
allow(R10K::Module).to receive(:new).with('puppet/test_module', subject.moduledir, '1.2.3', anything).and_call_original
|
134
|
+
|
135
|
+
subject.add_module('puppet/test_module', '1.2.3')
|
136
|
+
expect(subject.managed_directories).to match_array(["/some/nonexistent/basedir/modules"])
|
137
|
+
end
|
138
|
+
|
139
|
+
context 'with a module with install_path == \'\'' do
|
140
|
+
it 'basedir isn\'t in the list of paths to purge' do
|
141
|
+
module_opts = { install_path: '', git: 'git@example.com:puppet/test_module.git' }
|
142
|
+
|
143
|
+
allow(R10K::Module).to receive(:new).with('puppet/test_module', subject.basedir, module_opts, anything).and_call_original
|
144
|
+
|
145
|
+
subject.add_module('puppet/test_module', module_opts)
|
146
|
+
expect(subject.managed_directories).to be_empty
|
147
|
+
end
|
148
|
+
end
|
149
|
+
end
|
150
|
+
|
131
151
|
describe "evaluating a Puppetfile" do
|
132
152
|
def expect_wrapped_error(orig, pf_path, wrapped_error)
|
133
153
|
expect(orig).to be_a_kind_of(R10K::Error)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: r10k
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.6.
|
4
|
+
version: 2.6.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adrien Thebo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-10-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colored
|
@@ -194,6 +194,7 @@ executables:
|
|
194
194
|
extensions: []
|
195
195
|
extra_rdoc_files: []
|
196
196
|
files:
|
197
|
+
- ".github/pull_request_template.md"
|
197
198
|
- ".github/workflows/release.yml"
|
198
199
|
- ".gitignore"
|
199
200
|
- ".travis.yml"
|
@@ -537,7 +538,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
537
538
|
- !ruby/object:Gem::Version
|
538
539
|
version: '0'
|
539
540
|
requirements: []
|
540
|
-
rubygems_version: 3.0.
|
541
|
+
rubygems_version: 3.0.8
|
541
542
|
signing_key:
|
542
543
|
specification_version: 4
|
543
544
|
summary: Puppet environment and module deployment
|