berkshelf 3.2.2 → 3.2.3
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/CHANGELOG.md +5 -0
- data/Gemfile +1 -1
- data/README.md +0 -3
- data/berkshelf.gemspec +1 -1
- data/lib/berkshelf/community_rest.rb +1 -1
- data/lib/berkshelf/errors.rb +47 -0
- data/lib/berkshelf/uploader.rb +2 -1
- data/lib/berkshelf/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 337dda20878f2853b12de31de35dc8494dd7db0f
|
4
|
+
data.tar.gz: 64cac8f89b420097552be7c5f85bd1b497b250f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f63ff185f5d45c161e6e86e82001097d439d53c0eef3c0f8643f9038a5824fa83a90017b52890d66c17e03cea5a5653fc575491b305d65f32339179ed5e8b462
|
7
|
+
data.tar.gz: 67d89ec5fb953f45ffc7560cf204e3b42a1d7ed1f3d62d97e3b5d767f05a03f1bbd7acbb870c098b016ade7668d284446dfbd65abd6ee5c87e7521d5c631db8e
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
> This is a high level digest of changes. For the complete CHANGELOG diff two tags in the project's [commit history](https://github.com/berkshelf/berkshelf/commits/master).
|
2
2
|
|
3
|
+
# 3.2.3
|
4
|
+
|
5
|
+
* Bug Fixes
|
6
|
+
* Specifying the --skip-syntax-check flag to upload will once again cause validations to be skipped
|
7
|
+
|
3
8
|
# 3.2.2
|
4
9
|
|
5
10
|
* Enhancements
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -44,9 +44,6 @@ Ruby 1.9.1 and 1.9.2 are not officially supported. If you encounter problems, pl
|
|
44
44
|
Berkshelf will search in specific locations for a configuration file. In order:
|
45
45
|
|
46
46
|
$PWD/.berkshelf/config.json
|
47
|
-
$PWD/berkshelf/config.json
|
48
|
-
$PWD/berkshelf-config.json
|
49
|
-
$PWD/config.json
|
50
47
|
~/.berkshelf/config.json
|
51
48
|
|
52
49
|
You are encouraged to keep project-specific configuration in the `$PWD/.berkshelf` directory. A default configuration file is generated for you, but you can update the values to suit your needs.
|
data/berkshelf.gemspec
CHANGED
@@ -38,7 +38,7 @@ Gem::Specification.new do |s|
|
|
38
38
|
s.add_dependency 'cleanroom', '~> 1.0'
|
39
39
|
s.add_dependency 'faraday', '~> 0.9.0'
|
40
40
|
s.add_dependency 'minitar', '~> 0.5.4'
|
41
|
-
s.add_dependency 'retryable', '~>
|
41
|
+
s.add_dependency 'retryable', '~> 2.0'
|
42
42
|
s.add_dependency 'ridley', '~> 4.0'
|
43
43
|
s.add_dependency 'solve', '~> 1.1'
|
44
44
|
s.add_dependency 'thor', '~> 0.19'
|
@@ -182,7 +182,7 @@ module Berkshelf
|
|
182
182
|
local = Tempfile.new('community-rest-stream')
|
183
183
|
local.binmode
|
184
184
|
|
185
|
-
retryable(tries: retries, on: OpenURI::HTTPError, sleep: retry_interval) do
|
185
|
+
Retryable.retryable(tries: retries, on: OpenURI::HTTPError, sleep: retry_interval) do
|
186
186
|
open(target, 'rb', open_uri_options) do |remote|
|
187
187
|
local.write(remote.read)
|
188
188
|
end
|
data/lib/berkshelf/errors.rb
CHANGED
@@ -15,6 +15,7 @@ module Berkshelf
|
|
15
15
|
class InternalError < BerkshelfError; set_status_code(99); end
|
16
16
|
class ArgumentError < InternalError; end
|
17
17
|
class AbstractFunction < InternalError; end
|
18
|
+
class ConfigurationError < InternalError; end
|
18
19
|
|
19
20
|
class BerksfileNotFound < BerkshelfError
|
20
21
|
set_status_code(100)
|
@@ -28,6 +29,8 @@ module Berkshelf
|
|
28
29
|
def to_s
|
29
30
|
"No Berksfile or Berksfile.lock found at '#{@filepath}'!"
|
30
31
|
end
|
32
|
+
|
33
|
+
alias_method :message, :to_s
|
31
34
|
end
|
32
35
|
|
33
36
|
class CookbookNotFound < BerkshelfError
|
@@ -46,6 +49,8 @@ module Berkshelf
|
|
46
49
|
"Cookbook '#{@name}' not found #{@location}!"
|
47
50
|
end
|
48
51
|
end
|
52
|
+
|
53
|
+
alias_method :message, :to_s
|
49
54
|
end
|
50
55
|
|
51
56
|
class DuplicateDependencyDefined < BerkshelfError
|
@@ -61,6 +66,8 @@ module Berkshelf
|
|
61
66
|
out << "different groups."
|
62
67
|
out
|
63
68
|
end
|
69
|
+
|
70
|
+
alias_method :message, :to_s
|
64
71
|
end
|
65
72
|
|
66
73
|
class NoSolutionError < BerkshelfError
|
@@ -78,6 +85,8 @@ module Berkshelf
|
|
78
85
|
@original_exception.to_s +
|
79
86
|
"Unable to find a solution for demands: #{demands.join(', ')}"
|
80
87
|
end
|
88
|
+
|
89
|
+
alias_method :message, :to_s
|
81
90
|
end
|
82
91
|
|
83
92
|
class CookbookSyntaxError < BerkshelfError; set_status_code(107); end
|
@@ -108,6 +117,8 @@ module Berkshelf
|
|
108
117
|
" #{@error_message}",
|
109
118
|
].join("\n")
|
110
119
|
end
|
120
|
+
|
121
|
+
alias_method :message, :to_s
|
111
122
|
end
|
112
123
|
|
113
124
|
class MismatchedCookbookName < BerkshelfError
|
@@ -136,6 +147,8 @@ module Berkshelf
|
|
136
147
|
out << "is often a cause of confusion for dependency solving."
|
137
148
|
out
|
138
149
|
end
|
150
|
+
|
151
|
+
alias_method :message, :to_s
|
139
152
|
end
|
140
153
|
|
141
154
|
class InvalidConfiguration < BerkshelfError
|
@@ -155,6 +168,8 @@ module Berkshelf
|
|
155
168
|
|
156
169
|
out.strip
|
157
170
|
end
|
171
|
+
|
172
|
+
alias_method :message, :to_s
|
158
173
|
end
|
159
174
|
|
160
175
|
class InsufficientPrivledges < BerkshelfError
|
@@ -169,6 +184,8 @@ module Berkshelf
|
|
169
184
|
"path to the current user, chmod the permissions to include the " \
|
170
185
|
"user, or choose a different path."
|
171
186
|
end
|
187
|
+
|
188
|
+
alias_method :message, :to_s
|
172
189
|
end
|
173
190
|
|
174
191
|
class DependencyNotFound < BerkshelfError
|
@@ -197,6 +214,8 @@ module Berkshelf
|
|
197
214
|
out
|
198
215
|
end
|
199
216
|
end
|
217
|
+
|
218
|
+
alias_method :message, :to_s
|
200
219
|
end
|
201
220
|
|
202
221
|
class CommunitySiteError < BerkshelfError
|
@@ -211,6 +230,8 @@ module Berkshelf
|
|
211
230
|
"An unexpected error occurred retrieving #{@message} from the cookbook " \
|
212
231
|
"site at '#{@api_uri}'."
|
213
232
|
end
|
233
|
+
|
234
|
+
alias_method :message, :to_s
|
214
235
|
end
|
215
236
|
|
216
237
|
class CookbookValidationFailure < BerkshelfError
|
@@ -228,6 +249,8 @@ module Berkshelf
|
|
228
249
|
def to_s
|
229
250
|
"The cookbook downloaded for #{@dependency} did not satisfy the constraint."
|
230
251
|
end
|
252
|
+
|
253
|
+
alias_method :message, :to_s
|
231
254
|
end
|
232
255
|
|
233
256
|
class UploadFailure < BerkshelfError; end
|
@@ -244,6 +267,8 @@ module Berkshelf
|
|
244
267
|
"already exists and is frozen on the Chef Server. Use the --force " \
|
245
268
|
"option to override."
|
246
269
|
end
|
270
|
+
|
271
|
+
alias_method :message, :to_s
|
247
272
|
end
|
248
273
|
|
249
274
|
class OutdatedDependency < BerkshelfError
|
@@ -267,6 +292,8 @@ module Berkshelf
|
|
267
292
|
"Try running `berks update #{@dependency.name}`, which will try to find '#{@dependency.name}' matching " +
|
268
293
|
"'#{@dependency.version_constraint}'."
|
269
294
|
end
|
295
|
+
|
296
|
+
alias_method :message, :to_s
|
270
297
|
end
|
271
298
|
|
272
299
|
class EnvironmentNotFound < BerkshelfError
|
@@ -279,6 +306,8 @@ module Berkshelf
|
|
279
306
|
def to_s
|
280
307
|
"The environment '#{@environment_name}' does not exist"
|
281
308
|
end
|
309
|
+
|
310
|
+
alias_method :message, :to_s
|
282
311
|
end
|
283
312
|
|
284
313
|
class ChefConnectionError < BerkshelfError
|
@@ -299,6 +328,8 @@ module Berkshelf
|
|
299
328
|
def to_s
|
300
329
|
"The file at '#{@destination}' is not a known compression type"
|
301
330
|
end
|
331
|
+
|
332
|
+
alias_method :message, :to_s
|
302
333
|
end
|
303
334
|
|
304
335
|
# Raised when a cookbook or its recipes contain a space or invalid
|
@@ -325,6 +356,8 @@ module Berkshelf
|
|
325
356
|
"Please note, spaces are not a valid character in filenames",
|
326
357
|
].join("\n")
|
327
358
|
end
|
359
|
+
|
360
|
+
alias_method :message, :to_s
|
328
361
|
end
|
329
362
|
|
330
363
|
class LicenseNotFound < BerkshelfError
|
@@ -340,6 +373,8 @@ module Berkshelf
|
|
340
373
|
"Unknown license: '#{license}'\n" +
|
341
374
|
"Available licenses: #{CookbookGenerator::LICENSES.join(', ')}"
|
342
375
|
end
|
376
|
+
|
377
|
+
alias_method :message, :to_s
|
343
378
|
end
|
344
379
|
|
345
380
|
# Raised when a cookbook or its recipes contain a space or invalid
|
@@ -359,6 +394,8 @@ module Berkshelf
|
|
359
394
|
def to_s
|
360
395
|
"No #{@type.capitalize} config file found at: '#{@path}'!"
|
361
396
|
end
|
397
|
+
|
398
|
+
alias_method :message, :to_s
|
362
399
|
end
|
363
400
|
|
364
401
|
class LockfileParserError < BerkshelfError
|
@@ -376,6 +413,8 @@ module Berkshelf
|
|
376
413
|
"Error reading the Berkshelf lockfile:\n\n" \
|
377
414
|
" #{@original.class}: #{@original.message}"
|
378
415
|
end
|
416
|
+
|
417
|
+
alias_method :message, :to_s
|
379
418
|
end
|
380
419
|
|
381
420
|
class InvalidSourceURI < BerkshelfError
|
@@ -391,6 +430,8 @@ module Berkshelf
|
|
391
430
|
msg << " #{@reason}." unless @reason.nil?
|
392
431
|
msg
|
393
432
|
end
|
433
|
+
|
434
|
+
alias_method :message, :to_s
|
394
435
|
end
|
395
436
|
|
396
437
|
class DuplicateDemand < BerkshelfError; set_status_code(138); end
|
@@ -415,6 +456,8 @@ module Berkshelf
|
|
415
456
|
"The resource at '#{@path}' does not appear to be a valid cookbook. " \
|
416
457
|
"Does it have a metadata.rb?"
|
417
458
|
end
|
459
|
+
|
460
|
+
alias_method :message, :to_s
|
418
461
|
end
|
419
462
|
|
420
463
|
class PackageError < BerkshelfError; set_status_code(143); end
|
@@ -439,6 +482,8 @@ module Berkshelf
|
|
439
482
|
"The cookbook '#{@name} (#{@version})' is not installed. Please run " \
|
440
483
|
"`berks install` to download and install the missing dependency."
|
441
484
|
end
|
485
|
+
|
486
|
+
alias_method :message, :to_s
|
442
487
|
end
|
443
488
|
|
444
489
|
class NoAPISourcesDefined < BerkshelfError
|
@@ -477,6 +522,8 @@ module Berkshelf
|
|
477
522
|
"The Graphviz command `#{@command}` failed to execute properly. Here " \
|
478
523
|
"is the standard error from the command:\n\n#{@output}"
|
479
524
|
end
|
525
|
+
|
526
|
+
alias_method :message, :to_s
|
480
527
|
end
|
481
528
|
|
482
529
|
class MissingLockfileCookbookVersion < CookbookNotFound
|
data/lib/berkshelf/uploader.rb
CHANGED
@@ -8,13 +8,14 @@ module Berkshelf
|
|
8
8
|
def initialize(berksfile, *args)
|
9
9
|
@berksfile = berksfile
|
10
10
|
@lockfile = berksfile.lockfile
|
11
|
+
opts = args.last.respond_to?(:to_hash) ? args.pop.to_hash.symbolize_keys : {}
|
11
12
|
|
12
13
|
@options = {
|
13
14
|
force: false,
|
14
15
|
freeze: true,
|
15
16
|
halt_on_frozen: false,
|
16
17
|
validate: true,
|
17
|
-
}.merge(
|
18
|
+
}.merge(opts)
|
18
19
|
|
19
20
|
@names = Array(args).flatten
|
20
21
|
end
|
data/lib/berkshelf/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: berkshelf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jamie Winsor
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date:
|
15
|
+
date: 2015-01-14 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: addressable
|
@@ -132,14 +132,14 @@ dependencies:
|
|
132
132
|
requirements:
|
133
133
|
- - "~>"
|
134
134
|
- !ruby/object:Gem::Version
|
135
|
-
version:
|
135
|
+
version: '2.0'
|
136
136
|
type: :runtime
|
137
137
|
prerelease: false
|
138
138
|
version_requirements: !ruby/object:Gem::Requirement
|
139
139
|
requirements:
|
140
140
|
- - "~>"
|
141
141
|
- !ruby/object:Gem::Version
|
142
|
-
version:
|
142
|
+
version: '2.0'
|
143
143
|
- !ruby/object:Gem::Dependency
|
144
144
|
name: ridley
|
145
145
|
requirement: !ruby/object:Gem::Requirement
|