berkshelf 3.0.0.beta2 → 3.0.0.beta3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +0 -1
  3. data/CHANGELOG.md +8 -0
  4. data/Gemfile +0 -1
  5. data/Guardfile +0 -4
  6. data/README.md +1 -1
  7. data/Thorfile +2 -11
  8. data/berkshelf.gemspec +2 -5
  9. data/features/berksfile.feature +2 -10
  10. data/features/commands/apply.feature +31 -0
  11. data/features/{configure_command.feature → commands/configure.feature} +9 -11
  12. data/features/{contingent_command.feature → commands/contingent.feature} +10 -20
  13. data/features/{cookbook_command.feature → commands/cookbook.feature} +4 -11
  14. data/features/{init_command.feature → commands/init.feature} +10 -19
  15. data/features/{install_command.feature → commands/install.feature} +161 -82
  16. data/features/{list_command.feature → commands/list.feature} +4 -14
  17. data/features/{outdated_command.feature → commands/outdated.feature} +21 -63
  18. data/features/{package_command.feature → commands/package.feature} +11 -22
  19. data/features/{shelf → commands/shelf}/list.feature +3 -8
  20. data/features/{shelf → commands/shelf}/show.feature +5 -9
  21. data/features/{shelf → commands/shelf}/uninstall.feature +6 -10
  22. data/features/{show_command.feature → commands/show.feature} +13 -38
  23. data/features/commands/update.feature +48 -0
  24. data/features/commands/upload.feature +197 -0
  25. data/features/commands/vendor.feature +53 -0
  26. data/features/community_site.feature +39 -0
  27. data/features/config.feature +79 -9
  28. data/features/help.feature +10 -19
  29. data/features/json_formatter.feature +19 -44
  30. data/features/licenses.feature +27 -61
  31. data/features/lockfile.feature +120 -354
  32. data/features/resolver.feature +28 -0
  33. data/features/step_definitions/berksfile_steps.rb +39 -0
  34. data/features/step_definitions/chef/config_steps.rb +1 -1
  35. data/features/step_definitions/chef_server_steps.rb +27 -27
  36. data/features/step_definitions/config_steps.rb +3 -0
  37. data/features/step_definitions/filesystem_steps.rb +10 -0
  38. data/features/step_definitions/json_steps.rb +0 -7
  39. data/features/step_definitions/lockfile_steps.rb +53 -0
  40. data/features/step_definitions/utility_steps.rb +4 -4
  41. data/features/support/env.rb +1 -0
  42. data/generator_files/Berksfile.erb +1 -1
  43. data/generator_files/README.md.erb +62 -6
  44. data/generator_files/Vagrantfile.erb +15 -4
  45. data/lib/berkshelf.rb +2 -4
  46. data/lib/berkshelf/api_client.rb +5 -7
  47. data/lib/berkshelf/berksfile.rb +24 -20
  48. data/lib/berkshelf/cached_cookbook.rb +8 -1
  49. data/lib/berkshelf/cli.rb +5 -10
  50. data/lib/berkshelf/community_rest.rb +4 -5
  51. data/lib/berkshelf/config.rb +8 -2
  52. data/lib/berkshelf/cookbook_store.rb +9 -14
  53. data/lib/berkshelf/dependency.rb +16 -13
  54. data/lib/berkshelf/errors.rb +15 -1
  55. data/lib/berkshelf/formatters/json.rb +1 -1
  56. data/lib/berkshelf/init_generator.rb +17 -3
  57. data/lib/berkshelf/installer.rb +12 -1
  58. data/lib/berkshelf/logger.rb +7 -4
  59. data/lib/berkshelf/resolver.rb +1 -1
  60. data/lib/berkshelf/version.rb +1 -1
  61. data/spec/spec_helper.rb +0 -9
  62. data/spec/support/chef_server.rb +24 -7
  63. data/spec/unit/berkshelf/api_client/remote_cookbook_spec.rb +3 -3
  64. data/spec/unit/berkshelf/berksfile_spec.rb +35 -1
  65. data/spec/unit/berkshelf/cached_cookbook_spec.rb +8 -0
  66. data/spec/unit/berkshelf/community_rest_spec.rb +76 -25
  67. data/spec/unit/berkshelf/cookbook_generator_spec.rb +9 -3
  68. data/spec/unit/berkshelf/dependency_spec.rb +16 -1
  69. data/spec/unit/berkshelf/init_generator_spec.rb +71 -7
  70. metadata +44 -116
  71. data/.cane +0 -4
  72. data/features/apply_command.feature +0 -40
  73. data/features/groups_install.feature +0 -113
  74. data/features/update_command.feature +0 -136
  75. data/features/upload_command.feature +0 -327
  76. data/features/vendor_command.feature +0 -83
  77. data/lib/berkshelf/chef.rb +0 -7
  78. data/lib/berkshelf/chef/cookbook.rb +0 -5
  79. data/lib/berkshelf/chef/cookbook/chefignore.rb +0 -75
  80. data/spec/fixtures/cassettes/Berkshelf_CommunityREST/_download/unpacks_the_archive.json +0 -1
  81. data/spec/fixtures/cassettes/Berkshelf_CommunityREST/_find/raises_a_CommunitySiteError_error_on_any_non_200_or_404_response.json +0 -1
  82. data/spec/fixtures/cassettes/Berkshelf_CommunityREST/_find/raises_a_CookbookNotFound_error_on_a_404_response_for_a_non-existent_cookbook.json +0 -1
  83. data/spec/fixtures/cassettes/Berkshelf_CommunityREST/_find/raises_a_CookbookNotFound_error_on_a_404_response_for_a_non-existent_version.json +0 -1
  84. data/spec/fixtures/cassettes/Berkshelf_CommunityREST/_find/returns_the_cookbook_and_version_information.json +0 -1
  85. data/spec/fixtures/cassettes/Berkshelf_CommunityREST/_latest_version/raises_a_CommunitySiteError_error_on_any_non_200_or_404_response.json +0 -1
  86. data/spec/fixtures/cassettes/Berkshelf_CommunityREST/_latest_version/raises_a_CookbookNotFound_error_on_a_404_response.json +0 -1
  87. data/spec/fixtures/cassettes/Berkshelf_CommunityREST/_latest_version/returns_the_version_number_of_the_latest_version_of_the_cookbook.json +0 -1
  88. data/spec/fixtures/cassettes/Berkshelf_CommunityREST/_satisfy/returns_the_version_number_of_the_best_solution.json +0 -1
  89. data/spec/fixtures/cassettes/Berkshelf_CommunityREST/_versions/raises_a_CommunitySiteError_error_on_any_non_200_or_404_response.json +0 -1
  90. data/spec/fixtures/cassettes/Berkshelf_CommunityREST/_versions/raises_a_CookbookNotFound_error_on_a_404_response.json +0 -1
  91. data/spec/fixtures/cassettes/Berkshelf_CommunityREST/_versions/returns_an_array_containing_an_item_for_each_version.json +0 -1
  92. data/spec/fixtures/cassettes/Berkshelf_Resolver/_initialize/adds_the_dependencies_of_the_dependency_as_dependencies.yml +0 -3694
  93. data/spec/fixtures/cassettes/Berkshelf_Resolver/_initialize/adds_the_dependencies_of_the_source_as_sources.yml +0 -3829
  94. data/spec/unit/berkshelf/chef/cookbook/chefignore_spec.rb +0 -19
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.0.0.beta2
4
+ version: 3.0.0.beta3
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: 2013-07-19 00:00:00.000000000 Z
15
+ date: 2013-10-17 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: addressable
@@ -70,20 +70,6 @@ dependencies:
70
70
  - - ~>
