berkshelf 3.1.3 → 3.1.4

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
  SHA1:
3
- metadata.gz: 2f602bc76f25aadd31542d00b644abe495c9a0ae
4
- data.tar.gz: ab05691e2bd055675d57e3940337770571124fb5
3
+ metadata.gz: 1c2cbd226c97f7eb03ba011273102912c1ab35c3
4
+ data.tar.gz: 41a2609f4d1ea587b37be2e78f9a965408f801c2
5
5
  SHA512:
6
- metadata.gz: cf4fd42a2f32ea879fcefc8389323cbbd293f382b884f7b65fc17aaee93e5bc27b6a4594d07c3be84346da03a50197563f3ad1f6addaae50096d8f359ee68d35
7
- data.tar.gz: 51824f49578a4ce7417797e158413afe3951f65d243b48de48905af27924a0561f2c5b8aaaf533a7f0758ca3b5c67fbf002e694c07c2f3dff04240f4f4b3ffc0
6
+ metadata.gz: f1fb76696aa23da536edce710c03a1da9abe896470ccbed29713c97681f713d5213229804841566b5e5e908c3fc7f2f2465ccf871b36c8f2ced7bdaabd71678e
7
+ data.tar.gz: 907002c134b4c2294895dc3889fa32e52d71bb762c0c4298df6b4632e352836e645e5ed4746c8740f47ef9efcfa24be9a7a2a09905737ae4c83e47304d880318
@@ -1,5 +1,14 @@
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.1.4
4
+
5
+ * Improvements
6
+ * Update the default vagrant box from the generators to Ubuntu 14.04 (formerly 12.04 EOL)
7
+
8
+ * Bug fixes
9
+ * Handle the case where a remote source had been removed but still existed in the lockfile
10
+ * Follow redirects (HTTP -> HTTPS) in all requests
11
+
3
12
  # 3.1.3
4
13
 
5
14
  * Enhancements
data/Gemfile CHANGED
@@ -31,5 +31,5 @@ group :guard do
31
31
  end
32
32
 
33
33
  group :test do
34
- gem "berkshelf-api", github: "berkshelf/berkshelf-api"
34
+ gem "berkshelf-api", "~> 1.4"
35
35
  end
@@ -2,7 +2,7 @@ Feature: Evaluating a Berksfile
2
2
  Scenario: Containing pure Ruby
3
3
  Given I write to "Berksfile" with:
4
4
  """
5
- source 'https://api.berkshelf.com'
5
+ source 'https://supermarket.getchef.com'
6
6
 
7
7
  if ENV['BACON']
8
8
  puts "If you don't got bacon..."
@@ -242,15 +242,15 @@ Feature: berks install
242
242
  Scenario: installing a Berksfile that contains a Git location
243
243
  Given I have a Berksfile pointing at the local Berkshelf API with:
244
244
  """
245
- cookbook 'berkshelf-cookbook-fixture',
246
- git: 'git://github.com/RiotGames/berkshelf-cookbook-fixture.git',
245
+ cookbook 'berkshelf-cookbook-fixture',
246
+ git: 'git://github.com/RiotGames/berkshelf-cookbook-fixture.git',
247
247
  tag: 'v0.2.0'
248
248
  """
249
249
  When I successfully run `berks install`
250
250
  Then the cookbook store should have the git cookbooks:
251
251
  | berkshelf-cookbook-fixture | 0.2.0 | 70a527e17d91f01f031204562460ad1c17f972ee |
252
252
  And the git cookbook "berkshelf-cookbook-fixture-70a527e17d91f01f031204562460ad1c17f972ee" should not have the following directories:
253
- | .git |
253
+ | .git |
254
254
 
255
255
  Scenario: installing a Berksfile that contains a Git location with a tag
256
256
  Given I have a Berksfile pointing at the local Berkshelf API with:
@@ -364,13 +364,11 @@ Feature: berks install
364
364
  """
365
365
  And I write to "Berksfile.lock" with:
366
366
  """
367
- {
368
- "dependencies": {
369
- "bacon": {
370
- "locked_version": "0.2.0"
371
- }
372
- }
373
- }
367
+ DEPENDENCIES
368
+ bacon (~> 0.1)
369
+
370
+ GRAPH
371
+ bacon (0.2.0)
374
372
  """
375
373
  When I successfully run `berks install`
376
374
  Then the output should contain:
@@ -399,6 +397,48 @@ Feature: berks install
399
397
  """
400
398
  And the exit status should be "NoSolutionError"
401
399
 
400
+ Scenario: running install when the Cookbook from Berksfile.lock is not found in the sources
401
+ Given I have a Berksfile pointing at the local Berkshelf API with:
402
+ """
403
+ cookbook 'foo'
404
+ """
405
+ And I write to "Berksfile.lock" with:
406
+ """
407
+ DEPENDENCIES
408
+ foo
409
+
410
+ GRAPH
411
+ foo (0.1.0)
412
+ """
413
+ When I run `berks install`
414
+ Then the output should contain:
415
+ """
416
+ Cookbook 'foo' (0.1.0) not found in any of the sources! This can happen if the remote cookbook has been deleted or if the sources inside the Berksfile have changed. Please run `berks update foo` to resolve to a valid version.
417
+ """
418
+
419
+ Scenario: running install when the version from Berksfile.lock is not found in the sources
420
+ Given the Chef Server has cookbooks:
421
+ | foo | 0.3.0 |
422
+ | foo | 0.2.0 |
423
+ And the Berkshelf API server's cache is up to date
424
+ And I have a Berksfile pointing at the local Berkshelf API with:
425
+ """
426
+ cookbook 'foo'
427
+ """
428
+ And I write to "Berksfile.lock" with:
429
+ """
430
+ DEPENDENCIES
431
+ foo
432
+
433
+ GRAPH
434
+ foo (0.1.0)
435
+ """
436
+ When I run `berks install`
437
+ Then the output should contain:
438
+ """
439
+ Cookbook 'foo' (0.1.0) not found in any of the sources! This can happen if the remote cookbook has been deleted or if the sources inside the Berksfile have changed. Please run `berks update foo` to resolve to a valid version.
440
+ """
441
+
402
442
  Scenario: installing when there are sources with duplicate names defined in the same group
403
443
  Given I have a Berksfile pointing at the local Berkshelf API with:
404
444
  """
@@ -11,5 +11,6 @@ Feature: berks search
11
11
  * the output should contain:
12
12
  """
13
13
  berkshelf-api (1.0.0)
14
+ berkshelf-api-server (1.4.0)
14
15
  berkshelf-cookbook-fixture (1.0.0)
15
16
  """
@@ -407,7 +407,7 @@ Feature: berks upload
407
407
  """
408
408
  And the cookbook "fake" has the file "Berksfile" with:
409
409
  """
410
- source 'https://api.berkshelf.com'
410
+ source 'https://supermarket.getchef.com'
411
411
  metadata
