r10k 2.6.8 → 2.6.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ee2321098498b77bffaa8f677200b8018aafe342ed5662968dfdb02a02abcf23
4
- data.tar.gz: 36335f878adfa601735d9955a9ad02ec599ac9c88962bad34dd8b15f6ab1afa9
3
+ metadata.gz: 58f78e7f2b417c01a90fda95cecea6f68038be0f6ce34647874b1f3710955a78
4
+ data.tar.gz: 61f99c6c4e43c855680abf8dae75a2b6077750d59ecb121f0e343207bb9efc37
5
5
  SHA512:
6
- metadata.gz: 0ab62dc0d0b640502071052d5c0d3528ce61ef85f803a5abe21c1f31708847eb8c26c70e7e31873541ad0740240468b4cd860c9335bf6bf66f31188f0f6d9752
7
- data.tar.gz: 5e5bc2f3179172cb5d48a4c9f6f52594fb32131bc5b0ec63e176dde3c200e8948ce88622530ddbbefed9c6e0625dc310f9d77d2a3f7da96a7ed43394e5d672fb
6
+ metadata.gz: 2c10471595015b12c3f5af303ea35e81baf43fa4d3ad483a3f47b5efa495a427d70a7706ba3c7ea5ec526d6a086138234017e6bc6a03cbb9aeb98c7beaad27a2
7
+ data.tar.gz: b4f5f724e5bd480d0ba52fc32d0c5d5584ea6e2724c616de1d3a60fd3c639ddbae2643990b9694999f3d497ce3197c5db241e9105c0dd9d843f696f4fcb5af83
@@ -0,0 +1,4 @@
1
+ Please add all notable changes to the "Unreleased" section of the CHANGELOG in the format:
2
+ ```
3
+ - (JIRA ticket) Summary of changes. [Issue or PR #](link to issue or PR)
4
+ ```
@@ -4,7 +4,6 @@ on:
4
4
  push:
5
5
  branches:
6
6
  - master
7
- - 2.6.x
8
7
  paths:
9
8
  - 'lib/r10k/version.rb'
10
9
 
@@ -1,6 +1,14 @@
1
1
  CHANGELOG
2
2
  =========
3
3
 
4
+ Unreleased
5
+ ----------
6
+
7
+ 2.6.9
8
+ ----
9
+
10
+ - Don't purge root when using `puppetfile install`. [#1084](https://github.com/puppetlabs/r10k/issues/1084)
11
+
4
12
  2.6.8
5
13
  ----
6
14
 
data/CODEOWNERS CHANGED
@@ -1 +1 @@
1
- * @puppetlabs/puppetserver-maintainers
1
+ * @puppetlabs/puppetserver-maintainers @adrienthebo @dhollinger
@@ -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
  #
@@ -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.8'
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.8
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-03-06 00:00:00.000000000 Z
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.3
541
+ rubygems_version: 3.0.8
541
542
  signing_key:
542
543
  specification_version: 4
543
544
  summary: Puppet environment and module deployment