71
71
  - !ruby/object:Gem::Version
72
72
  version: '0.1'
73
- - !ruby/object:Gem::Dependency
74
- name: celluloid
75
- requirement: !ruby/object:Gem::Requirement
76
- requirements:
77
- - - '>='
78
- - !ruby/object:Gem::Version
79
- version: 0.14.0
80
- type: :runtime
81
- prerelease: false
82
- version_requirements: !ruby/object:Gem::Requirement
83
- requirements:
84
- - - '>='
85
- - !ruby/object:Gem::Version
86
- version: 0.14.0
87
73
  - !ruby/object:Gem::Dependency
88
74
  name: faraday
89
75
  requirement: !ruby/object:Gem::Requirement
@@ -146,28 +132,28 @@ dependencies:
146
132
  requirements:
147
133
  - - ~>
148
134
  - !ruby/object:Gem::Version
149
- version: 1.4.0
135
+ version: '1.6'
150
136
  type: :runtime
151
137
  prerelease: false
152
138
  version_requirements: !ruby/object:Gem::Requirement
153
139
  requirements:
154
140
  - - ~>
155
141
  - !ruby/object:Gem::Version
156
- version: 1.4.0
142
+ version: '1.6'
157
143
  - !ruby/object:Gem::Dependency
158
144
  name: solve
