berkshelf 3.0.0.beta6 → 3.0.0.beta7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/features/berksfile.feature +2 -0
- data/features/commands/apply.feature +1 -1
- data/features/commands/contingent.feature +5 -3
- data/features/commands/install.feature +40 -40
- data/features/commands/list.feature +42 -20
- data/features/commands/outdated.feature +60 -16
- data/features/commands/show.feature +51 -8
- data/features/commands/update.feature +43 -15
- data/features/commands/upload.feature +4 -1
- data/features/commands/vendor.feature +27 -0
- data/features/json_formatter.feature +20 -8
- data/features/lockfile.feature +192 -71
- data/generator_files/CHANGELOG.md.erb +5 -0
- data/lib/berkshelf/berksfile.rb +166 -139
- data/lib/berkshelf/cli.rb +33 -30
- data/lib/berkshelf/cookbook_generator.rb +1 -0
- data/lib/berkshelf/dependency.rb +64 -14
- data/lib/berkshelf/downloader.rb +7 -10
- data/lib/berkshelf/errors.rb +59 -11
- data/lib/berkshelf/formatters/human_readable.rb +23 -36
- data/lib/berkshelf/formatters/json.rb +25 -29
- data/lib/berkshelf/installer.rb +111 -122
- data/lib/berkshelf/locations/git_location.rb +22 -9
- data/lib/berkshelf/locations/mercurial_location.rb +20 -5
- data/lib/berkshelf/locations/path_location.rb +22 -7
- data/lib/berkshelf/lockfile.rb +435 -203
- data/lib/berkshelf/resolver.rb +4 -2
- data/lib/berkshelf/source.rb +10 -1
- data/lib/berkshelf/version.rb +1 -1
- data/spec/fixtures/cookbooks/example_cookbook/Berksfile.lock +3 -4
- data/spec/fixtures/lockfiles/2.0.lock +17 -0
- data/spec/fixtures/lockfiles/blank.lock +0 -0
- data/spec/fixtures/lockfiles/default.lock +18 -10
- data/spec/fixtures/lockfiles/empty.lock +3 -0
- data/spec/unit/berkshelf/berksfile_spec.rb +31 -74
- data/spec/unit/berkshelf/cookbook_generator_spec.rb +4 -0
- data/spec/unit/berkshelf/installer_spec.rb +4 -7
- data/spec/unit/berkshelf/lockfile_parser_spec.rb +124 -0
- data/spec/unit/berkshelf/lockfile_spec.rb +140 -163
- metadata +11 -6
- data/features/licenses.feature +0 -79
- data/features/step_definitions/lockfile_steps.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: 093e4db16726fd19aa0f3851481f7f4223e8ddc5
|
4
|
+
data.tar.gz: 66efef230a148c0ac4a68db77a16722cce697b4c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7604553987f1fd224a37128cf05d189873f96bcc4d96f1c4cee0e2ee9a45beeb5eefe8095012adfb1696c429e559fd16a58946ed8232f5310a9da428f414f447
|
7
|
+
data.tar.gz: 62e0a0d8b2df6393da22d846e857389b1b4e003dcb1f1d60c84d1011e878bd8732277e1ba715f09f694c64e2380d95975f25265daf1edbe05ea0d26d8af70f2e
|
data/features/berksfile.feature
CHANGED
@@ -16,10 +16,11 @@ Feature: berks contingent
|
|
16
16
|
cookbook 'fake', '1.0.0'
|
17
17
|
cookbook 'ekaf', '1.0.0'
|
18
18
|
"""
|
19
|
+
And I run `berks install`
|
19
20
|
And I successfully run `berks contingent dep`
|
20
21
|
Then the output should contain:
|
21
22
|
"""
|
22
|
-
Cookbooks in this Berksfile contingent upon dep:
|
23
|
+
Cookbooks in this Berksfile contingent upon 'dep':
|
23
24
|
* ekaf (1.0.0)
|
24
25
|
* fake (1.0.0)
|
25
26
|
"""
|
@@ -31,10 +32,11 @@ Feature: berks contingent
|
|
31
32
|
"""
|
32
33
|
cookbook 'fake', '1.0.0'
|
33
34
|
"""
|
35
|
+
And I run `berks install`
|
34
36
|
And I successfully run `berks contingent dep`
|
35
37
|
Then the output should contain:
|
36
38
|
"""
|
37
|
-
There are no cookbooks contingent upon 'dep'
|
39
|
+
There are no cookbooks in this Berksfile contingent upon 'dep'.
|
38
40
|
"""
|
39
41
|
|
40
42
|
Scenario: When the cookbook is not in the Berksfile
|
@@ -42,5 +44,5 @@ Feature: berks contingent
|
|
42
44
|
And I successfully run `berks contingent dep`
|
43
45
|
Then the output should contain:
|
44
46
|
"""
|
45
|
-
There are no cookbooks contingent upon 'dep'
|
47
|
+
There are no cookbooks in this Berksfile contingent upon 'dep'.
|
46
48
|
"""
|
@@ -56,8 +56,8 @@ Feature: berks install
|
|
56
56
|
When I successfully run `berks install`
|
57
57
|
Then the output should contain:
|
58
58
|
"""
|
59
|
-
Installing
|
60
|
-
Installing
|
59
|
+
Installing elixir (1.0.0) from http://0.0.0.0:26210 ([chef_server] http://localhost:26310/)
|
60
|
+
Installing ruby (1.0.0) from http://0.0.0.0:26210 ([chef_server] http://localhost:26310/)
|
61
61
|
"""
|
62
62
|
And the cookbook store should have the cookbooks:
|
63
63
|
| ruby | 1.0.0 |
|
@@ -101,7 +101,7 @@ Feature: berks install
|
|
101
101
|
cookbook 'takeme', group: :take_me
|
102
102
|
cookbook 'notme', group: :not_me
|
103
103
|
"""
|
104
|
-
When I successfully run `berks
|
104
|
+
When I successfully run `berks install --only take_me not_me`
|
105
105
|
Then the output should contain "Using takeme (1.0.0)"
|
106
106
|
Then the output should contain "Using notme (1.0.0)"
|
107
107
|
|
@@ -114,7 +114,7 @@ Feature: berks install
|
|
114
114
|
cookbook 'takeme', group: :take_me
|
115
115
|
cookbook 'notme', group: :not_me
|
116
116
|
"""
|
117
|
-
When I successfully run `berks
|
117
|
+
When I successfully run `berks install --except not_me`
|
118
118
|
Then the output should contain "Using takeme (1.0.0)"
|
119
119
|
Then the output should not contain "Using notme (1.0.0)"
|
120
120
|
|
@@ -127,7 +127,7 @@ Feature: berks install
|
|
127
127
|
cookbook 'takeme', group: :take_me
|
128
128
|
cookbook 'notme', group: :not_me
|
129
129
|
"""
|
130
|
-
When I successfully run `berks
|
130
|
+
When I successfully run `berks install --except take_me not_me`
|
131
131
|
Then the output should not contain "Using takeme (1.0.0)"
|
132
132
|
Then the output should not contain "Using notme (1.0.0)"
|
133
133
|
|
@@ -140,7 +140,7 @@ Feature: berks install
|
|
140
140
|
When I successfully run `berks install`
|
141
141
|
Then the output should contain:
|
142
142
|
"""
|
143
|
-
Using example_cookbook (0.5.0)
|
143
|
+
Using example_cookbook (0.5.0) from source at ../../fixtures/cookbooks/example_cookbook-0.5.0
|
144
144
|
"""
|
145
145
|
|
146
146
|
Scenario: installing a demand from a path location with a conflicting constraint
|
@@ -165,12 +165,12 @@ Feature: berks install
|
|
165
165
|
When I successfully run `berks install`
|
166
166
|
Then the output should contain:
|
167
167
|
"""
|
168
|
-
Using example_cookbook (0.5.0)
|
168
|
+
Using example_cookbook (0.5.0) from source at ../../fixtures/cookbooks/example_cookbook-0.5.0
|
169
169
|
"""
|
170
170
|
|
171
171
|
Scenario: installing a demand from a path location locks the graph to that version
|
172
172
|
Given the Chef Server has cookbooks:
|
173
|
-
| example_cookbook | 1.0.0 | |
|
173
|
+
# | example_cookbook | 1.0.0 | |
|
174
174
|
| other_cookbook | 1.0.0 | example_cookbook ~> 1.0.0 |
|
175
175
|
And I have a Berksfile pointing at the local Berkshelf API with:
|
176
176
|
"""
|
@@ -192,7 +192,7 @@ Feature: berks install
|
|
192
192
|
When I successfully run `berks install -b subdirectory/Berksfile`
|
193
193
|
Then the output should contain:
|
194
194
|
"""
|
195
|
-
Using example_cookbook (0.5.0)
|
195
|
+
Using example_cookbook (0.5.0) from source at ../../../fixtures/cookbooks/example_cookbook-0.5.0
|
196
196
|
"""
|
197
197
|
|
198
198
|
Scenario: installing a demand from a Git location
|
@@ -205,9 +205,9 @@ Feature: berks install
|
|
205
205
|
| berkshelf-cookbook-fixture | 1.0.0 | a97b9447cbd41a5fe58eee2026e48ccb503bd3bc |
|
206
206
|
And the output should contain:
|
207
207
|
"""
|
208
|
-
Fetching 'berkshelf-cookbook-fixture' from git
|
209
|
-
|
210
|
-
Using berkshelf-cookbook-fixture (1.0.0)
|
208
|
+
Fetching 'berkshelf-cookbook-fixture' from git://github.com/RiotGames/berkshelf-cookbook-fixture.git (at master)
|
209
|
+
Fetching cookbook index from http://0.0.0.0:26210...
|
210
|
+
Using berkshelf-cookbook-fixture (1.0.0) from git://github.com/RiotGames/berkshelf-cookbook-fixture.git (at master)
|
211
211
|
"""
|
212
212
|
|
213
213
|
Scenario: installing a demand from a Git location that has already been installed
|
@@ -220,7 +220,7 @@ Feature: berks install
|
|
220
220
|
When I successfully run `berks install`
|
221
221
|
Then the output should contain:
|
222
222
|
"""
|
223
|
-
Using berkshelf-cookbook-fixture (1.0.0)
|
223
|
+
Using berkshelf-cookbook-fixture (1.0.0) from git://github.com/RiotGames/berkshelf-cookbook-fixture.git (at master)
|
224
224
|
"""
|
225
225
|
|
226
226
|
Scenario: installing a Berksfile that contains a Git location with a rel
|
@@ -233,9 +233,9 @@ Feature: berks install
|
|
233
233
|
| berkshelf-cookbook-fixture | 1.0.0 | 93f5768b7d14df45e10d16c8bf6fe98ba3ff809a |
|
234
234
|
And the output should contain:
|
235
235
|
"""
|
236
|
-
Fetching 'berkshelf-cookbook-fixture' from
|
237
|
-
|
238
|
-
Using berkshelf-cookbook-fixture (1.0.0)
|
236
|
+
Fetching 'berkshelf-cookbook-fixture' from git://github.com/RiotGames/berkshelf-cookbook-fixture.git (at rel/cookbooks/berkshelf-cookbook-fixture)
|
237
|
+
Fetching cookbook index from http://0.0.0.0:26210...
|
238
|
+
Using berkshelf-cookbook-fixture (1.0.0) from git://github.com/RiotGames/berkshelf-cookbook-fixture.git (at rel/cookbooks/berkshelf-cookbook-fixture)
|
239
239
|
"""
|
240
240
|
|
241
241
|
Scenario: installing a Berksfile that contains a Git location with a tag
|
@@ -248,9 +248,9 @@ Feature: berks install
|
|
248
248
|
| berkshelf-cookbook-fixture | 0.2.0 | 70a527e17d91f01f031204562460ad1c17f972ee |
|
249
249
|
And the output should contain:
|
250
250
|
"""
|
251
|
-
Fetching 'berkshelf-cookbook-fixture' from git
|
252
|
-
|
253
|
-
Using berkshelf-cookbook-fixture (0.2.0)
|
251
|
+
Fetching 'berkshelf-cookbook-fixture' from git://github.com/RiotGames/berkshelf-cookbook-fixture.git (at v0.2.0)
|
252
|
+
Fetching cookbook index from http://0.0.0.0:26210...
|
253
|
+
Using berkshelf-cookbook-fixture (0.2.0) from git://github.com/RiotGames/berkshelf-cookbook-fixture.git (at v0.2.0)
|
254
254
|
"""
|
255
255
|
|
256
256
|
Scenario: installing a Berksfile that contains a Git location with a ref
|
@@ -263,24 +263,24 @@ Feature: berks install
|
|
263
263
|
| berkshelf-cookbook-fixture | 0.2.0 | 70a527e17d91f01f031204562460ad1c17f972ee |
|
264
264
|
And the output should contain:
|
265
265
|
"""
|
266
|
-
Fetching 'berkshelf-cookbook-fixture' from git
|
267
|
-
|
268
|
-
Using berkshelf-cookbook-fixture (0.2.0)
|
266
|
+
Fetching 'berkshelf-cookbook-fixture' from git://github.com/RiotGames/berkshelf-cookbook-fixture.git (at 70a527e)
|
267
|
+
Fetching cookbook index from http://0.0.0.0:26210...
|
268
|
+
Using berkshelf-cookbook-fixture (0.2.0) from git://github.com/RiotGames/berkshelf-cookbook-fixture.git (at 70a527e)
|
269
269
|
"""
|
270
270
|
|
271
271
|
Scenario: installing a Berksfile that contains a Git location with an abbreviated ref
|
272
272
|
Given I have a Berksfile pointing at the local Berkshelf API with:
|
273
273
|
"""
|
274
|
-
cookbook "berkshelf-cookbook-fixture", git: "git://github.com/RiotGames/berkshelf-cookbook-fixture.git", ref: "
|
274
|
+
cookbook "berkshelf-cookbook-fixture", git: "git://github.com/RiotGames/berkshelf-cookbook-fixture.git", ref: "70a527e"
|
275
275
|
"""
|
276
276
|
When I successfully run `berks install`
|
277
277
|
Then the cookbook store should have the git cookbooks:
|
278
278
|
| berkshelf-cookbook-fixture | 0.2.0 | 70a527e17d91f01f031204562460ad1c17f972ee |
|
279
279
|
And the output should contain:
|
280
280
|
"""
|
281
|
-
Fetching 'berkshelf-cookbook-fixture' from git
|
282
|
-
|
283
|
-
Using berkshelf-cookbook-fixture (0.2.0)
|
281
|
+
Fetching 'berkshelf-cookbook-fixture' from git://github.com/RiotGames/berkshelf-cookbook-fixture.git (at 70a527e)
|
282
|
+
Fetching cookbook index from http://0.0.0.0:26210...
|
283
|
+
Using berkshelf-cookbook-fixture (0.2.0) from git://github.com/RiotGames/berkshelf-cookbook-fixture.git (at 70a527e)
|
284
284
|
"""
|
285
285
|
|
286
286
|
Scenario: installing a Berksfile that contains a GitHub location
|
@@ -293,9 +293,9 @@ Feature: berks install
|
|
293
293
|
| berkshelf-cookbook-fixture | 0.2.0 | 70a527e17d91f01f031204562460ad1c17f972ee |
|
294
294
|
And the output should contain:
|
295
295
|
"""
|
296
|
-
Fetching 'berkshelf-cookbook-fixture' from
|
297
|
-
|
298
|
-
Using berkshelf-cookbook-fixture (0.2.0)
|
296
|
+
Fetching 'berkshelf-cookbook-fixture' from git://github.com/RiotGames/berkshelf-cookbook-fixture.git (at v0.2.0)
|
297
|
+
Fetching cookbook index from http://0.0.0.0:26210...
|
298
|
+
Using berkshelf-cookbook-fixture (0.2.0) from git://github.com/RiotGames/berkshelf-cookbook-fixture.git (at v0.2.0)
|
299
299
|
"""
|
300
300
|
|
301
301
|
Scenario: installing a Berksfile that contains a GitHub location ending in .git
|
@@ -320,9 +320,9 @@ Feature: berks install
|
|
320
320
|
| berkshelf-cookbook-fixture | 0.2.0 | 70a527e17d91f01f031204562460ad1c17f972ee |
|
321
321
|
And the output should contain:
|
322
322
|
"""
|
323
|
-
Fetching 'berkshelf-cookbook-fixture' from
|
324
|
-
|
325
|
-
Using berkshelf-cookbook-fixture (0.2.0)
|
323
|
+
Fetching 'berkshelf-cookbook-fixture' from git://github.com/RiotGames/berkshelf-cookbook-fixture.git (at v0.2.0)
|
324
|
+
Fetching cookbook index from http://0.0.0.0:26210...
|
325
|
+
Using berkshelf-cookbook-fixture (0.2.0) from git://github.com/RiotGames/berkshelf-cookbook-fixture.git (at v0.2.0)
|
326
326
|
"""
|
327
327
|
|
328
328
|
Scenario: installing a Berksfile that contains a Github location and protocol https
|
@@ -335,9 +335,9 @@ Feature: berks install
|
|
335
335
|
| berkshelf-cookbook-fixture | 0.2.0 | 70a527e17d91f01f031204562460ad1c17f972ee |
|
336
336
|
And the output should contain:
|
337
337
|
"""
|
338
|
-
Fetching 'berkshelf-cookbook-fixture' from
|
339
|
-
|
340
|
-
Using berkshelf-cookbook-fixture (0.2.0)
|
338
|
+
Fetching 'berkshelf-cookbook-fixture' from https://github.com/RiotGames/berkshelf-cookbook-fixture.git (at v0.2.0)
|
339
|
+
Fetching cookbook index from http://0.0.0.0:26210...
|
340
|
+
Using berkshelf-cookbook-fixture (0.2.0) from https://github.com/RiotGames/berkshelf-cookbook-fixture.git (at v0.2.0)
|
341
341
|
"""
|
342
342
|
|
343
343
|
# GitHub doesn't permit anonymous SSH access, so we are going to get a
|
@@ -471,7 +471,7 @@ Feature: berks install
|
|
471
471
|
When I run `berks install`
|
472
472
|
Then the output should contain:
|
473
473
|
"""
|
474
|
-
Fetching 'berkshelf-cookbook-fixture' from git
|
474
|
+
Fetching 'berkshelf-cookbook-fixture' from git://github.com/RiotGames/berkshelf-cookbook-fixture.git (at v0.2.0)
|
475
475
|
The cookbook downloaded for berkshelf-cookbook-fixture (= 1.0.0) did not satisfy the constraint.
|
476
476
|
"""
|
477
477
|
And the exit status should be "CookbookValidationFailure"
|
@@ -486,9 +486,9 @@ Feature: berks install
|
|
486
486
|
When I successfully run `berks install`
|
487
487
|
Then the output should contain:
|
488
488
|
"""
|
489
|
-
Fetching 'berkshelf-cookbook-fixture' from git
|
490
|
-
|
491
|
-
Using berkshelf-cookbook-fixture (1.0.0)
|
489
|
+
Fetching 'berkshelf-cookbook-fixture' from git://github.com/RiotGames/berkshelf-cookbook-fixture.git (at v1.0.0)
|
490
|
+
Fetching cookbook index from http://0.0.0.0:26210...
|
491
|
+
Using berkshelf-cookbook-fixture (1.0.0) from git://github.com/RiotGames/berkshelf-cookbook-fixture.git (at v1.0.0)
|
492
492
|
"""
|
493
493
|
|
494
494
|
Scenario: with a cookbook definition containing an invalid option
|
@@ -512,7 +512,7 @@ Feature: berks install
|
|
512
512
|
When I run `berks install`
|
513
513
|
Then the output should contain:
|
514
514
|
"""
|
515
|
-
Fetching 'doesntexist' from git
|
515
|
+
Fetching 'doesntexist' from git://github.com/asdjhfkljashflkjashfakljsf (at master)
|
516
516
|
An error occurred during Git execution:
|
517
517
|
"""
|
518
518
|
And the exit status should be "GitError"
|
@@ -1,5 +1,5 @@
|
|
1
1
|
Feature: berks list
|
2
|
-
Scenario:
|
2
|
+
Scenario: When everything is good
|
3
3
|
Given the cookbook store has the cookbooks:
|
4
4
|
| fake1 | 1.0.0 |
|
5
5
|
| fake2 | 1.0.1 |
|
@@ -8,9 +8,16 @@ Feature: berks list
|
|
8
8
|
cookbook 'fake1', '1.0.0'
|
9
9
|
cookbook 'fake2', '1.0.1'
|
10
10
|
"""
|
11
|
-
And
|
12
|
-
|
13
|
-
|
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
|
+
"""
|
14
21
|
When I successfully run `berks list`
|
15
22
|
Then the output should contain:
|
16
23
|
"""
|
@@ -19,38 +26,53 @@ Feature: berks list
|
|
19
26
|
* fake2 (1.0.1)
|
20
27
|
"""
|
21
28
|
|
22
|
-
Scenario:
|
23
|
-
|
29
|
+
Scenario: When the lockfile is not present
|
30
|
+
Given I have a Berksfile pointing at the local Berkshelf API with:
|
24
31
|
"""
|
25
32
|
cookbook 'fake', '1.0.0'
|
26
33
|
"""
|
27
|
-
And the Lockfile has:
|
28
|
-
| fake | 1.0.0 |
|
29
34
|
When I run `berks list`
|
30
35
|
Then the output should contain:
|
31
36
|
"""
|
32
|
-
|
37
|
+
Lockfile not found! Run `berks install` to create the lockfile.
|
33
38
|
"""
|
34
|
-
And the exit status should be "
|
39
|
+
And the exit status should be "LockfileNotFound"
|
35
40
|
|
36
|
-
Scenario:
|
37
|
-
Given
|
38
|
-
| fake | 1.0.0 |
|
39
|
-
And I have a Berksfile pointing at the local Berkshelf API with:
|
41
|
+
Scenario: When a dependency is not in the lockfile
|
42
|
+
Given I have a Berksfile pointing at the local Berkshelf API with:
|
40
43
|
"""
|
41
44
|
cookbook 'fake', '1.0.0'
|
42
45
|
"""
|
46
|
+
And I write to "Berksfile.lock" with:
|
47
|
+
"""
|
48
|
+
DEPENDENCIES
|
49
|
+
|
50
|
+
GRAPH
|
51
|
+
not_fake (1.0.0)
|
52
|
+
"""
|
43
53
|
When I run `berks list`
|
44
54
|
Then the output should contain:
|
45
55
|
"""
|
46
|
-
|
56
|
+
The lockfile is out of sync! Run `berks install` to sync the lockfile.
|
47
57
|
"""
|
48
|
-
And the exit status should be "
|
58
|
+
And the exit status should be "LockfileOutOfSync"
|
49
59
|
|
50
|
-
Scenario:
|
51
|
-
Given I have a Berksfile pointing at the local Berkshelf API
|
52
|
-
|
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`
|
53
74
|
Then the output should contain:
|
54
75
|
"""
|
55
|
-
|
76
|
+
The cookbook 'fake (1.0.0)' is not installed. Please run `berks install` to download and install the missing dependency.
|
56
77
|
"""
|
78
|
+
And the exit status should be "DependencyNotInstalled"
|
@@ -10,8 +10,15 @@ Feature: berks outdated
|
|
10
10
|
"""
|
11
11
|
cookbook 'bacon', '~> 1.1.0'
|
12
12
|
"""
|
13
|
-
And
|
14
|
-
|
13
|
+
And I write to "Berksfile.lock" with:
|
14
|
+
"""
|
15
|
+
DEPENDENCIES
|
16
|
+
bacon (~> 1.1.0)
|
17
|
+
|
18
|
+
GRAPH
|
19
|
+
bacon (1.1.0)
|
20
|
+
"""
|
21
|
+
|
15
22
|
When I successfully run `berks outdated`
|
16
23
|
Then the output should contain:
|
17
24
|
"""
|
@@ -29,8 +36,14 @@ Feature: berks outdated
|
|
29
36
|
"""
|
30
37
|
cookbook 'bacon'
|
31
38
|
"""
|
32
|
-
And
|
33
|
-
|
39
|
+
And I write to "Berksfile.lock" with:
|
40
|
+
"""
|
41
|
+
DEPENDENCIES
|
42
|
+
bacon
|
43
|
+
|
44
|
+
GRAPH
|
45
|
+
bacon (1.0.0)
|
46
|
+
"""
|
34
47
|
When I successfully run `berks outdated`
|
35
48
|
Then the output should contain:
|
36
49
|
"""
|
@@ -50,8 +63,14 @@ Feature: berks outdated
|
|
50
63
|
"""
|
51
64
|
cookbook 'bacon', '~> 1.0'
|
52
65
|
"""
|
53
|
-
And
|
54
|
-
|
66
|
+
And I write to "Berksfile.lock" with:
|
67
|
+
"""
|
68
|
+
DEPENDENCIES
|
69
|
+
bacon (~> 1.0)
|
70
|
+
|
71
|
+
GRAPH
|
72
|
+
bacon (1.0.0)
|
73
|
+
"""
|
55
74
|
When I successfully run `berks outdated`
|
56
75
|
Then the output should contain:
|
57
76
|
"""
|
@@ -59,28 +78,53 @@ Feature: berks outdated
|
|
59
78
|
* bacon (1.5.8)
|
60
79
|
"""
|
61
80
|
|
62
|
-
Scenario: When
|
63
|
-
|
81
|
+
Scenario: When the lockfile is not present
|
82
|
+
Given I have a Berksfile pointing at the local Berkshelf API with:
|
64
83
|
"""
|
65
84
|
cookbook 'bacon', '1.0.0'
|
66
85
|
"""
|
67
86
|
When I run `berks outdated`
|
68
87
|
Then the output should contain:
|
69
88
|
"""
|
70
|
-
|
89
|
+
Lockfile not found! Run `berks install` to create the lockfile.
|
71
90
|
"""
|
72
|
-
And the exit status should be "
|
91
|
+
And the exit status should be "LockfileNotFound"
|
73
92
|
|
74
|
-
Scenario: When
|
75
|
-
|
93
|
+
Scenario: When a dependency is not in the lockfile
|
94
|
+
Given I have a Berksfile pointing at the local Berkshelf API with:
|
76
95
|
"""
|
77
96
|
cookbook 'bacon', '1.0.0'
|
78
97
|
"""
|
79
|
-
And
|
80
|
-
|
98
|
+
And I write to "Berksfile.lock" with:
|
99
|
+
"""
|
100
|
+
DEPENDENCIES
|
101
|
+
|
102
|
+
GRAPH
|
103
|
+
not_fake (1.0.0)
|
104
|
+
"""
|
105
|
+
When I run `berks outdated`
|
106
|
+
Then the output should contain:
|
107
|
+
"""
|
108
|
+
The lockfile is out of sync! Run `berks install` to sync the lockfile.
|
109
|
+
"""
|
110
|
+
And the exit status should be "LockfileOutOfSync"
|
111
|
+
|
112
|
+
Scenario: When a dependency is not installed
|
113
|
+
Given I have a Berksfile pointing at the local Berkshelf API with:
|
114
|
+
"""
|
115
|
+
cookbook 'bacon', '1.0.0'
|
116
|
+
"""
|
117
|
+
And I write to "Berksfile.lock" with:
|
118
|
+
"""
|
119
|
+
DEPENDENCIES
|
120
|
+
bacon (= 1.0.0)
|
121
|
+
|
122
|
+
GRAPH
|
123
|
+
bacon (1.0.0)
|
124
|
+
"""
|
81
125
|
When I run `berks outdated`
|
82
126
|
Then the output should contain:
|
83
127
|
"""
|
84
|
-
|
128
|
+
The cookbook 'bacon (1.0.0)' is not installed. Please run `berks install` to download and install the missing dependency.
|
85
129
|
"""
|
86
|
-
And the exit status should be "
|
130
|
+
And the exit status should be "DependencyNotInstalled"
|