412
412
  """
413
413
  And the cookbook "fake" has the file "Berksfile.lock" with:
@@ -3,8 +3,8 @@ Feature: Reading a Berkshelf configuration file
3
3
  When I successfully run `berks cookbook sparkle_motion`
4
4
  Then the resulting "sparkle_motion" Vagrantfile should contain:
5
5
  | config.omnibus.chef_version = :latest |
6
- | config.vm.box = "opscode_ubuntu-12.04_provisionerless" |
7
- | config.vm.box_url = "https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_ubuntu-12.04_provisionerless.box" |
6
+ | config.vm.box = "chef/ubuntu-14.04" |
7
+ | config.vm.box_url = "https://vagrantcloud.com/chef/ubuntu-14.04/version/1/provider/virtualbox.box" |
8
8
 
9
9
  Scenario: Using a Berkshelf configuration file that disables the vagrant-omnibus plugin
10
10
  Given I have a Berkshelf config file containing:
@@ -1,4 +1,4 @@
1
- source "https://api.berkshelf.com"
1
+ source "https://supermarket.getchef.com"
2
2
  <% if options[:chef_minitest] -%>
3
3
 
4
4
  group :integration do
@@ -25,11 +25,14 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
25
25
  <% end -%>
26
26
 
27
27
  # Every Vagrant virtual environment requires a box to build off of.
28
+ # If this value is a shorthand to a box in Vagrant Cloud then
29
+ # config.vm.box_url doesn't need to be specified.
28
30
  config.vm.box = "<%= berkshelf_config.vagrant.vm.box %>"
29
31
 
30
32
  # The url from where the 'config.vm.box' box will be fetched if it
31
- # doesn't already exist on the user's system.
32
- config.vm.box_url = "<%= berkshelf_config.vagrant.vm.box_url %>"
33
+ # is not a Vagrant Cloud box and if it doesn't already exist on the
34
+ # user's system.
35
+ # config.vm.box_url = "<%= berkshelf_config.vagrant.vm.box_url %>"
33
36
 
34
37
  # Assign this VM to a host-only network IP, allowing you to access it
35
38
  # via the IP. Host-only networks can talk to the host machine as well as
@@ -27,7 +27,7 @@ module Berkshelf
27
27
  end
28
28
  end
29
29
 
30
- DEFAULT_API_URL = "https://api.berkshelf.com".freeze
30
+ DEFAULT_API_URL = "https://supermarket.getchef.com".freeze
31
31
 
32
32
  include Mixin::Logging
33
33
  include Mixin::DSLEval
@@ -172,7 +172,7 @@ module Berkshelf
172
172
  # in a second source would not be used.
173
173
  #
174
174
  # @example
175
- # source "https://api.berkshelf.com"
175
+ # source "https://supermarket.getchef.com"
176
176
  # source "https://berks-api.riotgames.com"
177
177
  #
178
178
  # @param [String] api_url
@@ -207,7 +207,7 @@ module Berkshelf
207
207
  if args.first == :opscode
208
208
  Berkshelf.formatter.deprecation "Your Berksfile contains a site location pointing to the Opscode Community " +
209
209
  "Site (site :opscode). Site locations have been replaced by the source location. Change this to: " +
210
- "'source \"https://api.berkshelf.com\"' to remove this warning. For more information visit " +
210
+ "'source \"https://supermarket.getchef.com\"' to remove this warning. For more information visit " +
211
211
  "https://github.com/berkshelf/berkshelf/wiki/deprecated-locations"
212
212
  source(DEFAULT_API_URL)
213
213
  return
@@ -445,7 +445,7 @@ module Berkshelf
445
445
  # "nginx" => {
446
446
  # "local" => #<Version 1.8.0>,
447
447
  # "remote" => {
448
- # #<Source uri: "https://api.berkshelf.com"> #=> #<Version 2.6.2>
448
+ # #<Source uri: "https://supermarket.getchef.com"> #=> #<Version 2.6.2>
449
449
  # }
450
450
  # }
451
451
  # }
@@ -75,6 +75,7 @@ module Berkshelf
75
75
  options[:builder] ||= Faraday::RackBuilder.new do |b|
76
76
  b.response :parse_json
77
77
  b.response :gzip
78
+ b.response :follow_redirects
78
79
  b.request :retry,
79
80
  max: @retries,
80
81
  interval: @retry_interval,
@@ -95,11 +95,11 @@ module Berkshelf
95
95
  default: false
96
96
  attribute 'vagrant.vm.box',
97
97
  type: String,
98
- default: 'opscode_ubuntu-12.04_provisionerless',
98
+ default: 'chef/ubuntu-14.04',
99
99
  required: true
100
100
  attribute 'vagrant.vm.box_url',
101
101
  type: String,
102
- default: 'https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_ubuntu-12.04_provisionerless.box',
102
+ default: 'https://vagrantcloud.com/chef/ubuntu-14.04/version/1/provider/virtualbox.box',
103
103
  required: true
104
104
  attribute 'vagrant.vm.forward_port',
105
105
  type: Hash,
@@ -2,7 +2,7 @@ module Berkshelf
2
2
  class BerkshelfError < StandardError
3
3
  class << self
4
4
  # @param [Integer] code
5
- def status_code(code)
5
+ def set_status_code(code)
6
6
  define_method(:status_code) { code }
7
7
  define_singleton_method(:status_code) { code }
8
8
  end
@@ -11,13 +11,13 @@ module Berkshelf
11
11
  alias_method :message, :to_s
12
12
  end
13
13
 
14
- class DeprecatedError < BerkshelfError; status_code(10); end
15
- class InternalError < BerkshelfError; status_code(99); end
14
+ class DeprecatedError < BerkshelfError; set_status_code(10); end
15
+ class InternalError < BerkshelfError; set_status_code(99); end
16
16
  class ArgumentError < InternalError; end
17
17
  class AbstractFunction < InternalError; end
18
18
 
19
19
  class BerksfileNotFound < BerkshelfError
20
- status_code(100)
20
+ set_status_code(100)
21
21
 
22
22
  # @param [#to_s] filepath
23
23
  # the path where a Berksfile was not found
@@ -31,7 +31,7 @@ module Berkshelf
31
31
  end
32
32
 
33
33
  class CookbookNotFound < BerkshelfError
34
- status_code(103)
34
+ set_status_code(103)
35
35
 
36
36
  def initialize(name, version, location)
37
37
  @name = name
@@ -49,7 +49,7 @@ module Berkshelf
49
49
  end
50
50
 
51
51
  class DuplicateDependencyDefined < BerkshelfError
52
- status_code(105)
52
+ set_status_code(105)
53
53
 
54
54
  def initialize(name)
55
55
  @name = name
@@ -64,7 +64,7 @@ module Berkshelf
64
64
  end
65
65
 
66
66
  class NoSolutionError < BerkshelfError
67
- status_code(106)
67
+ set_status_code(106)
68
68
 
69
69
  attr_reader :demands
70
70
 
@@ -80,12 +80,12 @@ module Berkshelf
80
80
  end
81
81
  end
82
82
 
83
- class CookbookSyntaxError < BerkshelfError; status_code(107); end
84
- class ConstraintNotSatisfied < BerkshelfError; status_code(111); end
83
+ class CookbookSyntaxError < BerkshelfError; set_status_code(107); end
84
+ class ConstraintNotSatisfied < BerkshelfError; set_status_code(111); end
85
85
  class BerksfileReadError < BerkshelfError
86
- status_code(113)
86
+ set_status_code(113)
87
87
 
88
- # @param [#status_code] original_error
88
+ # @param [#set_status_code] original_error
89
89
  def initialize(original_error)
90
90
  @original_error = original_error
91
91
  @error_message = original_error.to_s
@@ -111,7 +111,7 @@ module Berkshelf
111
111
  end
112
112
 
113
113
  class MismatchedCookbookName < BerkshelfError
114
- status_code(114)
114
+ set_status_code(114)
115
115
 
116
116
  # @param [Dependency] dependency
117
117
  # the dependency with the expected name
@@ -139,7 +139,7 @@ module Berkshelf
139
139
  end
140
140
 
141
141
  class InvalidConfiguration < BerkshelfError
142
- status_code(115)
142
+ set_status_code(115)
143
143
 
144
144
  def initialize(errors)
145
145
  @errors = errors
@@ -158,7 +158,7 @@ module Berkshelf
158
158
  end
159
159
 
160
160
  class InsufficientPrivledges < BerkshelfError
161
- status_code(119)
161
+ set_status_code(119)
162
162
 
163
163
  def initialize(path)
164
164
  @path = path
@@ -172,7 +172,7 @@ module Berkshelf
172
172
  end
173
173
 
174
174
  class DependencyNotFound < BerkshelfError
175
- status_code(120)
175
+ set_status_code(120)
176
176
 
177
177
  # @param [String, Array<String>] names
178
178
  # the list of cookbook names that were not defined
@@ -200,7 +200,7 @@ module Berkshelf
200
200
  end
201
201
 
202
202
  class CommunitySiteError < BerkshelfError
203
- status_code(123)
203
+ set_status_code(123)
204
204
 
205
205
  def initialize(uri, message)
206
206
  @uri = uri
@@ -214,7 +214,7 @@ module Berkshelf
214
214
  end
215
215
 
216
216
  class CookbookValidationFailure < BerkshelfError
217
- status_code(124)
217
+ set_status_code(124)
218
218
 
219
219
  # @param [Location] location
220
220
  # the location (or any subclass) raising this validation error
@@ -232,7 +232,7 @@ module Berkshelf
232
232
 
233
233
  class UploadFailure < BerkshelfError; end
234
234
  class FrozenCookbook < UploadFailure
235
- status_code(126)
235
+ set_status_code(126)
236
236
 
237
237
  # @param [CachedCookbook] cookbook
238
238
  def initialize(cookbook)
@@ -247,7 +247,7 @@ module Berkshelf
247
247
  end
248
248
 
249
249
  class OutdatedDependency < BerkshelfError
250
- status_code(128)
250
+ set_status_code(128)
251
251
 
252
252
  # @param [Dependency] locked_dependency
253
253
  # the locked dependency
@@ -270,7 +270,7 @@ module Berkshelf
270
270
  end
271
271
 
272
272
  class EnvironmentNotFound < BerkshelfError
273
- status_code(129)
273
+ set_status_code(129)
274
274
 
275
275
  def initialize(environment_name)
276
276
  @environment_name = environment_name
@@ -282,7 +282,7 @@ module Berkshelf
282
282
  end
283
283
 
284
284
  class ChefConnectionError < BerkshelfError
285
- status_code(130)
285
+ set_status_code(130)
286
286
 
287
287
  def to_s
288
288
  'There was an error connecting to the Chef Server'
@@ -290,7 +290,7 @@ module Berkshelf
290
290
  end
291
291
 
292
292
  class UnknownCompressionType < BerkshelfError
293
- status_code(131)
293
+ set_status_code(131)
294
294
 
295
295
  def initialize(destination)
296
296
  @destination = destination
@@ -309,7 +309,7 @@ module Berkshelf
309
309
  # @param [Array<#to_s>] files
310
310
  # the list of files that were not valid
311
311
  class InvalidCookbookFiles < BerkshelfError
312
- status_code(132)
312
+ set_status_code(132)
313
313
 
314
314
  def initialize(cookbook, files)
315
315
  @cookbook = cookbook
@@ -328,7 +328,7 @@ module Berkshelf
328
328
  end
329
329
 
330
330
  class LicenseNotFound < BerkshelfError
331
- status_code(134)
331
+ set_status_code(134)
332
332
 
333
333
  attr_reader :license
334
334
 
@@ -345,7 +345,7 @@ module Berkshelf
345
345
  # Raised when a cookbook or its recipes contain a space or invalid
346
346
  # character in the path.
347
347
  class ConfigNotFound < BerkshelfError
348
- status_code(135)
348
+ set_status_code(135)
349
349
 
350
350
  # @param [String] type
351
351
  # the type of config that was not found (Berkshelf, Chef, etc)
@@ -362,7 +362,7 @@ module Berkshelf
362
362
  end
363
363
 
364
364
  class LockfileParserError < BerkshelfError
365
- status_code(136)
365
+ set_status_code(136)
366
366
 
367
367
  # @param [String] lockfile
368
368
  # the path to the Lockfile
@@ -379,7 +379,7 @@ module Berkshelf
379
379
  end
380
380
 
381
381
  class InvalidSourceURI < BerkshelfError
382
- status_code(137)
382
+ set_status_code(137)
383
383
 
384
384
  def initialize(url, reason = nil)
385
385
  @url = url
@@ -393,10 +393,10 @@ module Berkshelf
393
393
  end
394
394
  end
395
395
 
396
- class DuplicateDemand < BerkshelfError; status_code(138); end
397
- class VendorError < BerkshelfError; status_code(139); end
396
+ class DuplicateDemand < BerkshelfError; set_status_code(138); end
397
+ class VendorError < BerkshelfError; set_status_code(139); end
398
398
  class LockfileNotFound < BerkshelfError
399
- status_code(140)
399
+ set_status_code(140)
400
400
 
401
401
  def to_s
402
402
  'Lockfile not found! Run `berks install` to create the lockfile.'
@@ -404,7 +404,7 @@ module Berkshelf
404
404
  end
405
405
 
406
406
  class NotACookbook < BerkshelfError
407
- status_code(141)
407
+ set_status_code(141)
408
408
 
409
409
  # @param [String] path
410
410
  # the path to the thing that is not a cookbook
@@ -418,10 +418,10 @@ module Berkshelf
418
418
  end
419
419
  end
420
420
 
421
- class PackageError < BerkshelfError; status_code(143); end
421
+ class PackageError < BerkshelfError; set_status_code(143); end
422
422
 
423
423
  class LockfileOutOfSync < BerkshelfError
424
- status_code(144)
424
+ set_status_code(144)
425
425
 
426
426
  def to_s
427
427
  'The lockfile is out of sync! Run `berks install` to sync the lockfile.'
@@ -429,7 +429,7 @@ module Berkshelf
429
429
  end
430
430
 
431
431
  class DependencyNotInstalled < BerkshelfError
432
- status_code(145)
432
+ set_status_code(145)
433
433
 
434
434
  def initialize(dependency)
435
435
  @name = dependency.name
@@ -443,7 +443,7 @@ module Berkshelf
443
443
  end
444
444
 
445
445
  class NoAPISourcesDefined < BerkshelfError
446
- status_code(146)
446
+ set_status_code(146)
447
447
 
448
448
  def to_s
449
449
  "Your Berksfile does not define any API sources! You must define " \
@@ -451,12 +451,12 @@ module Berkshelf
451
451
  "default Berkshelf API server, add the following code to the top of " \
452
452
  "your Berksfile:" \
453
453
  "\n\n" \
454
- " source 'https://api.berkshelf.com'"
454
+ " source 'https://supermarket.getchef.com'"
455
455
  end
456
456
  end
457
457
 
458
458
  class GraphvizNotInstalled < BerkshelfError
459
- status_code(147)
459
+ set_status_code(147)
460
460
 
461
461
  def to_s
462
462
  "Graphviz is not installed! In order to generate a dependency graph, " \
@@ -467,7 +467,7 @@ module Berkshelf
467
467
  end
468
468
 
469
469
  class GraphvizCommandFailed < BerkshelfError
470
- status_code(148)
470
+ set_status_code(148)
471
471
 
472
472
  def initialize(command, output)
473
473
  @command = command
@@ -480,9 +480,20 @@ module Berkshelf
480
480
  end
481
481
  end
482
482
 
483
+ class MissingLockfileCookbookVersion < CookbookNotFound
484
+ set_status_code(149)
485
+
486
+ def to_s
487
+ super + " " \
488
+ "This can happen if the remote cookbook has been deleted or if the sources inside the Berksfile have changed. " \
489
+ "Please run `berks update #{@name}` to resolve to a valid version."
490
+ end
491
+ end
492
+
493
+
483
494
  # Git errors
484
495
  # ------------------------------
485
- class GitError < BerkshelfError; status_code(400); end
496
+ class GitError < BerkshelfError; set_status_code(400); end
486
497
 
487
498
  class GitNotInstalled < GitError
488
499
  def initialize
@@ -57,7 +57,7 @@ module Berkshelf
57
57
  #
58
58
  # @param [Hash] hash
59
59
  # the list of outdated cookbooks in the format
60
- # { 'cookbook' => { 'api.berkshelf.com' => #<Cookbook> } }
60
+ # { 'cookbook' => { 'supermarket.getchef.com' => #<Cookbook> } }
61
61
  def outdated(hash)
62
62
  if hash.empty?
63
63
  Berkshelf.ui.info('All cookbooks up to date!')
@@ -89,7 +89,7 @@ module Berkshelf
89
89
  #
90
90
  # @param [Hash] hash
91
91
  # the list of outdated cookbooks in the format
92
- # { 'cookbook' => { 'api.berkshelf.com' => #<Cookbook> } }
92
+ # { 'cookbook' => { 'supermarket.getchef.com' => #<Cookbook> } }
93
93
  def outdated(hash)
94
94
  hash.each do |name, info|
95
95
  info['remote'].each do |remote_source, remote_version|
@@ -90,6 +90,10 @@ module Berkshelf
90
90
  name, version = dependency.name, dependency.locked_version.to_s
91
91
  source = berksfile.source_for(name, version)
92
92
 
93
+ # Raise error if our Berksfile.lock has cookbook versions that
94
+ # can't be found in sources
95
+ raise MissingLockfileCookbookVersion.new(name, version, 'in any of the sources') unless source
96
+
93
97
  Berkshelf.log.debug " Downloading #{dependency.name} (#{dependency.locked_version}) from #{source}"
94
98
 
95
99
  cookbook = source.cookbook(name, version)
@@ -1,3 +1,3 @@
1
1
  module Berkshelf
2
- VERSION = "3.1.3"
2
+ VERSION = "3.1.4"
3
3
  end
@@ -64,6 +64,14 @@ describe Berkshelf::CommunityREST do
64
64
  let(:api_uri) { Berkshelf::CommunityREST::V1_API }
65
65
  subject { Berkshelf::CommunityREST.new(api_uri) }
66
66
 
67
+ describe '#initialize' do
68
+ context 'Faraday handlers' do
69
+ it 'includes follow_redirects to prevent 301 from community, stopping some cookbooks installing' do
70
+ expect(subject.builder.handlers).to include(Ridley::Middleware::FollowRedirects)
71
+ end
72
+ end
73
+ end
74
+
67
75
  describe '#download' do
68
76
  let(:archive) { double('archive', path: '/foo/bar', unlink: true) }
69
77
 
@@ -58,7 +58,7 @@ describe Berkshelf::CookbookGenerator do
58
58
  contains "description 'Installs/Configures sparkle_motion'"
59
59
  end
60
60
  file 'Berksfile' do
61
- contains 'source "https://api.berkshelf.com"'
61
+ contains 'source "https://supermarket.getchef.com"'
62
62
  contains 'metadata'
63
63
  end
64
64
  file 'Gemfile'
@@ -30,8 +30,8 @@ describe Berkshelf::InitGenerator do
30
30
  file 'Vagrantfile' do
31
31
  contains 'recipe[some_cookbook::default]'
32
32
  contains ' config.omnibus.chef_version = :latest'
33
- contains 'config.vm.box = "opscode_ubuntu-12.04_provisionerless"'
34
- contains 'config.vm.box_url = "https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_ubuntu-12.04_provisionerless.box"'
33
+ contains 'config.vm.box = "chef/ubuntu-14.04"'
34
+ contains 'config.vm.box_url = "https://vagrantcloud.com/chef/ubuntu-14.04/version/1/provider/virtualbox.box"'
35
35
  end
36
36
  file 'chefignore'
37
37
  }
@@ -6,7 +6,7 @@ describe Berkshelf::Installer do
6
6
  subject { described_class.new(berksfile) }
7
7
 
8
8
  describe "#build_universe" do
9
- let(:source_one) { double('one', uri: 'https://api.berkshelf.com') }
9
+ let(:source_one) { double('one', uri: 'https://supermarket.getchef.com') }
10
10
  let(:source_two) { double('two', uri: 'https://api.chef.org') }
11
11
  let(:sources) { [ source_one, source_two ] }
12
12
 
@@ -29,7 +29,7 @@ module Berkshelf
29
29
  end
30
30
 
31
31
  it 'returns true when the scheme is different' do
32
- instance = described_class.new('http://api.berkshelf.com')
32
+ instance = described_class.new('http://supermarket.getchef.com')
33
33
  expect(instance).to be_default
34
34
  end
35
35
 
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.1.3
4
+ version: 3.1.4
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: 2014-06-03 00:00:00.000000000 Z
15
+ date: 2014-07-14 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: addressable