159
145
  requirement: !ruby/object:Gem::Requirement
160
146
  requirements:
161
147
  - - '>='
162
148
  - !ruby/object:Gem::Version
163
- version: 0.5.0
149
+ version: 0.8.0
164
150
  type: :runtime
165
151
  prerelease: false
166
152
  version_requirements: !ruby/object:Gem::Requirement
167
153
  requirements:
168
154
  - - '>='
169
155
  - !ruby/object:Gem::Version
170
- version: 0.5.0
156
+ version: 0.8.0
171
157
  - !ruby/object:Gem::Dependency
172
158
  name: thor
173
159
  requirement: !ruby/object:Gem::Requirement
@@ -196,20 +182,6 @@ dependencies:
196
182
  - - ~>
197
183
  - !ruby/object:Gem::Version
198
184
  version: '0.5'
199
- - !ruby/object:Gem::Dependency
200
- name: cane
201
- requirement: !ruby/object:Gem::Requirement
202
- requirements:
203
- - - ~>
204
- - !ruby/object:Gem::Version
205
- version: '2.5'
206
- type: :development
207
- prerelease: false
208
- version_requirements: !ruby/object:Gem::Requirement
209
- requirements:
210
- - - ~>
211
- - !ruby/object:Gem::Version
212
- version: '2.5'
213
185
  - !ruby/object:Gem::Dependency
214
186
  name: chef-zero
215
187
  requirement: !ruby/object:Gem::Requirement
@@ -294,20 +266,6 @@ dependencies:
294
266
  - - '>='
295
267
  - !ruby/object:Gem::Version
296
268
  version: 1.0.0.alpha7
297
- - !ruby/object:Gem::Dependency
298
- name: vcr
299
- requirement: !ruby/object:Gem::Requirement
300
- requirements:
301
- - - ~>
302
- - !ruby/object:Gem::Version
303
- version: '2.4'
304
- type: :development
305
- prerelease: false
306
- version_requirements: !ruby/object:Gem::Requirement
307
- requirements:
308
- - - ~>
309
- - !ruby/object:Gem::Version
310
- version: '2.4'
311
269
  - !ruby/object:Gem::Dependency
312
270
  name: webmock
313
271
  requirement: !ruby/object:Gem::Requirement
@@ -348,7 +306,6 @@ executables:
348
306
  extensions: []
349
307
  extra_rdoc_files: []
350
308
  files:
351
- - .cane
352
309
  - .gitignore
353
310
  - .ruby-version
354
311
  - .travis.yml
@@ -363,26 +320,31 @@ files:
363
320
  - berkshelf-complete.sh
364
321
  - berkshelf.gemspec
365
322
  - bin/berks
366
- - features/apply_command.feature
367
323
  - features/berksfile.feature
324
+ - features/commands/apply.feature
325
+ - features/commands/configure.feature
326
+ - features/commands/contingent.feature
327
+ - features/commands/cookbook.feature
328
+ - features/commands/init.feature
329
+ - features/commands/install.feature
330
+ - features/commands/list.feature
331
+ - features/commands/outdated.feature
332
+ - features/commands/package.feature
333
+ - features/commands/shelf/list.feature
334
+ - features/commands/shelf/show.feature
335
+ - features/commands/shelf/uninstall.feature
336
+ - features/commands/show.feature
337
+ - features/commands/update.feature
338
+ - features/commands/upload.feature
339
+ - features/commands/vendor.feature
340
+ - features/community_site.feature
368
341
  - features/config.feature
369
- - features/configure_command.feature
370
- - features/contingent_command.feature
371
- - features/cookbook_command.feature
372
- - features/groups_install.feature
373
342
  - features/help.feature
374
- - features/init_command.feature
375
- - features/install_command.feature
376
343
  - features/json_formatter.feature
377
344
  - features/licenses.feature
378
- - features/list_command.feature
379
345
  - features/lockfile.feature
380
- - features/outdated_command.feature
381
- - features/package_command.feature
382
- - features/shelf/list.feature
383
- - features/shelf/show.feature
384
- - features/shelf/uninstall.feature
385
- - features/show_command.feature
346
+ - features/resolver.feature
347
+ - features/step_definitions/berksfile_steps.rb
386
348
  - features/step_definitions/chef/config_steps.rb
387
349
  - features/step_definitions/chef_server_steps.rb
388
350
  - features/step_definitions/cli_steps.rb
@@ -395,9 +357,6 @@ files:
395
357
  - features/step_definitions/utility_steps.rb
396
358
  - features/support/aruba.rb
397
359
  - features/support/env.rb
398
- - features/update_command.feature
399
- - features/upload_command.feature
400
- - features/vendor_command.feature
401
360
  - generator_files/Berksfile.erb
402
361
  - generator_files/Gemfile.erb
403
362
  - generator_files/README.md.erb
@@ -420,9 +379,6 @@ files:
420
379
  - lib/berkshelf/base_generator.rb
421
380
  - lib/berkshelf/berksfile.rb
422
381
  - lib/berkshelf/cached_cookbook.rb
423
- - lib/berkshelf/chef.rb
424
- - lib/berkshelf/chef/cookbook.rb
425
- - lib/berkshelf/chef/cookbook/chefignore.rb
426
382
  - lib/berkshelf/cli.rb
427
383
  - lib/berkshelf/commands/shelf.rb
428
384
  - lib/berkshelf/commands/test_command.rb
@@ -470,20 +426,6 @@ files:
470
426
  - spec/config/knife.rb
471
427
  - spec/config/validator.pem
472
428
  - spec/fixtures/Berksfile
473
- - spec/fixtures/cassettes/Berkshelf_CommunityREST/_download/unpacks_the_archive.json
474
- - spec/fixtures/cassettes/Berkshelf_CommunityREST/_find/raises_a_CommunitySiteError_error_on_any_non_200_or_404_response.json
475
- - spec/fixtures/cassettes/Berkshelf_CommunityREST/_find/raises_a_CookbookNotFound_error_on_a_404_response_for_a_non-existent_cookbook.json
476
- - spec/fixtures/cassettes/Berkshelf_CommunityREST/_find/raises_a_CookbookNotFound_error_on_a_404_response_for_a_non-existent_version.json
477
- - spec/fixtures/cassettes/Berkshelf_CommunityREST/_find/returns_the_cookbook_and_version_information.json
478
- - spec/fixtures/cassettes/Berkshelf_CommunityREST/_latest_version/raises_a_CommunitySiteError_error_on_any_non_200_or_404_response.json
479
- - spec/fixtures/cassettes/Berkshelf_CommunityREST/_latest_version/raises_a_CookbookNotFound_error_on_a_404_response.json
480
- - spec/fixtures/cassettes/Berkshelf_CommunityREST/_latest_version/returns_the_version_number_of_the_latest_version_of_the_cookbook.json
481
- - spec/fixtures/cassettes/Berkshelf_CommunityREST/_satisfy/returns_the_version_number_of_the_best_solution.json
482
- - spec/fixtures/cassettes/Berkshelf_CommunityREST/_versions/raises_a_CommunitySiteError_error_on_any_non_200_or_404_response.json
483
- - spec/fixtures/cassettes/Berkshelf_CommunityREST/_versions/raises_a_CookbookNotFound_error_on_a_404_response.json
484
- - spec/fixtures/cassettes/Berkshelf_CommunityREST/_versions/returns_an_array_containing_an_item_for_each_version.json
485
- - spec/fixtures/cassettes/Berkshelf_Resolver/_initialize/adds_the_dependencies_of_the_dependency_as_dependencies.yml
486
- - spec/fixtures/cassettes/Berkshelf_Resolver/_initialize/adds_the_dependencies_of_the_source_as_sources.yml
487
429
  - spec/fixtures/cookbooks/example_cookbook-0.5.0/README.md
488
430
  - spec/fixtures/cookbooks/example_cookbook-0.5.0/metadata.rb
489
431
  - spec/fixtures/cookbooks/example_cookbook-0.5.0/recipes/default.rb
@@ -508,7 +450,6 @@ files:
508
450
  - spec/unit/berkshelf/api_client_spec.rb
509
451
  - spec/unit/berkshelf/berksfile_spec.rb
510
452
  - spec/unit/berkshelf/cached_cookbook_spec.rb
511
- - spec/unit/berkshelf/chef/cookbook/chefignore_spec.rb
512
453
  - spec/unit/berkshelf/community_rest_spec.rb
513
454
  - spec/unit/berkshelf/config_spec.rb
514
455
  - spec/unit/berkshelf/cookbook_generator_spec.rb
@@ -562,26 +503,31 @@ signing_key:
562
503
  specification_version: 4
563
504
  summary: Manages a Cookbook's, or an Application's, Cookbook dependencies
564
505
  test_files:
565
- - features/apply_command.feature
566
506
  - features/berksfile.feature
507
+ - features/commands/apply.feature
508
+ - features/commands/configure.feature
509
+ - features/commands/contingent.feature
510
+ - features/commands/cookbook.feature
511
+ - features/commands/init.feature
512
+ - features/commands/install.feature
513
+ - features/commands/list.feature
514
+ - features/commands/outdated.feature
515
+ - features/commands/package.feature
516
+ - features/commands/shelf/list.feature
517
+ - features/commands/shelf/show.feature
518
+ - features/commands/shelf/uninstall.feature
519
+ - features/commands/show.feature
520
+ - features/commands/update.feature
521
+ - features/commands/upload.feature
522
+ - features/commands/vendor.feature
523
+ - features/community_site.feature
567
524
  - features/config.feature
568
- - features/configure_command.feature
569
- - features/contingent_command.feature
570
- - features/cookbook_command.feature
571
- - features/groups_install.feature
572
525
  - features/help.feature
573
- - features/init_command.feature
574
- - features/install_command.feature
575
526
  - features/json_formatter.feature
576
527
  - features/licenses.feature
577
- - features/list_command.feature
578
528
  - features/lockfile.feature
579
- - features/outdated_command.feature
580
- - features/package_command.feature
581
- - features/shelf/list.feature
582
- - features/shelf/show.feature
583
- - features/shelf/uninstall.feature
584
- - features/show_command.feature
529
+ - features/resolver.feature
530
+ - features/step_definitions/berksfile_steps.rb
585
531
  - features/step_definitions/chef/config_steps.rb
586
532
  - features/step_definitions/chef_server_steps.rb
587
533
  - features/step_definitions/cli_steps.rb
@@ -594,27 +540,10 @@ test_files:
594
540
  - features/step_definitions/utility_steps.rb
595
541
  - features/support/aruba.rb
596
542
  - features/support/env.rb
597
- - features/update_command.feature
598
- - features/upload_command.feature
599
- - features/vendor_command.feature
600
543
  - spec/config/berkshelf.pem
601
544
  - spec/config/knife.rb
602
545
  - spec/config/validator.pem
603
546
  - spec/fixtures/Berksfile
604
- - spec/fixtures/cassettes/Berkshelf_CommunityREST/_download/unpacks_the_archive.json
605
- - spec/fixtures/cassettes/Berkshelf_CommunityREST/_find/raises_a_CommunitySiteError_error_on_any_non_200_or_404_response.json
606
- - spec/fixtures/cassettes/Berkshelf_CommunityREST/_find/raises_a_CookbookNotFound_error_on_a_404_response_for_a_non-existent_cookbook.json
607
- - spec/fixtures/cassettes/Berkshelf_CommunityREST/_find/raises_a_CookbookNotFound_error_on_a_404_response_for_a_non-existent_version.json
608
- - spec/fixtures/cassettes/Berkshelf_CommunityREST/_find/returns_the_cookbook_and_version_information.json
609
- - spec/fixtures/cassettes/Berkshelf_CommunityREST/_latest_version/raises_a_CommunitySiteError_error_on_any_non_200_or_404_response.json
610
- - spec/fixtures/cassettes/Berkshelf_CommunityREST/_latest_version/raises_a_CookbookNotFound_error_on_a_404_response.json
611
- - spec/fixtures/cassettes/Berkshelf_CommunityREST/_latest_version/returns_the_version_number_of_the_latest_version_of_the_cookbook.json
612
- - spec/fixtures/cassettes/Berkshelf_CommunityREST/_satisfy/returns_the_version_number_of_the_best_solution.json
613
- - spec/fixtures/cassettes/Berkshelf_CommunityREST/_versions/raises_a_CommunitySiteError_error_on_any_non_200_or_404_response.json
614
- - spec/fixtures/cassettes/Berkshelf_CommunityREST/_versions/raises_a_CookbookNotFound_error_on_a_404_response.json
615
- - spec/fixtures/cassettes/Berkshelf_CommunityREST/_versions/returns_an_array_containing_an_item_for_each_version.json
616
- - spec/fixtures/cassettes/Berkshelf_Resolver/_initialize/adds_the_dependencies_of_the_dependency_as_dependencies.yml
617
- - spec/fixtures/cassettes/Berkshelf_Resolver/_initialize/adds_the_dependencies_of_the_source_as_sources.yml
618
547
  - spec/fixtures/cookbooks/example_cookbook-0.5.0/README.md
619
548
  - spec/fixtures/cookbooks/example_cookbook-0.5.0/metadata.rb
620
549
  - spec/fixtures/cookbooks/example_cookbook-0.5.0/recipes/default.rb
@@ -639,7 +568,6 @@ test_files:
639
568
  - spec/unit/berkshelf/api_client_spec.rb
640
569
  - spec/unit/berkshelf/berksfile_spec.rb
641
570
  - spec/unit/berkshelf/cached_cookbook_spec.rb
642
- - spec/unit/berkshelf/chef/cookbook/chefignore_spec.rb
643
571
  - spec/unit/berkshelf/community_rest_spec.rb
644
572
  - spec/unit/berkshelf/config_spec.rb
645
573
  - spec/unit/berkshelf/cookbook_generator_spec.rb
