berkshelf 4.3.5 → 5.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -28,7 +28,7 @@ describe Berkshelf::InitGenerator do
28
28
  file 'Vagrantfile' do
29
29
  contains %(recipe[some_cookbook::default])
30
30
  contains %(config.omnibus.chef_version = 'latest')
31
- contains %(config.vm.box = 'chef/ubuntu-14.04')
31
+ contains %(config.vm.box = 'bento/ubuntu-14.04')
32
32
  end
33
33
  file 'chefignore'
34
34
  }
@@ -28,6 +28,11 @@ describe Berkshelf::Lockfile do
28
28
  expect(subject.find('jenkins').version_constraint.to_s).to eq('>= 0.0.0')
29
29
  expect(subject.find('runit').version_constraint.to_s).to eq('>= 0.0.0')
30
30
  expect(subject.find('yum').version_constraint.to_s).to eq('>= 0.0.0')
31
+
32
+ expect(subject.find('apt').locked_version.to_s).to eq('2.3.6')
33
+ expect(subject.find('jenkins').locked_version.to_s).to eq('2.0.3')
34
+ expect(subject.find('runit').locked_version.to_s).to eq('1.5.8')
35
+ expect(subject.find('yum').locked_version.to_s).to eq('3.0.6')
31
36
  end
32
37
 
33
38
  it 'sets the graph' do
@@ -88,6 +93,9 @@ describe Berkshelf::Lockfile do
88
93
 
89
94
  expect(subject.find('apt').version_constraint.to_s).to eq('~> 2.0')
90
95
  expect(subject.find('jenkins').version_constraint.to_s).to eq('~> 2.0')
96
+
97
+ expect(subject.find('apt').locked_version.to_s).to eq('2.3.6')
98
+ expect(subject.find('jenkins').locked_version.to_s).to eq('2.0.3')
91
99
  end
92
100
 
93
101
  it 'sets the graph' do
@@ -199,6 +199,7 @@ describe Berkshelf::Lockfile do
199
199
  )
200
200
  apt_master = apt.dup
201
201
  allow(apt_master).to receive_messages(location: 'github')
202
+ allow(apt_master).to receive_messages(cached_cookbook: cookbook)
202
203
  berksfile = double('berksfile', dependencies: [apt])
203
204
  subject.instance_variable_set(:@berksfile, berksfile)
204
205
  allow(subject).to receive(:find).with(apt).and_return(apt_master)
@@ -8,7 +8,7 @@ describe Berkshelf::Validator do
8
8
  allow(Dir).to receive(:glob).and_return(['/there are/spaces/in this/recipes/default.rb'])
9
9
  expect {
10
10
  subject.validate_files(cookbook)
11
- }.to raise_error
11
+ }.to raise_error(Berkshelf::InvalidCookbookFiles)
12
12
  end
13
13
 
14
14
  it 'does not raise an error when the cookbook is valid' do
@@ -27,6 +27,33 @@ module Berkshelf
27
27
  end
28
28
  end
29
29
 
30
+ describe '.berkshelf_path' do
31
+ before { Berkshelf.instance_variable_set(:@berkshelf_path, nil) }
32
+
33
+ context 'with default path' do
34
+ before do
35
+ @berkshelf_path = ENV['BERKSHELF_PATH']
36
+ ENV['BERKSHELF_PATH'] = nil
37
+ end
38
+
39
+ after do
40
+ ENV['BERKSHELF_PATH'] = @berkshelf_path
41
+ end
42
+
43
+ it 'is ~/.berkshelf' do
44
+ expect(Berkshelf.berkshelf_path).to eq File.expand_path('~/.berkshelf')
45
+ expect(Berkshelf.instance_variable_get(:@berkshelf_path)).to eq File.expand_path('~/.berkshelf')
46
+ end
47
+ end
48
+
49
+ context 'with ENV["BERKSHELF_PATH"]' do
50
+ it 'is ENV["BERKSHELF_PATH"]' do
51
+ expect(Berkshelf.berkshelf_path).to eq File.expand_path(ENV['BERKSHELF_PATH'])
52
+ expect(Berkshelf.instance_variable_get(:@berkshelf_path)).to eq File.expand_path(ENV['BERKSHELF_PATH'])
53
+ end
54
+ end
55
+ end
56
+
30
57
  describe '::log' do
