r10k 3.5.1 → 3.5.2

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: 2f2418e73622a4149507cc7e2dde74b68a448689da2a7287b19107fbef0e184e
4
- data.tar.gz: 95acaeb5cb7ad0969ec3f2a3545ab82490bafb9d0fca5da444125bbe780b9836
3
+ metadata.gz: c2fbe395273c7e4fa08a3cb6fa552c05d4745c6c3f8add19b7fe7bb63c03b2d4
4
+ data.tar.gz: 7e59bb47f25fcac554075de51a4b37d55de612cdb43079a1212adf4d3c84707a
5
5
  SHA512:
6
- metadata.gz: dd666a18fe5df938ab5a151cf411ac335e0f3f151428fe8589010ff699b832609fc58e189c46f52894d9d6b9d8e63156ed928bd14d2ed02d5d9a113fc0c5feb0
7
- data.tar.gz: 40307661c96a21d00595271fa21836175c993dc937504b82b449218e39cd3804000a7c24c32a52aa570098b450fd35417573190dd9d603ac087e217f391aacb4
6
+ metadata.gz: 7925d5b8d45bcb502ce11a4d190048f3bcf03310ee42a9128a5ff66e72425a48269a35fba1177905a895175a096b45441fb2f0090e174ecd2bbd86217d5ed641
7
+ data.tar.gz: 796889d0936244967388973e0903e9011cc11b11a8fcb6b91bc083f13e8fb4e1400b96f79337f778576d04c917e3cc170b1094e124f3a05a8174b1de82d28824
@@ -4,12 +4,16 @@ CHANGELOG
4
4
  Unreleased
5
5
  ----
6
6
 
7
+ 3.5.2
8
+ -----
9
+
10
+ - (RK-319) Clean up tmp directories used for downloading modules
11
+
7
12
  3.5.1
8
13
  -----
9
14
 
10
15
  - Upgrade Rugged Gemfile dependency for local development to ~> 1.0
11
16
 
12
-
13
17
  3.5.0
14
18
  -----
15
19
 
@@ -212,14 +212,14 @@ module R10K
212
212
 
213
213
  # Remove the temporary directory used for unpacking the module.
214
214
  def cleanup_unpack_path
215
- if unpack_path.exist?
215
+ if unpack_path.parent.exist?
216
216
  unpack_path.parent.rmtree
217
217
  end
218
218
  end
219
219
 
220
220
  # Remove the downloaded module release.
221
221
  def cleanup_download_path
222
- if download_path.exist?
222
+ if download_path.parent.exist?
223
223
  download_path.parent.rmtree
224
224
  end
225
225
  end
@@ -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 = '3.5.1'
5
+ VERSION = '3.5.2'
6
6
  end
@@ -166,33 +166,37 @@ describe R10K::Forge::ModuleRelease do
166
166
  end
167
167
 
168
168
  describe "#cleanup_unpack_path" do
169
- it "ignores the unpack_path if it doesn't exist" do
170
- expect(unpack_path).to receive(:exist?).and_return false
171
- expect(unpack_path).to_not receive(:parent)
169
+ it "ignores the unpack_path if the parent doesn't exist" do
170
+ parent = instance_double('Pathname')
171
+ expect(parent).to receive(:exist?).and_return false
172
+ expect(parent).to_not receive(:rmtree)
173
+ expect(unpack_path).to receive(:parent).and_return(parent)
172
174
  subject.cleanup_unpack_path
173
175
  end
174
176
 
175
177
  it "removes the containing directory of unpack_path if it exists" do
176
178
  parent = instance_double('Pathname')
177
179
  expect(parent).to receive(:rmtree)
178
- expect(unpack_path).to receive(:exist?).and_return true
179
- expect(unpack_path).to receive(:parent).and_return(parent)
180
+ expect(parent).to receive(:exist?).and_return true
181
+ expect(unpack_path).to receive(:parent).and_return(parent).exactly(2).times
180
182
  subject.cleanup_unpack_path
181
183
  end
182
184
  end
183
185
 
184
186
  describe "#cleanup_download_path" do
185
- it "ignores the download_path if it doesn't exist" do
186
- expect(download_path).to receive(:exist?).and_return false
187
- expect(download_path).to_not receive(:parent)
187
+ it "ignores the download_path if the parent doesn't exist" do
188
+ parent = instance_double('Pathname')
189
+ expect(parent).to receive(:exist?).and_return false
190
+ expect(parent).to_not receive(:rmtree)
191
+ expect(download_path).to receive(:parent).and_return(parent)
188
192
  subject.cleanup_download_path
189
193
  end
190
194
 
191
195
  it "removes the containing directory of download_path if it exists" do
192
196
  parent = instance_double('Pathname')
193
197
  expect(parent).to receive(:rmtree)
194
- expect(download_path).to receive(:exist?).and_return true
195
- expect(download_path).to receive(:parent).and_return(parent)
198
+ expect(parent).to receive(:exist?).and_return true
199
+ expect(download_path).to receive(:parent).and_return(parent).exactly(2).times
196
200
  subject.cleanup_download_path
197
201
  end
198
202
  end
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: 3.5.1
4
+ version: 3.5.2
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-06-08 00:00:00.000000000 Z
11
+ date: 2020-07-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colored2