data/.cane DELETED
@@ -1,4 +0,0 @@
1
- --doc-exclude lib/berkshelf/errors.rb
2
- --max-violations 100
3
- --style-measure 120
4
- --parallel
@@ -1,40 +0,0 @@
1
- Feature: Applying cookbook versions to a Chef Environment
2
- As a berks user
3
- I want to push my berks resolved cookbook versions to my environment
4
- So that I can avoid manual configuration of my environments
5
-
6
- Scenario: Locking a cookbook version with dependencies
7
- Given the cookbook store contains a cookbook "fake" "1.0.0" with dependencies:
8
- | dependency | 2.0.0 |
9
- And the cookbook store has the cookbooks:
10
- | dependency | 2.0.0 |
11
- And The Chef Server has an environment named "berkshelf_lock_test"
12
- And I write to "Berksfile" with:
13
- """
14
- source "http://localhost:26210"
15
-
16
- cookbook 'fake', '1.0.0'
17
- """
18
- When I successfully run `berks apply berkshelf_lock_test`
19
- Then the version locks in the "berkshelf_lock_test" environment should be:
20
- | cookbook | version_lock |
21
- | fake | 1.0.0 |
22
- | dependency | 2.0.0 |
23
- And the exit status should be 0
24
-
25
- Scenario: Locking cookbook versions to a non-existent Chef Environment
26
- Given The Chef Server does not have an environment named "berkshelf_lock_test"
27
- And the cookbook store has the cookbooks:
28
- | fake | 1.0.0 |
29
- And I write to "Berksfile" with:
30
- """
31
- source "http://localhost:26210"
32
-
33
- cookbook 'fake', '1.0.0'
34
- """
35
- When I run `berks apply berkshelf_lock_test`
36
- Then the output should contain:
37
- """
38
- The environment 'berkshelf_lock_test' does not exist
39
- """
40
- And the exit status should be "EnvironmentNotFound"
@@ -1,113 +0,0 @@
1
- Feature: Installing specific groups
2
- As a user
3
- I want to be able specify groups of cookbooks to include or exclude
4
- So I don't install cookbooks that are part of a group that I do not want to install
5
-
6
- Scenario: Using the --except option
7
- Given the cookbook store has the cookbooks:
8
- | default | 1.0.0 |
9
- | takeme | 1.0.0 |
10
- Given I write to "Berksfile" with:
11
- """
12
- source "http://localhost:26210"
13
-
14
- group :notme do
15
- cookbook 'notme', '1.0.0'
16
- end
17
-
18
- cookbook 'default', '1.0.0'
19
-
20
- group :takeme do
21
- cookbook 'takeme', '1.0.0'
22
- end
23
- """
24
- When I successfully run `berks install --except notme`
25
- Then the output should contain:
26
- """
27
- Using default (1.0.0)
28
- Using takeme (1.0.0)
29
- """
30
- And the output should not contain "Using notme (1.0.0)"
31
- And the exit status should be 0
32
-
33
- Scenario: Using the --except option with a lockfile
34
- Given the cookbook store has the cookbooks:
35
- | default | 1.0.0 |
36
- | takeme | 1.0.0 |
37
- Given I write to "Berksfile" with:
38
- """
39
- source "http://localhost:26210"
40
-
41
- group :notme do
42
- cookbook 'notme', '1.0.0'
43
- end
44
-
45
- cookbook 'default', '1.0.0'
46
-
47
- group :takeme do
48
- cookbook 'takeme', '1.0.0'
49
- end
50
- """
51
- And I write to "Berksfile.lock" with:
52
- """
53
- {
54
- "dependencies": {
55
- "notme": { "locked_version": "1.0.0"},
56
- "takeme": { "locked_version": "1.0.0"},
57
- "default": { "locked_version": "1.0.0"}
58
- }
59
- }
60
- """
61
- When I successfully run `berks install --except notme`
62
- Then the output should contain:
63
- """
64
- Using default (1.0.0)
65
- Using takeme (1.0.0)
66
- """
67
- And the output should not contain "Using notme (1.0.0)"
68
- And the exit status should be 0
69
-
70
- Scenario: Using the --only option
71
- Given the cookbook store has the cookbooks:
72
- | takeme | 1.0.0 |
73
- Given I write to "Berksfile" with:
74
- """
75
- source "http://localhost:26210"
76
-
77
- group :notme do
78
- cookbook 'notme', '1.0.0'
79
- end
80
-
81
- cookbook 'default', '1.0.0'
82
-
83
- group :takeme do
84
- cookbook 'takeme', '1.0.0'
85
- end
86
- """
87
- When I successfully run `berks install --only takeme`
88
- Then the output should contain "Using takeme (1.0.0)"
89
- Then the output should not contain "Using notme (1.0.0)"
90
- Then the output should not contain "Using default (1.0.0)"
91
- And the exit status should be 0
92
-
93
- Scenario: Attempting to provide an only and except option
94
- Given I write to "Berksfile" with:
95
- """
96
- source "http://localhost:26210"
97
-
98
- group :notme do
99
- cookbook 'nginx', '= 0.101.2'
100
- end
101
-
102
- cookbook 'berkshelf-cookbook-fixture', '1.0.0'
103
-
104
- group :takeme do
105
- cookbook 'hostsfile', '1.0.1'
106
- end
107
- """
108
- When I run `berks install --only takeme --except notme`
109
- Then the output should contain:
110
- """
111
- Cannot specify both :except and :only
112
- """
113
- And the exit status should be "ArgumentError"