ridley 4.1.1 → 4.1.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 693d3b020cb5366d57481f79708376cefba8209c
4
- data.tar.gz: 56163c381348636326fbc231087d068ba0d2c5d3
3
+ metadata.gz: d868df34840cd47fd59e935cd829407bc0bf528d
4
+ data.tar.gz: 60b9b0e0f5b2214df516d92b6e5f9e5238879408
5
5
  SHA512:
6
- metadata.gz: 23915d3e57d0533f7c7d6af90272fb830aa9acf956ab08617d298d8f439d67d5e8e1bf9d7dfcb9b0e7e7f1f5fb2493bc8674e68656e3f132e5385b62bb9b2d58
7
- data.tar.gz: a792da783a486a4ad3de98e11e0bf0d49751bfdc66ca6e591ad4d88f920f005b638ec0e9da2486992dd5736c447e484a2da9497e41ad6ec4cfeaf30b7b1bfece
6
+ metadata.gz: 66474151072d89a2ecaa988a66c185eabbbc4b50b0b072fd8fd33baf931b3d0008c1f027951efb5ca386c8dc372a317b7163f720704ac4bdd7245aca0474584e
7
+ data.tar.gz: 7c07e8dceef19387f4e8bda86cef751c9a14cd12f3d72d99b112a1381a55a7bf577ac30896ce3f03e91dff5cd02f9efbd00bab1448f0a6a5c1f7e4149ea758ba
@@ -1,3 +1,9 @@
1
+ # 4.1.2
2
+
3
+ * Fixed: permission denied errors on Windows while uploading cookbooks
4
+ * Fixed: no proc error when evaluating client_key option
5
+ * Bump required version of retryable
6
+
1
7
  # 4.1.1
2
8
 
3
9
  * Enhancements
@@ -139,6 +139,7 @@ module Ridley
139
139
  end
140
140
 
141
141
  unless verify_client_key(@options[:client_key])
142
+ @options[:client_key] = @options[:client_key].call if @options[:client_key].kind_of? Proc
142
143
  @options[:client_key] = File.expand_path(@options[:client_key])
143
144
  raise Errors::ClientKeyFileNotFoundOrInvalid, "client key is invalid or not found at: '#{@options[:client_key]}'" unless File.exist?(@options[:client_key]) && verify_client_key(::IO.read(@options[:client_key]))
144
145
  end
@@ -145,7 +145,7 @@ module Ridley
145
145
  local = Tempfile.new('ridley-stream')
146
146
  local.binmode
147
147
 
148
- retryable(tries: retries, on: OpenURI::HTTPError, sleep: retry_interval) do
148
+ Retryable.retryable(tries: retries, on: OpenURI::HTTPError, sleep: retry_interval) do
149
149
  open(target, 'rb', headers) do |remote|
150
150
  body = remote.read
151
151
  case remote.content_encoding
@@ -230,7 +230,17 @@ module Ridley
230
230
  update(cookbook, Ridley::Helpers.options_slice(options, :force, :freeze))
231
231
  ensure
232
232
  # Destroy the compiled metadata only if it was created
233
- File.delete(compiled_metadata) unless compiled_metadata.nil?
233
+ if compiled_metadata
234
+ # The garbage collector still has a reference to the file we'd
235
+ # like to delete. On *nix this isn't a big deal, but on Windows
236
+ # [ ruby 2.0.0p451 (2014-02-24) [i386-mingw32] ] open files
237
+ # cannot be deleted, so we're forced to garbage collect to
238
+ # ensure we can delete the file. This is CRITICAL to ensure that
239
+ # a stale metadata file isn't left on disk because next time we
240
+ # would use that file instead of recompiling.
241
+ GC.start
242
+ File.delete(compiled_metadata)
243
+ end
234
244
  end
235
245
 
236
246
  # Return a list of versions for the given cookbook present on the remote Chef server
@@ -1,3 +1,3 @@
1
1
  module Ridley
2
- VERSION = "4.1.1"
2
+ VERSION = "4.1.2"
3
3
  end
@@ -31,7 +31,7 @@ Gem::Specification.new do |s|
31
31
  s.add_dependency 'json', '>= 1.7.7'
32
32
  s.add_dependency 'mixlib-authentication', '>= 1.3.0'
33
33
  s.add_dependency 'net-http-persistent', '>= 2.8'
34
- s.add_dependency 'retryable'
34
+ s.add_dependency 'retryable', '>= 2.0.0'
35
35
  s.add_dependency 'semverse', '~> 1.1'
36
36
 
37
37
  s.add_development_dependency 'buff-ruby_engine', '~> 0.1'
@@ -126,17 +126,17 @@ describe Ridley::CookbookResource do
126
126
  end
127
127
 
128
128
  it 'does not include files that are ignored' do
129
- # These are the SHAs for the files. It's not possible to check that
129
+ # These are the MD5s for the files. It's not possible to check that
130
130
  # the ignored files weren't uploaded, so we just check that the
131
131
  # non-ignored files are the ONLY thing uploaded
132
132
  sandbox_resource.should_receive(:create).with([
133
133
  "211a3a8798d4acd424af15ff8a2e28a5",
134
+ "64ac6346672c6bea4ade983e3d58cd14",
134
135
  "75077ba33d2887cc1746d1ef716bf8b7",
135
136
  "7b1ebd2ff580ca9dc46fb27ec1653bf2",
136
137
  "84e12365e6f4ebe7db6a0e6a92473b16",
137
138
  "a39eb80def9804f4b118099697cc2cd2",
138
139
  "b70ba735f3af47e5d6fc71b91775b34c",
139
- "b946e579ba3640470c16f6fb3445e346",
140
140
  "cafb6869fca13f5c36f24a60de8fb982",
141
141
  "dbf3a6c4ab68a86172be748aced9f46e",
142
142
  "dc6461b5da25775f3ef6a9cc1f6cff9f",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ridley
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.1
4
+ version: 4.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamie Winsor
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-12-08 00:00:00.000000000 Z
12
+ date: 2015-01-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: addressable
@@ -219,14 +219,14 @@ dependencies:
219
219
  requirements:
220
220
  - - ">="
221
221
  - !ruby/object:Gem::Version
222
- version: '0'
222
+ version: 2.0.0
223
223
  type: :runtime
224
224
  prerelease: false
225
225
  version_requirements: !ruby/object:Gem::Requirement
226
226
  requirements:
227
227
  - - ">="
228
228
  - !ruby/object:Gem::Version
229
- version: '0'
229
+ version: 2.0.0
230
230
  - !ruby/object:Gem::Dependency
231
231
  name: semverse
232
232
  requirement: !ruby/object:Gem::Requirement