31
58
  it 'returns Berkshelf::Logger' do
32
59
  expect(Berkshelf.log).to be_a(Berkshelf::Logger)
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: 4.3.5
4
+ version: 5.0.0
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: 2016-06-13 00:00:00.000000000 Z
15
+ date: 2016-08-30 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: addressable
@@ -38,50 +38,50 @@ dependencies:
38
38
  name: berkshelf-api-client
39
39
  requirement: !ruby/object:Gem::Requirement
40
40
  requirements:
41
- - - "~>"
42
- - !ruby/object:Gem::Version
43
- version: '2.0'
44
41
  - - ">="
45
42
  - !ruby/object:Gem::Version
46
43
  version: 2.0.2
44
+ - - "<"
45
+ - !ruby/object:Gem::Version
46
+ version: '4.0'
47
47
  type: :runtime
48
48
  prerelease: false
49
49
  version_requirements: !ruby/object:Gem::Requirement
50
50
  requirements:
51
- - - "~>"
52
- - !ruby/object:Gem::Version
53
- version: '2.0'
54
51
  - - ">="
55
52
  - !ruby/object:Gem::Version
56
53
  version: 2.0.2
54
+ - - "<"
55
+ - !ruby/object:Gem::Version
56
+ version: '4.0'
57
57
  - !ruby/object:Gem::Dependency
58
58
  name: buff-config
59
59
  requirement: !ruby/object:Gem::Requirement
60
60
  requirements:
61
61
  - - "~>"
62
62
  - !ruby/object:Gem::Version
63
- version: '1.0'
63
+ version: '2.0'
64
64
  type: :runtime
65
65
  prerelease: false
66
66
  version_requirements: !ruby/object:Gem::Requirement
67
67
  requirements:
68
68
  - - "~>"
69
69
  - !ruby/object:Gem::Version
70
- version: '1.0'
70
+ version: '2.0'
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: buff-extensions
73
73
  requirement: !ruby/object:Gem::Requirement
74
74
  requirements:
75
75
  - - "~>"
76
76
  - !ruby/object:Gem::Version
77
- version: '1.0'
77
+ version: '2.0'
78
78
  type: :runtime
79
79
  prerelease: false
80
80
  version_requirements: !ruby/object:Gem::Requirement
81
81
  requirements:
82
82
  - - "~>"
83
83
  - !ruby/object:Gem::Version
84
- version: '1.0'
84
+ version: '2.0'
85
85
  - !ruby/object:Gem::Dependency
86
86
  name: buff-shell_out
87
87
  requirement: !ruby/object:Gem::Requirement
@@ -178,28 +178,34 @@ dependencies:
178
178
  requirements:
179
179
  - - "~>"
180
180
  - !ruby/object:Gem::Version
181
- version: '4.5'
181
+ version: '5.0'
182
182
  type: :runtime
183
183
  prerelease: false
184
184
  version_requirements: !ruby/object:Gem::Requirement
185
185
  requirements:
186
186
  - - "~>"
187
187
  - !ruby/object:Gem::Version
188
- version: '4.5'
188
+ version: '5.0'
189
189
  - !ruby/object:Gem::Dependency
190
190
  name: solve
191
191
  requirement: !ruby/object:Gem::Requirement
192
192
  requirements:
193
- - - "~>"
193
+ - - ">"
194
194
  - !ruby/object:Gem::Version
195
195
  version: '2.0'
196
+ - - "<"
197
+ - !ruby/object:Gem::Version
198
+ version: '4.0'
196
199
  type: :runtime
197
200
  prerelease: false
198
201
  version_requirements: !ruby/object:Gem::Requirement
199
202
  requirements:
200
- - - "~>"
203
+ - - ">"
201
204
  - !ruby/object:Gem::Version
202
205
  version: '2.0'
206
+ - - "<"
207
+ - !ruby/object:Gem::Version
208
+ version: '4.0'
203
209
  - !ruby/object:Gem::Dependency
204
210
  name: thor
205
211
  requirement: !ruby/object:Gem::Requirement
