berkshelf 7.0.6 → 7.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +7 -7
- data/Rakefile +2 -2
- data/berkshelf.gemspec +9 -10
- data/bin/berks +5 -0
- data/lib/berkshelf.rb +2 -2
- data/lib/berkshelf/api_client/chef_server_connection.rb +3 -2
- data/lib/berkshelf/api_client/connection.rb +1 -1
- data/lib/berkshelf/berksfile.rb +47 -41
- data/lib/berkshelf/cached_cookbook.rb +6 -4
- data/lib/berkshelf/chef_config_compat.rb +1 -0
- data/lib/berkshelf/chef_repo_universe.rb +6 -4
- data/lib/berkshelf/cli.rb +12 -7
- data/lib/berkshelf/commands/shelf.rb +1 -1
- data/lib/berkshelf/community_rest.rb +4 -4
- data/lib/berkshelf/config.rb +1 -1
- data/lib/berkshelf/core_ext.rb +1 -1
- data/lib/berkshelf/core_ext/file_utils.rb +2 -2
- data/lib/berkshelf/dependency.rb +1 -1
- data/lib/berkshelf/downloader.rb +10 -3
- data/lib/berkshelf/errors.rb +2 -2
- data/lib/berkshelf/formatters/human.rb +1 -1
- data/lib/berkshelf/formatters/json.rb +4 -4
- data/lib/berkshelf/installer.rb +1 -1
- data/lib/berkshelf/location.rb +3 -3
- data/lib/berkshelf/lockfile.rb +14 -14
- data/lib/berkshelf/logger.rb +4 -2
- data/lib/berkshelf/mixin/git.rb +1 -1
- data/lib/berkshelf/packager.rb +2 -2
- data/lib/berkshelf/resolver.rb +1 -1
- data/lib/berkshelf/ridley_compat.rb +1 -1
- data/lib/berkshelf/shell.rb +1 -0
- data/lib/berkshelf/source.rb +6 -5
- data/lib/berkshelf/ssl_policies.rb +1 -3
- data/lib/berkshelf/thor.rb +1 -1
- data/lib/berkshelf/thor_ext.rb +1 -1
- data/lib/berkshelf/uploader.rb +11 -9
- data/lib/berkshelf/version.rb +1 -1
- data/lib/berkshelf/visualizer.rb +1 -1
- data/spec/config/knife.rb +1 -1
- data/spec/support/chef_server.rb +2 -2
- data/spec/support/git.rb +18 -18
- data/spec/support/path_helpers.rb +4 -4
- data/spec/tmp/berkshelf/cookbooks/dep-1.0.0/attributes/default.rb +0 -0
- data/spec/tmp/berkshelf/cookbooks/dep-1.0.0/files/default/file.h +0 -0
- data/spec/tmp/berkshelf/cookbooks/dep-1.0.0/metadata.rb +2 -0
- data/spec/tmp/berkshelf/cookbooks/dep-1.0.0/recipes/default.rb +0 -0
- data/spec/tmp/berkshelf/cookbooks/dep-1.0.0/templates/default/template.erb +0 -0
- data/spec/tmp/berkshelf/cookbooks/ekaf-1.0.0/attributes/default.rb +0 -0
- data/spec/tmp/berkshelf/cookbooks/ekaf-1.0.0/files/default/file.h +0 -0
- data/spec/tmp/berkshelf/cookbooks/ekaf-1.0.0/metadata.rb +3 -0
- data/spec/tmp/berkshelf/cookbooks/ekaf-1.0.0/recipes/default.rb +0 -0
- data/spec/tmp/berkshelf/cookbooks/ekaf-1.0.0/templates/default/template.erb +0 -0
- data/spec/tmp/berkshelf/cookbooks/fake-1.0.0/attributes/default.rb +0 -0
- data/spec/tmp/berkshelf/cookbooks/fake-1.0.0/files/default/file.h +0 -0
- data/spec/tmp/berkshelf/cookbooks/fake-1.0.0/metadata.rb +3 -0
- data/spec/tmp/berkshelf/cookbooks/fake-1.0.0/recipes/default.rb +0 -0
- data/spec/tmp/berkshelf/cookbooks/fake-1.0.0/templates/default/template.erb +0 -0
- data/spec/unit/berkshelf/berksfile_spec.rb +7 -7
- data/spec/unit/berkshelf/cli_spec.rb +1 -2
- data/spec/unit/berkshelf/community_rest_spec.rb +1 -1
- data/spec/unit/berkshelf/core_ext/file_utils_spec.rb +2 -2
- data/spec/unit/berkshelf/dependency_spec.rb +5 -5
- data/spec/unit/berkshelf/downloader_spec.rb +29 -8
- data/spec/unit/berkshelf/locations/base_spec.rb +1 -2
- data/spec/unit/berkshelf/locations/path_spec.rb +1 -2
- data/spec/unit/berkshelf/lockfile_spec.rb +9 -18
- data/spec/unit/berkshelf/ridley_compat_spec.rb +1 -1
- data/spec/unit/berkshelf/source_spec.rb +8 -7
- data/spec/unit/berkshelf/ssl_policies_spec.rb +3 -5
- data/spec/unit/berkshelf/uploader_spec.rb +6 -10
- metadata +49 -188
- data/.github/lock.yml +0 -1
- data/.gitignore +0 -30
- data/.rubocop.yml +0 -12
- data/.travis.yml +0 -73
- data/CHANGELOG.legacy.md +0 -307
- data/CHANGELOG.md +0 -1582
- data/CONTRIBUTING.md +0 -68
- data/Gemfile.lock +0 -301
- data/PLUGINS.md +0 -25
- data/README.md +0 -72
- data/Thorfile +0 -61
- data/appveyor.yml +0 -31
- data/docs/berkshelf_for_newcomers.md +0 -64
- data/features/artifactory.feature +0 -70
- data/features/berksfile.feature +0 -46
- data/features/commands/apply.feature +0 -41
- data/features/commands/contingent.feature +0 -47
- data/features/commands/info.feature +0 -141
- data/features/commands/install.feature +0 -646
- data/features/commands/list.feature +0 -78
- data/features/commands/outdated.feature +0 -127
- data/features/commands/package.feature +0 -17
- data/features/commands/search.feature +0 -17
- data/features/commands/shelf/list.feature +0 -32
- data/features/commands/shelf/show.feature +0 -113
- data/features/commands/shelf/uninstall.feature +0 -96
- data/features/commands/show.feature +0 -83
- data/features/commands/update.feature +0 -142
- data/features/commands/upload.feature +0 -499
- data/features/commands/vendor.feature +0 -154
- data/features/commands/verify.feature +0 -29
- data/features/commands/viz.feature +0 -66
- data/features/community_site.feature +0 -37
- data/features/help.feature +0 -11
- data/features/json_formatter.feature +0 -158
- data/features/lifecycle.feature +0 -378
- data/features/lockfile.feature +0 -378
- data/features/step_definitions/berksfile_steps.rb +0 -54
- data/features/step_definitions/chef/config_steps.rb +0 -12
- data/features/step_definitions/chef_server_steps.rb +0 -60
- data/features/step_definitions/cli_steps.rb +0 -18
- data/features/step_definitions/config_steps.rb +0 -46
- data/features/step_definitions/environment_steps.rb +0 -11
- data/features/step_definitions/filesystem_steps.rb +0 -286
- data/features/step_definitions/gem_steps.rb +0 -13
- data/features/step_definitions/json_steps.rb +0 -29
- data/features/step_definitions/utility_steps.rb +0 -11
- data/features/support/aruba.rb +0 -12
- data/features/support/env.rb +0 -77
- data/spec/fixtures/cookbooks/example_cookbook/.gitignore +0 -2
- data/spec/fixtures/cookbooks/example_cookbook/.kitchen.yml +0 -26
@@ -1,78 +0,0 @@
|
|
1
|
-
Feature: berks list
|
2
|
-
Scenario: When everything is good
|
3
|
-
Given the cookbook store has the cookbooks:
|
4
|
-
| fake1 | 1.0.0 |
|
5
|
-
| fake2 | 1.0.1 |
|
6
|
-
And I have a Berksfile pointing at the local Berkshelf API with:
|
7
|
-
"""
|
8
|
-
cookbook 'fake1', '1.0.0'
|
9
|
-
cookbook 'fake2', '1.0.1'
|
10
|
-
"""
|
11
|
-
And I write to "Berksfile.lock" with:
|
12
|
-
"""
|
13
|
-
DEPENDENCIES
|
14
|
-
fake1 (= 1.0.0)
|
15
|
-
fake2 (= 1.0.1)
|
16
|
-
|
17
|
-
GRAPH
|
18
|
-
fake1 (1.0.0)
|
19
|
-
fake2 (1.0.1)
|
20
|
-
"""
|
21
|
-
When I successfully run `berks list`
|
22
|
-
Then the output should contain:
|
23
|
-
"""
|
24
|
-
Cookbooks installed by your Berksfile:
|
25
|
-
* fake1 (1.0.0)
|
26
|
-
* fake2 (1.0.1)
|
27
|
-
"""
|
28
|
-
|
29
|
-
Scenario: When the lockfile is not present
|
30
|
-
Given I have a Berksfile pointing at the local Berkshelf API with:
|
31
|
-
"""
|
32
|
-
cookbook 'fake', '1.0.0'
|
33
|
-
"""
|
34
|
-
When I run `berks list`
|
35
|
-
Then the output should contain:
|
36
|
-
"""
|
37
|
-
Lockfile not found! Run `berks install` to create the lockfile.
|
38
|
-
"""
|
39
|
-
And the exit status should be "LockfileNotFound"
|
40
|
-
|
41
|
-
Scenario: When a dependency is not in the lockfile
|
42
|
-
Given I have a Berksfile pointing at the local Berkshelf API with:
|
43
|
-
"""
|
44
|
-
cookbook 'fake', '1.0.0'
|
45
|
-
"""
|
46
|
-
And I write to "Berksfile.lock" with:
|
47
|
-
"""
|
48
|
-
DEPENDENCIES
|
49
|
-
|
50
|
-
GRAPH
|
51
|
-
not_fake (1.0.0)
|
52
|
-
"""
|
53
|
-
When I run `berks list`
|
54
|
-
Then the output should contain:
|
55
|
-
"""
|
56
|
-
The lockfile is out of sync! Run `berks install` to sync the lockfile.
|
57
|
-
"""
|
58
|
-
And the exit status should be "LockfileOutOfSync"
|
59
|
-
|
60
|
-
Scenario: When a dependency is not installed
|
61
|
-
Given I have a Berksfile pointing at the local Berkshelf API with:
|
62
|
-
"""
|
63
|
-
cookbook 'fake', '1.0.0'
|
64
|
-
"""
|
65
|
-
And I write to "Berksfile.lock" with:
|
66
|
-
"""
|
67
|
-
DEPENDENCIES
|
68
|
-
fake (= 1.0.0)
|
69
|
-
|
70
|
-
GRAPH
|
71
|
-
fake (1.0.0)
|
72
|
-
"""
|
73
|
-
When I run `berks list`
|
74
|
-
Then the output should contain:
|
75
|
-
"""
|
76
|
-
The cookbook 'fake (1.0.0)' is not installed. Please run `berks install` to download and install the missing dependency.
|
77
|
-
"""
|
78
|
-
And the exit status should be "DependencyNotInstalled"
|
@@ -1,127 +0,0 @@
|
|
1
|
-
Feature: berks outdated
|
2
|
-
Scenario: the dependency is up to date
|
3
|
-
Given the Chef Server has cookbooks:
|
4
|
-
| bacon | 1.0.0 |
|
5
|
-
| bacon | 1.1.0 |
|
6
|
-
And the cookbook store has the cookbooks:
|
7
|
-
| bacon | 1.1.0 |
|
8
|
-
And I have a Berksfile pointing at the local Berkshelf API with:
|
9
|
-
"""
|
10
|
-
cookbook 'bacon', '~> 1.1.0'
|
11
|
-
"""
|
12
|
-
And I write to "Berksfile.lock" with:
|
13
|
-
"""
|
14
|
-
DEPENDENCIES
|
15
|
-
bacon (~> 1.1.0)
|
16
|
-
|
17
|
-
GRAPH
|
18
|
-
bacon (1.1.0)
|
19
|
-
"""
|
20
|
-
|
21
|
-
When I successfully run `berks outdated`
|
22
|
-
Then the output should contain:
|
23
|
-
"""
|
24
|
-
All cookbooks up to date!
|
25
|
-
"""
|
26
|
-
|
27
|
-
Scenario: the dependency has no version constraint and there are new items
|
28
|
-
Given the Chef Server has cookbooks:
|
29
|
-
| bacon | 1.0.0 |
|
30
|
-
| bacon | 1.1.0 |
|
31
|
-
And the cookbook store has the cookbooks:
|
32
|
-
| bacon | 1.0.0 |
|
33
|
-
And I have a Berksfile pointing at the local Berkshelf API with:
|
34
|
-
"""
|
35
|
-
cookbook 'bacon'
|
36
|
-
"""
|
37
|
-
And I write to "Berksfile.lock" with:
|
38
|
-
"""
|
39
|
-
DEPENDENCIES
|
40
|
-
bacon
|
41
|
-
|
42
|
-
GRAPH
|
43
|
-
bacon (1.0.0)
|
44
|
-
"""
|
45
|
-
When I successfully run `berks outdated`
|
46
|
-
Then the output should contain:
|
47
|
-
"""
|
48
|
-
The following cookbooks have newer versions:
|
49
|
-
* bacon (1.0.0 => 1.1.0)
|
50
|
-
"""
|
51
|
-
|
52
|
-
Scenario: the dependency has a version constraint and there are new items that satisfy it
|
53
|
-
Given the Chef Server has cookbooks:
|
54
|
-
| bacon | 1.1.0 |
|
55
|
-
| bacon | 1.2.1 |
|
56
|
-
| bacon | 1.5.8 |
|
57
|
-
And the cookbook store has the cookbooks:
|
58
|
-
| bacon | 1.0.0 |
|
59
|
-
And I have a Berksfile pointing at the local Berkshelf API with:
|
60
|
-
"""
|
61
|
-
cookbook 'bacon', '~> 1.0'
|
62
|
-
"""
|
63
|
-
And I write to "Berksfile.lock" with:
|
64
|
-
"""
|
65
|
-
DEPENDENCIES
|
66
|
-
bacon (~> 1.0)
|
67
|
-
|
68
|
-
GRAPH
|
69
|
-
bacon (1.0.0)
|
70
|
-
"""
|
71
|
-
When I successfully run `berks outdated`
|
72
|
-
Then the output should contain:
|
73
|
-
"""
|
74
|
-
The following cookbooks have newer versions:
|
75
|
-
* bacon (1.0.0 => 1.5.8)
|
76
|
-
"""
|
77
|
-
|
78
|
-
Scenario: When the lockfile is not present
|
79
|
-
Given I have a Berksfile pointing at the local Berkshelf API with:
|
80
|
-
"""
|
81
|
-
cookbook 'bacon', '1.0.0'
|
82
|
-
"""
|
83
|
-
When I run `berks outdated`
|
84
|
-
Then the output should contain:
|
85
|
-
"""
|
86
|
-
Lockfile not found! Run `berks install` to create the lockfile.
|
87
|
-
"""
|
88
|
-
And the exit status should be "LockfileNotFound"
|
89
|
-
|
90
|
-
Scenario: When a dependency is not in the lockfile
|
91
|
-
Given I have a Berksfile pointing at the local Berkshelf API with:
|
92
|
-
"""
|
93
|
-
cookbook 'bacon', '1.0.0'
|
94
|
-
"""
|
95
|
-
And I write to "Berksfile.lock" with:
|
96
|
-
"""
|
97
|
-
DEPENDENCIES
|
98
|
-
|
99
|
-
GRAPH
|
100
|
-
not_fake (1.0.0)
|
101
|
-
"""
|
102
|
-
When I run `berks outdated`
|
103
|
-
Then the output should contain:
|
104
|
-
"""
|
105
|
-
The lockfile is out of sync! Run `berks install` to sync the lockfile.
|
106
|
-
"""
|
107
|
-
And the exit status should be "LockfileOutOfSync"
|
108
|
-
|
109
|
-
Scenario: When a dependency is not installed
|
110
|
-
Given I have a Berksfile pointing at the local Berkshelf API with:
|
111
|
-
"""
|
112
|
-
cookbook 'bacon', '1.0.0'
|
113
|
-
"""
|
114
|
-
And I write to "Berksfile.lock" with:
|
115
|
-
"""
|
116
|
-
DEPENDENCIES
|
117
|
-
bacon (= 1.0.0)
|
118
|
-
|
119
|
-
GRAPH
|
120
|
-
bacon (1.0.0)
|
121
|
-
"""
|
122
|
-
When I run `berks outdated`
|
123
|
-
Then the output should contain:
|
124
|
-
"""
|
125
|
-
The cookbook 'bacon (1.0.0)' is not installed. Please run `berks install` to download and install the missing dependency.
|
126
|
-
"""
|
127
|
-
And the exit status should be "DependencyNotInstalled"
|
@@ -1,17 +0,0 @@
|
|
1
|
-
@api_server
|
2
|
-
Feature: berks package
|
3
|
-
Background:
|
4
|
-
* the cookbook store has the cookbooks:
|
5
|
-
| fake | 1.0.0 |
|
6
|
-
|
7
|
-
Scenario: When no options are passed
|
8
|
-
Given I have a Berksfile pointing at the local Berkshelf API with:
|
9
|
-
"""
|
10
|
-
cookbook 'fake', '~> 1.0.0'
|
11
|
-
"""
|
12
|
-
When I successfully run `berks package my-cookbooks.tar.gz`
|
13
|
-
Then a file named "my-cookbooks.tar.gz" should exist
|
14
|
-
And the output should contain:
|
15
|
-
"""
|
16
|
-
Cookbook(s) packaged to
|
17
|
-
"""
|
@@ -1,17 +0,0 @@
|
|
1
|
-
Feature: berks search
|
2
|
-
Scenario: Searching for a cookbook by name
|
3
|
-
* I successfully run `berks search berkshelf-cookbook-fixture`
|
4
|
-
* the output should contain:
|
5
|
-
"""
|
6
|
-
berkshelf-cookbook-fixture (1.0.0)
|
7
|
-
"""
|
8
|
-
|
9
|
-
Scenario: Searching for a cookbook by partial name
|
10
|
-
* I successfully run `berks search berkshelf-`
|
11
|
-
* the results should have the cookbooks:
|
12
|
-
"""
|
13
|
-
berkshelf-api (1.2.2)
|
14
|
-
berkshelf-api-server (2.2.0)
|
15
|
-
berkshelf-cookbook-fixture (1.0.0)
|
16
|
-
"""
|
17
|
-
* the results should each start with "berkshelf-"
|
@@ -1,32 +0,0 @@
|
|
1
|
-
Feature: berks shelf list
|
2
|
-
Scenario: With no cookbooks in the store
|
3
|
-
When I successfully run `berks shelf list`
|
4
|
-
Then the output should contain:
|
5
|
-
"""
|
6
|
-
There are no cookbooks in the Berkshelf shelf
|
7
|
-
"""
|
8
|
-
|
9
|
-
Scenario: With two cookbooks in the store
|
10
|
-
Given the cookbook store has the cookbooks:
|
11
|
-
| fake | 1.0.0 |
|
12
|
-
| ekaf | 2.3.4 |
|
13
|
-
When I successfully run `berks shelf list`
|
14
|
-
Then the output should contain:
|
15
|
-
"""
|
16
|
-
Cookbooks in the Berkshelf shelf:
|
17
|
-
* ekaf (2.3.4)
|
18
|
-
* fake (1.0.0)
|
19
|
-
"""
|
20
|
-
|
21
|
-
Scenario: With multiple cookbook versions installed
|
22
|
-
Given the cookbook store has the cookbooks:
|
23
|
-
| fake | 1.0.0 |
|
24
|
-
| fake | 1.1.0 |
|
25
|
-
| fake | 1.2.0 |
|
26
|
-
| fake | 2.0.0 |
|
27
|
-
When I successfully run `berks shelf list`
|
28
|
-
Then the output should contain:
|
29
|
-
"""
|
30
|
-
Cookbooks in the Berkshelf shelf:
|
31
|
-
* fake (1.0.0, 1.1.0, 1.2.0, 2.0.0)
|
32
|
-
"""
|
@@ -1,113 +0,0 @@
|
|
1
|
-
Feature: berks shelf show
|
2
|
-
Scenario: With a cookbook that is not in the store
|
3
|
-
When I run `berks shelf show fake`
|
4
|
-
Then the output should contain:
|
5
|
-
"""
|
6
|
-
Cookbook 'fake' not found in the Berkshelf shelf!
|
7
|
-
"""
|
8
|
-
And the exit status should be "CookbookNotFound"
|
9
|
-
|
10
|
-
Scenario: With cookbooks in the store
|
11
|
-
Given the cookbook store has the cookbooks:
|
12
|
-
| fake | 1.0.0 |
|
13
|
-
| ekaf | 2.3.4 |
|
14
|
-
When I successfully run `berks shelf show fake`
|
15
|
-
Then the output should contain:
|
16
|
-
"""
|
17
|
-
Displaying all versions of 'fake' in the Berkshelf shelf:
|
18
|
-
Name: fake
|
19
|
-
Version: 1.0.0
|
20
|
-
License: All rights reserved
|
21
|
-
"""
|
22
|
-
And the output should not contain:
|
23
|
-
"""
|
24
|
-
Name: ekaf
|
25
|
-
"""
|
26
|
-
|
27
|
-
Scenario: With cookbooks in the store and the --version option
|
28
|
-
Given the cookbook store has the cookbooks:
|
29
|
-
| fake | 1.0.0 |
|
30
|
-
| ekaf | 2.3.4 |
|
31
|
-
When I successfully run `berks shelf show fake --version 1.0.0`
|
32
|
-
Then the output should contain:
|
33
|
-
"""
|
34
|
-
Displaying 'fake' (1.0.0) in the Berkshelf shelf:
|
35
|
-
Name: fake
|
36
|
-
Version: 1.0.0
|
37
|
-
License: All rights reserved
|
38
|
-
"""
|
39
|
-
And the output should not contain:
|
40
|
-
"""
|
41
|
-
Name: ekaf
|
42
|
-
"""
|
43
|
-
|
44
|
-
Scenario: With cookbooks in the store and the --version option doesn't exist
|
45
|
-
Given the cookbook store has the cookbooks:
|
46
|
-
| fake | 1.0.0 |
|
47
|
-
| ekaf | 2.3.4 |
|
48
|
-
When I run `berks shelf show fake --version 1.2.3`
|
49
|
-
Then the output should contain:
|
50
|
-
"""
|
51
|
-
Cookbook 'fake' (1.2.3) not found in the Berkshelf shelf!
|
52
|
-
"""
|
53
|
-
And the exit status should be "CookbookNotFound"
|
54
|
-
|
55
|
-
Scenario: With multiple cookbook versions installed
|
56
|
-
Given the cookbook store has the cookbooks:
|
57
|
-
| fake | 1.0.0 |
|
58
|
-
| fake | 1.1.0 |
|
59
|
-
| fake | 1.2.0 |
|
60
|
-
| fake | 2.0.0 |
|
61
|
-
When I successfully run `berks shelf show fake`
|
62
|
-
Then the output should contain:
|
63
|
-
"""
|
64
|
-
Displaying all versions of 'fake' in the Berkshelf shelf:
|
65
|
-
Name: fake
|
66
|
-
Version: 1.0.0
|
67
|
-
License: All rights reserved
|
68
|
-
|
69
|
-
Name: fake
|
70
|
-
Version: 1.1.0
|
71
|
-
License: All rights reserved
|
72
|
-
|
73
|
-
Name: fake
|
74
|
-
Version: 1.2.0
|
75
|
-
License: All rights reserved
|
76
|
-
|
77
|
-
Name: fake
|
78
|
-
Version: 2.0.0
|
79
|
-
License: All rights reserved
|
80
|
-
"""
|
81
|
-
|
82
|
-
Scenario: With multiple cookbook versions installed and the --version flag
|
83
|
-
Given the cookbook store has the cookbooks:
|
84
|
-
| fake | 1.0.0 |
|
85
|
-
| fake | 1.1.0 |
|
86
|
-
| fake | 1.2.0 |
|
87
|
-
| fake | 2.0.0 |
|
88
|
-
When I successfully run `berks shelf show fake --version 1.0.0`
|
89
|
-
Then the output should contain:
|
90
|
-
"""
|
91
|
-
Displaying 'fake' (1.0.0) in the Berkshelf shelf:
|
92
|
-
Name: fake
|
93
|
-
Version: 1.0.0
|
94
|
-
License: All rights reserved
|
95
|
-
"""
|
96
|
-
And the output should not contain:
|
97
|
-
"""
|
98
|
-
Name: fake
|
99
|
-
Version: 1.1.0
|
100
|
-
License: All rights reserved
|
101
|
-
"""
|
102
|
-
And the output should not contain:
|
103
|
-
"""
|
104
|
-
Name: fake
|
105
|
-
Version: 1.2.0
|
106
|
-
License: All rights reserved
|
107
|
-
"""
|
108
|
-
And the output should not contain:
|
109
|
-
"""
|
110
|
-
Name: fake
|
111
|
-
Version: 2.0.0
|
112
|
-
License: All rights reserved
|
113
|
-
"""
|
@@ -1,96 +0,0 @@
|
|
1
|
-
Feature: berks shelf uninstall
|
2
|
-
Scenario: With no cookbooks in the store
|
3
|
-
When I run `berks shelf uninstall fake`
|
4
|
-
Then the output should contain:
|
5
|
-
"""
|
6
|
-
Cookbook 'fake' not found in the Berkshelf shelf!
|
7
|
-
"""
|
8
|
-
And the exit status should be "CookbookNotFound"
|
9
|
-
|
10
|
-
Scenario: With two cookbooks in the store
|
11
|
-
Given the cookbook store has the cookbooks:
|
12
|
-
| fake | 1.0.0 |
|
13
|
-
| ekaf | 2.3.4 |
|
14
|
-
When I successfully run `berks shelf uninstall fake`
|
15
|
-
Then the output should contain:
|
16
|
-
"""
|
17
|
-
Successfully uninstalled fake (1.0.0)
|
18
|
-
"""
|
19
|
-
And the cookbook store should not have the cookbooks:
|
20
|
-
| fake | 1.0.0 |
|
21
|
-
And the cookbook store should have the cookbooks:
|
22
|
-
| ekaf | 2.3.4 |
|
23
|
-
|
24
|
-
Scenario: With multiple cookbook versions installed
|
25
|
-
Given the cookbook store has the cookbooks:
|
26
|
-
| fake | 1.0.0 |
|
27
|
-
| fake | 1.1.0 |
|
28
|
-
| fake | 1.2.0 |
|
29
|
-
| fake | 2.0.0 |
|
30
|
-
When I successfully run `berks shelf uninstall fake`
|
31
|
-
Then the output should contain:
|
32
|
-
"""
|
33
|
-
Successfully uninstalled fake (1.0.0)
|
34
|
-
Successfully uninstalled fake (1.1.0)
|
35
|
-
Successfully uninstalled fake (1.2.0)
|
36
|
-
Successfully uninstalled fake (2.0.0)
|
37
|
-
"""
|
38
|
-
And the cookbook store should not have the cookbooks:
|
39
|
-
| fake | 1.0.0 |
|
40
|
-
| fake | 1.1.0 |
|
41
|
-
| fake | 1.2.0 |
|
42
|
-
| fake | 2.0.0 |
|
43
|
-
|
44
|
-
Scenario: When specifying a version
|
45
|
-
Given the cookbook store has the cookbooks:
|
46
|
-
| fake | 1.0.0 |
|
47
|
-
| fake | 1.1.0 |
|
48
|
-
| fake | 1.2.0 |
|
49
|
-
| fake | 2.0.0 |
|
50
|
-
When I successfully run `berks shelf uninstall fake --version 1.0.0`
|
51
|
-
Then the output should contain:
|
52
|
-
"""
|
53
|
-
Successfully uninstalled fake (1.0.0)
|
54
|
-
"""
|
55
|
-
And the cookbook store should not have the cookbooks:
|
56
|
-
| fake | 1.0.0 |
|
57
|
-
And the cookbook store should have the cookbooks:
|
58
|
-
| fake | 1.1.0 |
|
59
|
-
| fake | 1.2.0 |
|
60
|
-
| fake | 2.0.0 |
|
61
|
-
|
62
|
-
# FIXME: there seems to be a bug in aruba on windows related to
|
63
|
-
# interactive stuff that i fully don't understand
|
64
|
-
@spawn @not-windows
|
65
|
-
Scenario: With contingencies
|
66
|
-
Given the cookbook store contains a cookbook "fake" "1.0.0" with dependencies:
|
67
|
-
| ekaf | 2.3.4 |
|
68
|
-
And the cookbook store has the cookbooks:
|
69
|
-
| ekaf | 2.3.4 |
|
70
|
-
When I run `berks shelf uninstall ekaf` interactively
|
71
|
-
And I type "yes"
|
72
|
-
Then the output should contain:
|
73
|
-
"""
|
74
|
-
[fake (1.0.0)] depend on ekaf.
|
75
|
-
|
76
|
-
Are you sure you want to continue? (y/N)
|
77
|
-
"""
|
78
|
-
And the output should contain:
|
79
|
-
"""
|
80
|
-
Successfully uninstalled ekaf (2.3.4)
|
81
|
-
"""
|
82
|
-
And the cookbook store should not have the cookbooks:
|
83
|
-
| ekaf | 2.3.4 |
|
84
|
-
|
85
|
-
Scenario: With contingencies and the --force flag
|
86
|
-
Given the cookbook store contains a cookbook "fake" "1.0.0" with dependencies:
|
87
|
-
| ekaf | 2.3.4 |
|
88
|
-
And the cookbook store has the cookbooks:
|
89
|
-
| ekaf | 2.3.4 |
|
90
|
-
When I run `berks shelf uninstall ekaf --force`
|
91
|
-
Then the output should contain:
|
92
|
-
"""
|
93
|
-
Successfully uninstalled ekaf (2.3.4)
|
94
|
-
"""
|
95
|
-
And the cookbook store should not have the cookbooks:
|
96
|
-
| ekaf | 2.3.4 |
|