berkshelf 3.0.0.beta4 → 3.0.0.beta5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/CHANGELOG.md +6 -0
- data/README.md +3 -0
- data/berkshelf-complete.sh +10 -3
- data/berkshelf.gemspec +12 -11
- data/features/berksfile.feature +0 -2
- data/features/commands/apply.feature +0 -1
- data/features/commands/contingent.feature +0 -3
- data/features/commands/cookbook.feature +0 -3
- data/features/commands/init.feature +0 -2
- data/features/commands/install.feature +42 -35
- data/features/commands/list.feature +0 -3
- data/features/commands/outdated.feature +0 -4
- data/features/commands/package.feature +2 -39
- data/features/commands/shelf/list.feature +0 -2
- data/features/commands/shelf/show.feature +0 -5
- data/features/commands/shelf/uninstall.feature +0 -5
- data/features/commands/show.feature +0 -3
- data/features/commands/update.feature +0 -3
- data/features/commands/upload.feature +0 -13
- data/features/commands/vendor.feature +0 -5
- data/features/community_site.feature +0 -2
- data/features/config.feature +0 -6
- data/features/json_formatter.feature +0 -5
- data/features/licenses.feature +0 -5
- data/features/lockfile.feature +0 -20
- data/features/step_definitions/chef_server_steps.rb +8 -2
- data/generator_files/Gemfile.erb +2 -2
- data/lib/berkshelf.rb +0 -4
- data/lib/berkshelf/berksfile.rb +21 -51
- data/lib/berkshelf/cli.rb +26 -15
- data/lib/berkshelf/config.rb +4 -0
- data/lib/berkshelf/cookbook_generator.rb +1 -1
- data/lib/berkshelf/cookbook_store.rb +8 -0
- data/lib/berkshelf/core_ext/file.rb +2 -2
- data/lib/berkshelf/core_ext/pathname.rb +5 -7
- data/lib/berkshelf/dependency.rb +8 -1
- data/lib/berkshelf/downloader.rb +37 -0
- data/lib/berkshelf/errors.rb +1 -0
- data/lib/berkshelf/formatters.rb +1 -0
- data/lib/berkshelf/formatters/human_readable.rb +23 -9
- data/lib/berkshelf/formatters/json.rb +7 -9
- data/lib/berkshelf/git.rb +0 -1
- data/lib/berkshelf/init_generator.rb +1 -1
- data/lib/berkshelf/installer.rb +43 -19
- data/lib/berkshelf/location.rb +8 -13
- data/lib/berkshelf/locations/git_location.rb +12 -19
- data/lib/berkshelf/locations/mercurial_location.rb +5 -18
- data/lib/berkshelf/locations/path_location.rb +7 -0
- data/lib/berkshelf/lockfile.rb +5 -1
- data/lib/berkshelf/packager.rb +73 -0
- data/lib/berkshelf/resolver.rb +7 -5
- data/lib/berkshelf/resolver/graph.rb +7 -0
- data/lib/berkshelf/source.rb +22 -2
- data/lib/berkshelf/ui.rb +0 -2
- data/lib/berkshelf/version.rb +1 -1
- data/spec/support/git.rb +1 -0
- data/spec/support/mercurial.rb +37 -36
- data/spec/unit/berkshelf/berksfile_spec.rb +2 -34
- data/spec/unit/berkshelf/cli_spec.rb +3 -2
- data/spec/unit/berkshelf/config_spec.rb +3 -3
- data/spec/unit/berkshelf/core_ext/pathname_spec.rb +46 -0
- data/spec/unit/berkshelf/dependency_spec.rb +3 -3
- data/spec/unit/berkshelf/formatters_spec.rb +4 -4
- data/spec/unit/berkshelf/git_spec.rb +8 -8
- data/spec/unit/berkshelf/installer_spec.rb +2 -2
- data/spec/unit/berkshelf/locations/git_location_spec.rb +2 -8
- data/spec/unit/berkshelf/locations/mercurial_location_spec.rb +4 -23
- data/spec/unit/berkshelf/lockfile_spec.rb +1 -1
- data/spec/unit/berkshelf/mercurial_spec.rb +6 -7
- data/spec/unit/berkshelf/packager_spec.rb +39 -0
- data/spec/unit/berkshelf/ui_spec.rb +2 -2
- data/spec/unit/berkshelf_spec.rb +2 -2
- metadata +37 -24
- data/lib/berkshelf/api_client.rb +0 -65
- data/lib/berkshelf/api_client/remote_cookbook.rb +0 -55
- data/spec/unit/berkshelf/api_client/remote_cookbook_spec.rb +0 -23
- data/spec/unit/berkshelf/api_client_spec.rb +0 -57
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e37e8eecf2ea601ce8f02e4fc32215b06ed4ceda
|
4
|
+
data.tar.gz: 7e238e5027504c01ab07589d4fc3c0d6ec20c139
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c855db2e9a912fd332981d56f47042b89f3441778a54515d424b8d31f1f494a17241f0cd840e5c30babf4cf4de5040043411223093c80bee810b0e2105d475e
|
7
|
+
data.tar.gz: b557045737932cd43d1c1869ef35bb25a399afbcad2bcdbb6790c5ffe3247baa7ec983094c8c108c9237a787b4db92bced96964ef4b9c11b8069a7bc2c46a575
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -2,10 +2,16 @@
|
|
2
2
|
|
3
3
|
* Enhancements
|
4
4
|
* New "universe" resolver which communicates with an API server to resolve constraint graphs faster and more reliably
|
5
|
+
* `berks vendor` will now compile cookbook metadata into the cookbook's vendored directory. The raw metadata will not be included in the vendored cookbook to ensure that Chef Client doesn't (wrongly) prioritize the raw metadata over compiled metadata
|
6
|
+
* `berks vendor` now includes the Berksfile.lock alongside the vendored contents
|
7
|
+
* `berks package` will now simply archive the output of `berks vendor`
|
5
8
|
|
6
9
|
* Bug Fixes
|
7
10
|
* Raw metadata will be compiled into metadata.json during vendor process
|
8
11
|
|
12
|
+
* Backwards incompatible changes
|
13
|
+
* `berks package` has had it's argument and options list updated. The first argument is now the name, or fulle path, of the archive file that will be generated. As with before, the first argument is not required.
|
14
|
+
|
9
15
|
# 2.0.10
|
10
16
|
|
11
17
|
* Huge performance increase when resolving a Berksfile when the Berkshelf contains a lot of cookbooks
|
data/README.md
CHANGED
@@ -7,6 +7,9 @@ Manage a Cookbook or an Application's Cookbook dependencies
|
|
7
7
|
|
8
8
|
Installation
|
9
9
|
------------
|
10
|
+
|
11
|
+
**WARNING:** It is advised at this time that you [use Berkshelf 3](https://github.com/berkshelf/berkshelf/wiki/Howto:-Use-the-bleeding-edge). Berkshelf 2 is no longer being actively developed and has a number of significant issues related to dependency resolution that Berkshelf 3 fixes.
|
12
|
+
|
10
13
|
Add Berkshelf to your repository's `Gemfile`:
|
11
14
|
|
12
15
|
```ruby
|
data/berkshelf-complete.sh
CHANGED
@@ -32,12 +32,19 @@ _berkshelf_commands() {
|
|
32
32
|
}
|
33
33
|
|
34
34
|
_berkshelf_cookbooks() {
|
35
|
-
|
36
|
-
|
35
|
+
local file=${BERKSHELF_BERKSFILE:-Berksfile}
|
36
|
+
if [ -e $file ]; then
|
37
|
+
# strip all quotes from cookbook name and remove trailing comma, if any
|
38
|
+
grep -w '^cookbook' $file \
|
39
|
+
| awk '{ print $2 }' \
|
40
|
+
| sed 's/"//g' \
|
41
|
+
| sed "s/'//g" \
|
42
|
+
| sed 's/,$//'
|
43
|
+
fi
|
37
44
|
}
|
38
45
|
|
39
46
|
_local_cookbooks() {
|
40
|
-
ls -d cookbooks/*/ | cut -d "/" -f 2
|
47
|
+
[ -d cookbooks ] && ls -d cookbooks/*/ | cut -d "/" -f 2
|
41
48
|
}
|
42
49
|
|
43
50
|
_berkshelf() {
|
data/berkshelf.gemspec
CHANGED
@@ -30,17 +30,18 @@ Gem::Specification.new do |s|
|
|
30
30
|
s.required_ruby_version = '>= 1.9.2'
|
31
31
|
s.required_rubygems_version = '>= 1.8.0'
|
32
32
|
|
33
|
-
s.add_dependency 'addressable',
|
34
|
-
s.add_dependency '
|
35
|
-
s.add_dependency 'buff-
|
36
|
-
s.add_dependency 'buff-
|
37
|
-
s.add_dependency '
|
38
|
-
s.add_dependency '
|
39
|
-
s.add_dependency 'minitar',
|
40
|
-
s.add_dependency 'retryable',
|
41
|
-
s.add_dependency 'ridley',
|
42
|
-
s.add_dependency 'solve',
|
43
|
-
s.add_dependency 'thor',
|
33
|
+
s.add_dependency 'addressable', '~> 2.3.4'
|
34
|
+
s.add_dependency 'berkshelf-api-client', '~> 1.1'
|
35
|
+
s.add_dependency 'buff-config', '~> 0.2'
|
36
|
+
s.add_dependency 'buff-extensions', '~> 0.4'
|
37
|
+
s.add_dependency 'buff-shell_out', '~> 0.1'
|
38
|
+
s.add_dependency 'faraday', '~> 0.8.5'
|
39
|
+
s.add_dependency 'minitar', '~> 0.5.4'
|
40
|
+
s.add_dependency 'retryable', '~> 1.3.3'
|
41
|
+
s.add_dependency 'ridley', '~> 2.3'
|
42
|
+
s.add_dependency 'solve', '>= 0.8.0'
|
43
|
+
s.add_dependency 'thor', '~> 0.18.0'
|
44
|
+
s.add_dependency 'octokit', '~> 2.6'
|
44
45
|
|
45
46
|
s.add_development_dependency 'aruba', '~> 0.5'
|
46
47
|
s.add_development_dependency 'chef-zero', '~> 1.5.0'
|
data/features/berksfile.feature
CHANGED
@@ -15,7 +15,6 @@ Feature: Evaluating a Berksfile
|
|
15
15
|
If you don't got bacon...
|
16
16
|
"""
|
17
17
|
|
18
|
-
|
19
18
|
Scenario: Containing methods I shouldn't be able to call
|
20
19
|
Given I write to "Berksfile" with:
|
21
20
|
"""
|
@@ -30,7 +29,6 @@ Feature: Evaluating a Berksfile
|
|
30
29
|
"""
|
31
30
|
And the exit status should be "BerksfileReadError"
|
32
31
|
|
33
|
-
|
34
32
|
Scenario: Containing Ruby syntax errors
|
35
33
|
Given I write to "Berksfile" with:
|
36
34
|
"""
|
@@ -16,7 +16,6 @@ Feature: berks apply
|
|
16
16
|
| fake | = 1.0.0 |
|
17
17
|
| dependency | = 2.0.0 |
|
18
18
|
|
19
|
-
|
20
19
|
Scenario: Locking cookbook versions to a non-existent Chef Environment
|
21
20
|
Given the Chef Server does not have an environment named "my_env"
|
22
21
|
And the cookbook store has the cookbooks:
|
@@ -4,7 +4,6 @@ Feature: berks contingent
|
|
4
4
|
* the Chef Server is empty
|
5
5
|
* the cookbook store is empty
|
6
6
|
|
7
|
-
|
8
7
|
Scenario: When there are dependent cookbooks
|
9
8
|
Given the cookbook store has the cookbooks:
|
10
9
|
| dep | 1.0.0 |
|
@@ -25,7 +24,6 @@ Feature: berks contingent
|
|
25
24
|
* fake (1.0.0)
|
26
25
|
"""
|
27
26
|
|
28
|
-
|
29
27
|
Scenario: When there are no dependent cookbooks
|
30
28
|
Given the cookbook store has the cookbooks:
|
31
29
|
| fake | 1.0.0 |
|
@@ -39,7 +37,6 @@ Feature: berks contingent
|
|
39
37
|
There are no cookbooks contingent upon 'dep' defined in this Berksfile
|
40
38
|
"""
|
41
39
|
|
42
|
-
|
43
40
|
Scenario: When the cookbook is not in the Berksfile
|
44
41
|
Given I have a Berksfile pointing at the local Berkshelf API
|
45
42
|
And I successfully run `berks contingent dep`
|
@@ -3,7 +3,6 @@ Feature: berks cookbook
|
|
3
3
|
When I successfully run `berks cookbook sparkle_motion`
|
4
4
|
Then I should have a new cookbook skeleton "sparkle_motion"
|
5
5
|
|
6
|
-
|
7
6
|
Scenario Outline: With various options
|
8
7
|
When I successfully run `berks cookbook sparkle_motion --<option>`
|
9
8
|
Then I should have a new cookbook skeleton "sparkle_motion" with <feature> support
|
@@ -19,7 +18,6 @@ Feature: berks cookbook
|
|
19
18
|
| skip-vagrant | no Vagrant |
|
20
19
|
| skip-test-kitchen | no Test Kitchen |
|
21
20
|
|
22
|
-
|
23
21
|
Scenario Outline: When a required supporting gem is not installed
|
24
22
|
Given the gem "<gem>" is not installed
|
25
23
|
When I successfully run `berks cookbook sparkle_motion --<option>`
|
@@ -30,7 +28,6 @@ Feature: berks cookbook
|
|
30
28
|
| foodcritic | Foodcritic | foodcritic |
|
31
29
|
| scmversion | SCMVersion | thor-scmversion |
|
32
30
|
|
33
|
-
|
34
31
|
Scenario: When bundler is not installed
|
35
32
|
Given the gem "bundler" is not installed
|
36
33
|
When I successfully run `berks cookbook sparkle_motion`
|
@@ -11,13 +11,11 @@ Feature: berks init
|
|
11
11
|
"""
|
12
12
|
And the output should contain "Successfully initialized"
|
13
13
|
|
14
|
-
|
15
14
|
Scenario: initializing a path that does not contain a cookbook
|
16
15
|
Given a directory named "not_a_cookbook"
|
17
16
|
When I run `berks init not_a_cookbook`
|
18
17
|
And the exit status should be "NotACookbook"
|
19
18
|
|
20
|
-
|
21
19
|
Scenario: initializing with no value given for target
|
22
20
|
Given I write to "metadata.rb" with:
|
23
21
|
"""
|
@@ -4,7 +4,6 @@ Feature: berks install
|
|
4
4
|
* the Chef Server is empty
|
5
5
|
* the cookbook store is empty
|
6
6
|
|
7
|
-
|
8
7
|
Scenario: installing the version that best satisfies our demand
|
9
8
|
Given I have a Berksfile pointing at the local Berkshelf API with:
|
10
9
|
"""
|
@@ -22,7 +21,6 @@ Feature: berks install
|
|
22
21
|
And the cookbook store should have the cookbooks:
|
23
22
|
| berkshelf | 2.0.0 |
|
24
23
|
|
25
|
-
|
26
24
|
Scenario: installing an explicit version demand
|
27
25
|
Given I have a Berksfile pointing at the local Berkshelf API with:
|
28
26
|
"""
|
@@ -40,7 +38,6 @@ Feature: berks install
|
|
40
38
|
And the cookbook store should have the cookbooks:
|
41
39
|
| berkshelf | 1.0.0 |
|
42
40
|
|
43
|
-
|
44
41
|
Scenario: installing demands from all groups
|
45
42
|
Given I have a Berksfile pointing at the local Berkshelf API with:
|
46
43
|
"""
|
@@ -59,14 +56,13 @@ Feature: berks install
|
|
59
56
|
When I successfully run `berks install`
|
60
57
|
Then the output should contain:
|
61
58
|
"""
|
62
|
-
Installing ruby (1.0.0) from http://
|
63
|
-
Installing elixir (1.0.0) from http://
|
59
|
+
Installing ruby (1.0.0) from [api: http://0.0.0.0:26210] ([chef_server] http://localhost:26310/)
|
60
|
+
Installing elixir (1.0.0) from [api: http://0.0.0.0:26210] ([chef_server] http://localhost:26310/)
|
64
61
|
"""
|
65
62
|
And the cookbook store should have the cookbooks:
|
66
63
|
| ruby | 1.0.0 |
|
67
64
|
| elixir | 1.0.0 |
|
68
65
|
|
69
|
-
|
70
66
|
Scenario: installing a demand that has already been installed
|
71
67
|
Given I have a Berksfile pointing at the local Berkshelf API with:
|
72
68
|
"""
|
@@ -83,7 +79,6 @@ Feature: berks install
|
|
83
79
|
Using hostsfile (1.0.1)
|
84
80
|
"""
|
85
81
|
|
86
|
-
|
87
82
|
Scenario: installing a single groups of demands with the --only flag
|
88
83
|
Given the cookbook store has the cookbooks:
|
89
84
|
| takeme | 1.0.0 |
|
@@ -97,7 +92,6 @@ Feature: berks install
|
|
97
92
|
Then the output should contain "Using takeme (1.0.0)"
|
98
93
|
Then the output should not contain "Using notme (1.0.0)"
|
99
94
|
|
100
|
-
|
101
95
|
Scenario: installing multiple groups of demands with the --only flag
|
102
96
|
Given the cookbook store has the cookbooks:
|
103
97
|
| takeme | 1.0.0 |
|
@@ -111,7 +105,6 @@ Feature: berks install
|
|
111
105
|
Then the output should contain "Using takeme (1.0.0)"
|
112
106
|
Then the output should contain "Using notme (1.0.0)"
|
113
107
|
|
114
|
-
|
115
108
|
Scenario: skipping a single group to install with the --except flag
|
116
109
|
Given the cookbook store has the cookbooks:
|
117
110
|
| takeme | 1.0.0 |
|
@@ -125,7 +118,6 @@ Feature: berks install
|
|
125
118
|
Then the output should contain "Using takeme (1.0.0)"
|
126
119
|
Then the output should not contain "Using notme (1.0.0)"
|
127
120
|
|
128
|
-
|
129
121
|
Scenario: skipping multiple groups to install with the --except flag
|
130
122
|
Given the cookbook store has the cookbooks:
|
131
123
|
| takeme | 1.0.0 |
|
@@ -139,7 +131,6 @@ Feature: berks install
|
|
139
131
|
Then the output should not contain "Using takeme (1.0.0)"
|
140
132
|
Then the output should not contain "Using notme (1.0.0)"
|
141
133
|
|
142
|
-
|
143
134
|
Scenario: installing a demand from a path location
|
144
135
|
Given I have a Berksfile pointing at the local Berkshelf API with:
|
145
136
|
"""
|
@@ -152,6 +143,46 @@ Feature: berks install
|
|
152
143
|
Using example_cookbook (0.5.0) path: '
|
153
144
|
"""
|
154
145
|
|
146
|
+
Scenario: installing a demand from a path location with a conflicting constraint
|
147
|
+
Given I have a Berksfile pointing at the local Berkshelf API with:
|
148
|
+
"""
|
149
|
+
cookbook 'example_cookbook', '~> 1.0.0', path: '../../fixtures/cookbooks/example_cookbook-0.5.0'
|
150
|
+
"""
|
151
|
+
When I run `berks install`
|
152
|
+
Then the output should contain:
|
153
|
+
"""
|
154
|
+
The cookbook downloaded for example_cookbook (~> 1.0.0) did not satisfy the constraint.
|
155
|
+
"""
|
156
|
+
|
157
|
+
Scenario: installing a demand from a path location that also exists in other locations with conflicting dependencies
|
158
|
+
Given the Chef Server has cookbooks:
|
159
|
+
| example_cookbook | 0.5.0 | missing_cookbook >= 1.0.0 |
|
160
|
+
And I have a Berksfile pointing at the local Berkshelf API with:
|
161
|
+
"""
|
162
|
+
cookbook 'example_cookbook', path: '../../fixtures/cookbooks/example_cookbook-0.5.0'
|
163
|
+
"""
|
164
|
+
And the Berkshelf API server's cache is up to date
|
165
|
+
When I successfully run `berks install`
|
166
|
+
Then the output should contain:
|
167
|
+
"""
|
168
|
+
Using example_cookbook (0.5.0) path: '
|
169
|
+
"""
|
170
|
+
|
171
|
+
Scenario: installing a demand from a path location locks the graph to that version
|
172
|
+
Given the Chef Server has cookbooks:
|
173
|
+
| example_cookbook | 1.0.0 | |
|
174
|
+
| other_cookbook | 1.0.0 | example_cookbook ~> 1.0.0 |
|
175
|
+
And I have a Berksfile pointing at the local Berkshelf API with:
|
176
|
+
"""
|
177
|
+
cookbook 'example_cookbook', path: '../../fixtures/cookbooks/example_cookbook-0.5.0'
|
178
|
+
cookbook 'other_cookbook'
|
179
|
+
"""
|
180
|
+
And the Berkshelf API server's cache is up to date
|
181
|
+
When I run `berks install`
|
182
|
+
Then the output should contain:
|
183
|
+
"""
|
184
|
+
Unable to find a solution for demands: example_cookbook (0.5.0), other_cookbook (>= 0.0.0)
|
185
|
+
"""
|
155
186
|
|
156
187
|
Scenario: installing a Berksfile from a remote directory that contains a path location
|
157
188
|
Given I have a Berksfile at "subdirectory" pointing at the local Berkshelf API with:
|
@@ -164,7 +195,6 @@ Feature: berks install
|
|
164
195
|
Using example_cookbook (0.5.0) path: '
|
165
196
|
"""
|
166
197
|
|
167
|
-
|
168
198
|
Scenario: installing a demand from a Git location
|
169
199
|
Given I have a Berksfile pointing at the local Berkshelf API with:
|
170
200
|
"""
|
@@ -180,7 +210,6 @@ Feature: berks install
|
|
180
210
|
Using berkshelf-cookbook-fixture (1.0.0) git: 'git://github.com/RiotGames/berkshelf-cookbook-fixture.git' with branch: 'master'
|
181
211
|
"""
|
182
212
|
|
183
|
-
|
184
213
|
Scenario: installing a demand from a Git location that has already been installed
|
185
214
|
Given I have a Berksfile pointing at the local Berkshelf API with:
|
186
215
|
"""
|
@@ -194,7 +223,6 @@ Feature: berks install
|
|
194
223
|
Using berkshelf-cookbook-fixture (1.0.0) git: 'git://github.com/RiotGames/berkshelf-cookbook-fixture.git' with branch: 'master'
|
195
224
|
"""
|
196
225
|
|
197
|
-
|
198
226
|
Scenario: installing a Berksfile that contains a Git location with a rel
|
199
227
|
Given I have a Berksfile pointing at the local Berkshelf API with:
|
200
228
|
"""
|
@@ -210,7 +238,6 @@ Feature: berks install
|
|
210
238
|
Using berkshelf-cookbook-fixture (1.0.0) github: 'git://github.com/RiotGames/berkshelf-cookbook-fixture.git' with branch: 'rel' at ref: '93f5768b7d14df45e10d16c8bf6fe98ba3ff809a'
|
211
239
|
"""
|
212
240
|
|
213
|
-
|
214
241
|
Scenario: installing a Berksfile that contains a Git location with a tag
|
215
242
|
Given I have a Berksfile pointing at the local Berkshelf API with:
|
216
243
|
"""
|
@@ -226,7 +253,6 @@ Feature: berks install
|
|
226
253
|
Using berkshelf-cookbook-fixture (0.2.0) git: 'git://github.com/RiotGames/berkshelf-cookbook-fixture.git' with branch: 'v0.2.0' at ref: '70a527e17d91f01f031204562460ad1c17f972ee'
|
227
254
|
"""
|
228
255
|
|
229
|
-
|
230
256
|
Scenario: installing a Berksfile that contains a Git location with a ref
|
231
257
|
Given I have a Berksfile pointing at the local Berkshelf API with:
|
232
258
|
"""
|
@@ -242,7 +268,6 @@ Feature: berks install
|
|
242
268
|
Using berkshelf-cookbook-fixture (0.2.0) git: 'git://github.com/RiotGames/berkshelf-cookbook-fixture.git' with ref: '70a527e17d91f01f031204562460ad1c17f972ee'
|
243
269
|
"""
|
244
270
|
|
245
|
-
|
246
271
|
Scenario: installing a Berksfile that contains a Git location with an abbreviated ref
|
247
272
|
Given I have a Berksfile pointing at the local Berkshelf API with:
|
248
273
|
"""
|
@@ -273,7 +298,6 @@ Feature: berks install
|
|
273
298
|
Using berkshelf-cookbook-fixture (0.2.0) github: 'git://github.com/RiotGames/berkshelf-cookbook-fixture.git' with branch: 'v0.2.0' at ref: '70a527e17d91f01f031204562460ad1c17f972ee'
|
274
299
|
"""
|
275
300
|
|
276
|
-
|
277
301
|
Scenario: installing a Berksfile that contains a GitHub location ending in .git
|
278
302
|
Given I have a Berksfile pointing at the local Berkshelf API with:
|
279
303
|
"""
|
@@ -286,7 +310,6 @@ Feature: berks install
|
|
286
310
|
"""
|
287
311
|
And the exit status should be "InvalidGitHubIdentifier"
|
288
312
|
|
289
|
-
|
290
313
|
Scenario: installing a Berksfile that contains a Github location and protocol git
|
291
314
|
Given I have a Berksfile pointing at the local Berkshelf API with:
|
292
315
|
"""
|
@@ -302,7 +325,6 @@ Feature: berks install
|
|
302
325
|
Using berkshelf-cookbook-fixture (0.2.0) github: 'git://github.com/RiotGames/berkshelf-cookbook-fixture.git' with branch: 'v0.2.0' at ref: '70a527e17d91f01f031204562460ad1c17f972ee'
|
303
326
|
"""
|
304
327
|
|
305
|
-
|
306
328
|
Scenario: installing a Berksfile that contains a Github location and protocol https
|
307
329
|
Given I have a Berksfile pointing at the local Berkshelf API with:
|
308
330
|
"""
|
@@ -318,7 +340,6 @@ Feature: berks install
|
|
318
340
|
Using berkshelf-cookbook-fixture (0.2.0) github: 'https://github.com/RiotGames/berkshelf-cookbook-fixture.git' with branch: 'v0.2.0' at ref: '70a527e17d91f01f031204562460ad1c17f972ee'
|
319
341
|
"""
|
320
342
|
|
321
|
-
|
322
343
|
# GitHub doesn't permit anonymous SSH access, so we are going to get a
|
323
344
|
# failure message back. That's okay, if GitHub tells us our key was denied,
|
324
345
|
# we know the connection has made it that far.
|
@@ -333,7 +354,6 @@ Feature: berks install
|
|
333
354
|
Permission denied (publickey).
|
334
355
|
"""
|
335
356
|
|
336
|
-
|
337
357
|
Scenario: installing a Berksfile that contains a Github location and an unsupported protocol
|
338
358
|
Given I have a Berksfile pointing at the local Berkshelf API with:
|
339
359
|
"""
|
@@ -346,7 +366,6 @@ Feature: berks install
|
|
346
366
|
"""
|
347
367
|
And the exit status should be "InvalidGitURI"
|
348
368
|
|
349
|
-
|
350
369
|
Scenario: running install when current project is a cookbook and the 'metadata' is specified
|
351
370
|
Given a cookbook named "sparkle_motion"
|
352
371
|
And I cd to "sparkle_motion"
|
@@ -360,7 +379,6 @@ Feature: berks install
|
|
360
379
|
Using sparkle_motion (0.0.0)
|
361
380
|
"""
|
362
381
|
|
363
|
-
|
364
382
|
Scenario: running install when current project is a cookbook and the 'metadata' is specified with a path
|
365
383
|
Given a cookbook named "fake"
|
366
384
|
And I have a Berksfile pointing at the local Berkshelf API with:
|
@@ -373,7 +391,6 @@ Feature: berks install
|
|
373
391
|
Using fake (0.0.0)
|
374
392
|
"""
|
375
393
|
|
376
|
-
|
377
394
|
Scenario: running install when a Berksfile.lock is present
|
378
395
|
Given the Chef Server has cookbooks:
|
379
396
|
| bacon | 0.1.0 |
|
@@ -400,7 +417,6 @@ Feature: berks install
|
|
400
417
|
Installing bacon (0.2.0)
|
401
418
|
"""
|
402
419
|
|
403
|
-
|
404
420
|
Scenario: running install with no Berksfile or Berksfile.lock
|
405
421
|
When I run `berks install`
|
406
422
|
Then the output should contain:
|
@@ -409,7 +425,6 @@ Feature: berks install
|
|
409
425
|
"""
|
410
426
|
And the exit status should be "BerksfileNotFound"
|
411
427
|
|
412
|
-
|
413
428
|
Scenario: running install when the Cookbook is not found on the remote site
|
414
429
|
Given I have a Berksfile pointing at the local Berkshelf API with:
|
415
430
|
"""
|
@@ -423,7 +438,6 @@ Feature: berks install
|
|
423
438
|
"""
|
424
439
|
And the exit status should be "NoSolutionError"
|
425
440
|
|
426
|
-
|
427
441
|
Scenario: installing a Berksfile that has a Git location source with an invalid Git URI
|
428
442
|
Given I have a Berksfile pointing at the local Berkshelf API with:
|
429
443
|
"""
|
@@ -436,7 +450,6 @@ Feature: berks install
|
|
436
450
|
"""
|
437
451
|
And the exit status should be "InvalidGitURI"
|
438
452
|
|
439
|
-
|
440
453
|
Scenario: installing when there are sources with duplicate names defined in the same group
|
441
454
|
Given I have a Berksfile pointing at the local Berkshelf API with:
|
442
455
|
"""
|
@@ -450,7 +463,6 @@ Feature: berks install
|
|
450
463
|
"""
|
451
464
|
And the exit status should be "DuplicateDependencyDefined"
|
452
465
|
|
453
|
-
|
454
466
|
Scenario: when a Git demand points to a branch that does not satisfy the version constraint
|
455
467
|
Given I have a Berksfile pointing at the local Berkshelf API with:
|
456
468
|
"""
|
@@ -464,7 +476,6 @@ Feature: berks install
|
|
464
476
|
"""
|
465
477
|
And the exit status should be "CookbookValidationFailure"
|
466
478
|
|
467
|
-
|
468
479
|
Scenario: when a Git demand is defined and a cookbook of the same name and version is already in the cookbook store
|
469
480
|
Given I have a Berksfile pointing at the local Berkshelf API with:
|
470
481
|
"""
|
@@ -480,7 +491,6 @@ Feature: berks install
|
|
480
491
|
Using berkshelf-cookbook-fixture (1.0.0) git: 'git://github.com/RiotGames/berkshelf-cookbook-fixture.git' with branch: 'v1.0.0' at ref: 'b4f968c9001ad8de30f564a2107fab9cfa91f771'
|
481
492
|
"""
|
482
493
|
|
483
|
-
|
484
494
|
Scenario: with a cookbook definition containing an invalid option
|
485
495
|
Given I have a Berksfile pointing at the local Berkshelf API with:
|
486
496
|
"""
|
@@ -493,7 +503,6 @@ Feature: berks install
|
|
493
503
|
"""
|
494
504
|
And the exit status should be "InternalError"
|
495
505
|
|
496
|
-
|
497
506
|
Scenario: with a git error during download
|
498
507
|
Given I have a Berksfile pointing at the local Berkshelf API with:
|
499
508
|
"""
|
@@ -508,7 +517,6 @@ Feature: berks install
|
|
508
517
|
"""
|
509
518
|
And the exit status should be "GitError"
|
510
519
|
|
511
|
-
|
512
520
|
Scenario: transitive dependencies in metadata
|
513
521
|
Given the cookbook store contains a cookbook "fake" "1.0.0" with dependencies:
|
514
522
|
| bacon | >= 0.0.0 |
|
@@ -534,7 +542,6 @@ Feature: berks install
|
|
534
542
|
Installing bacon (0.2.0)
|
535
543
|
"""
|
536
544
|
|
537
|
-
|
538
545
|
Scenario: transitive dependencies in metadata when cookbooks are downloaded
|
539
546
|
Given the cookbook store contains a cookbook "fake" "1.0.0" with dependencies:
|
540
547
|
| bacon | >= 0.0.0 |
|