@@ -228,34 +234,6 @@ dependencies:
228
234
  - - "~>"
229
235
  - !ruby/object:Gem::Version
230
236
  version: '4.0'
231
- - !ruby/object:Gem::Dependency
232
- name: celluloid
233
- requirement: !ruby/object:Gem::Requirement
234
- requirements:
235
- - - '='
236
- - !ruby/object:Gem::Version
237
- version: 0.16.0
238
- type: :runtime
239
- prerelease: false
240
- version_requirements: !ruby/object:Gem::Requirement
241
- requirements:
242
- - - '='
243
- - !ruby/object:Gem::Version
244
- version: 0.16.0
245
- - !ruby/object:Gem::Dependency
246
- name: celluloid-io
247
- requirement: !ruby/object:Gem::Requirement
248
- requirements:
249
- - - "~>"
250
- - !ruby/object:Gem::Version
251
- version: 0.16.1
252
- type: :runtime
253
- prerelease: false
254
- version_requirements: !ruby/object:Gem::Requirement
255
- requirements:
256
- - - "~>"
257
- - !ruby/object:Gem::Version
258
- version: 0.16.1
259
237
  - !ruby/object:Gem::Dependency
260
238
  name: mixlib-archive
261
239
  requirement: !ruby/object:Gem::Requirement
@@ -270,166 +248,6 @@ dependencies:
270
248
  - - "~>"
271
249
  - !ruby/object:Gem::Version
272
250
  version: '0.1'
273
- - !ruby/object:Gem::Dependency
274
- name: aruba
275
- requirement: !ruby/object:Gem::Requirement
276
- requirements:
277
- - - "~>"
278
- - !ruby/object:Gem::Version
279
- version: 0.10.0
280
- type: :development
281
- prerelease: false
282
- version_requirements: !ruby/object:Gem::Requirement
283
- requirements:
284
- - - "~>"
285
- - !ruby/object:Gem::Version
286
- version: 0.10.0
287
- - !ruby/object:Gem::Dependency
288
- name: chef-zero
289
- requirement: !ruby/object:Gem::Requirement
290
- requirements:
291
- - - "~>"
292
- - !ruby/object:Gem::Version
293
- version: '4.0'
294
- type: :development
295
- prerelease: false
296
- version_requirements: !ruby/object:Gem::Requirement
297
- requirements:
298
- - - "~>"
299
- - !ruby/object:Gem::Version
300
- version: '4.0'
301
- - !ruby/object:Gem::Dependency
302
- name: dep_selector
303
- requirement: !ruby/object:Gem::Requirement
304
- requirements:
305
- - - "~>"
306
- - !ruby/object:Gem::Version
307
- version: '1.0'
308
- type: :development
309
- prerelease: false
310
- version_requirements: !ruby/object:Gem::Requirement
311
- requirements:
312
- - - "~>"
313
- - !ruby/object:Gem::Version
314
- version: '1.0'
315
- - !ruby/object:Gem::Dependency
316
- name: fuubar
317
- requirement: !ruby/object:Gem::Requirement
318
- requirements:
319
- - - "~>"
320
- - !ruby/object:Gem::Version
321
- version: '2.0'
322
- type: :development
323
- prerelease: false
324
- version_requirements: !ruby/object:Gem::Requirement
325
- requirements:
326
- - - "~>"
327
- - !ruby/object:Gem::Version
328
- version: '2.0'
329
- - !ruby/object:Gem::Dependency
330
- name: rake
331
- requirement: !ruby/object:Gem::Requirement
332
- requirements:
333
- - - "~>"
334
- - !ruby/object:Gem::Version
335
- version: '10.1'
336
- type: :development
337
- prerelease: false
338
- version_requirements: !ruby/object:Gem::Requirement
339
- requirements:
340
- - - "~>"
341
- - !ruby/object:Gem::Version
342
- version: '10.1'
343
- - !ruby/object:Gem::Dependency
344
- name: rspec
345
- requirement: !ruby/object:Gem::Requirement
346
- requirements:
347
- - - "~>"
348
- - !ruby/object:Gem::Version
349
- version: '3.0'
350
- type: :development
351
- prerelease: false
352
- version_requirements: !ruby/object:Gem::Requirement
353
- requirements:
354
- - - "~>"
355
- - !ruby/object:Gem::Version
356
- version: '3.0'
357
- - !ruby/object:Gem::Dependency
358
- name: spork
359
- requirement: !ruby/object:Gem::Requirement
360
- requirements:
361
- - - "~>"
362
- - !ruby/object:Gem::Version
363
- version: '0.9'
364
- type: :development
365
- prerelease: false
366
- version_requirements: !ruby/object:Gem::Requirement
367
- requirements:
368
- - - "~>"
369
- - !ruby/object:Gem::Version
370
- version: '0.9'
371
- - !ruby/object:Gem::Dependency
372
- name: test-kitchen
373
- requirement: !ruby/object:Gem::Requirement
374
- requirements:
375
- - - "~>"
376
- - !ruby/object:Gem::Version
377
- version: '1.2'
378
- type: :development
379
- prerelease: false
380
- version_requirements: !ruby/object:Gem::Requirement
381
- requirements:
382
- - - "~>"
383
- - !ruby/object:Gem::Version
384
- version: '1.2'
385
- - !ruby/object:Gem::Dependency
386
- name: webmock
387
- requirement: !ruby/object:Gem::Requirement
388
- requirements:
389
- - - "~>"
390
- - !ruby/object:Gem::Version
391
- version: '1.11'
392
- type: :development
393
- prerelease: false
394
- version_requirements: !ruby/object:Gem::Requirement
395
- requirements:
396
- - - "~>"
397
- - !ruby/object:Gem::Version
398
- version: '1.11'
399
- - !ruby/object:Gem::Dependency
400
- name: yard
401
- requirement: !ruby/object:Gem::Requirement
402
- requirements:
403
- - - "~>"
404
- - !ruby/object:Gem::Version
405
- version: '0.8'
406
- type: :development
407
- prerelease: false
408
- version_requirements: !ruby/object:Gem::Requirement
409
- requirements:
410
- - - "~>"
411
- - !ruby/object:Gem::Version
412
- version: '0.8'
413
- - !ruby/object:Gem::Dependency
414
- name: http
415
- requirement: !ruby/object:Gem::Requirement
416
- requirements:
417
- - - "~>"
418
- - !ruby/object:Gem::Version
419
- version: '0.9'
420
- - - ">="
421
- - !ruby/object:Gem::Version
422
- version: 0.9.8
423
- type: :development
424
- prerelease: false
425
- version_requirements: !ruby/object:Gem::Requirement
426
- requirements:
427
- - - "~>"
428
- - !ruby/object:Gem::Version
429
- version: '0.9'
430
- - - ">="
431
- - !ruby/object:Gem::Version
432
- version: 0.9.8
433
251
  description: Manages a Cookbook's, or an Application's, Cookbook dependencies
434
252
  email:
435
253
  - jamie@vialstudios.com
@@ -457,6 +275,7 @@ files:
457
275
  - Thorfile
458
276
  - berkshelf.gemspec
459
277
  - bin/berks
278
+ - docs/berkshelf_for_newcomers.md
460
279
  - features/berksfile.feature
461
280
  - features/commands/apply.feature
462
281
  - features/commands/contingent.feature
@@ -641,15 +460,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
641
460
  requirements:
642
461
  - - ">="
643
462
  - !ruby/object:Gem::Version
644
- version: 2.0.0
463
+ version: 2.2.0
645
464
  required_rubygems_version: !ruby/object:Gem::Requirement
646
465
  requirements:
647
466
  - - ">="
648
467
  - !ruby/object:Gem::Version
649
- version: 1.8.0
468
+ version: 2.0.0
650
469
  requirements: []
651
470
  rubyforge_project:
652
- rubygems_version: 2.5.1
471
+ rubygems_version: 2.4.8
653
472
  signing_key:
654
473
  specification_version: 4
655
474
  summary: Manages a Cookbook's, or an Application's, Cookbook dependencies
@@ -761,4 +580,3 @@ test_files:
761
580
  - spec/unit/berkshelf/validator_spec.rb
762
581
  - spec/unit/berkshelf/visualizer_spec.rb
763
582
  - spec/unit/berkshelf_spec.rb
764
- has_rdoc: