berkshelf 7.0.7 → 7.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +1 -1
  3. data/berkshelf.gemspec +8 -9
  4. data/bin/berks +5 -0
  5. data/lib/berkshelf/cached_cookbook.rb +1 -1
  6. data/lib/berkshelf/chef_config_compat.rb +1 -0
  7. data/lib/berkshelf/chef_repo_universe.rb +2 -2
  8. data/lib/berkshelf/formatters/json.rb +3 -3
  9. data/lib/berkshelf/lockfile.rb +3 -3
  10. data/lib/berkshelf/uploader.rb +3 -3
  11. data/lib/berkshelf/version.rb +1 -1
  12. metadata +32 -186
  13. data/.github/lock.yml +0 -1
  14. data/.gitignore +0 -30
  15. data/.rubocop.yml +0 -12
  16. data/.travis.yml +0 -73
  17. data/CHANGELOG.legacy.md +0 -307
  18. data/CHANGELOG.md +0 -1589
  19. data/CONTRIBUTING.md +0 -68
  20. data/Gemfile.lock +0 -292
  21. data/PLUGINS.md +0 -25
  22. data/README.md +0 -72
  23. data/Thorfile +0 -61
  24. data/appveyor.yml +0 -31
  25. data/docs/berkshelf_for_newcomers.md +0 -64
  26. data/features/artifactory.feature +0 -70
  27. data/features/berksfile.feature +0 -46
  28. data/features/commands/apply.feature +0 -41
  29. data/features/commands/contingent.feature +0 -47
  30. data/features/commands/info.feature +0 -141
  31. data/features/commands/install.feature +0 -646
  32. data/features/commands/list.feature +0 -78
  33. data/features/commands/outdated.feature +0 -176
  34. data/features/commands/package.feature +0 -17
  35. data/features/commands/search.feature +0 -17
  36. data/features/commands/shelf/list.feature +0 -32
  37. data/features/commands/shelf/show.feature +0 -113
  38. data/features/commands/shelf/uninstall.feature +0 -96
  39. data/features/commands/show.feature +0 -83
  40. data/features/commands/update.feature +0 -142
  41. data/features/commands/upload.feature +0 -499
  42. data/features/commands/vendor.feature +0 -154
  43. data/features/commands/verify.feature +0 -29
  44. data/features/commands/viz.feature +0 -66
  45. data/features/community_site.feature +0 -37
  46. data/features/help.feature +0 -11
  47. data/features/json_formatter.feature +0 -158
  48. data/features/lifecycle.feature +0 -378
  49. data/features/lockfile.feature +0 -378
  50. data/features/step_definitions/berksfile_steps.rb +0 -54
  51. data/features/step_definitions/chef/config_steps.rb +0 -12
  52. data/features/step_definitions/chef_server_steps.rb +0 -60
  53. data/features/step_definitions/cli_steps.rb +0 -18
  54. data/features/step_definitions/config_steps.rb +0 -46
  55. data/features/step_definitions/environment_steps.rb +0 -11
  56. data/features/step_definitions/filesystem_steps.rb +0 -286
  57. data/features/step_definitions/gem_steps.rb +0 -13
  58. data/features/step_definitions/json_steps.rb +0 -29
  59. data/features/step_definitions/utility_steps.rb +0 -11
  60. data/features/support/aruba.rb +0 -12
  61. data/features/support/env.rb +0 -77
  62. data/spec/fixtures/cookbooks/example_cookbook/.gitignore +0 -2
  63. data/spec/fixtures/cookbooks/example_cookbook/.kitchen.yml +0 -26
@@ -1,154 +0,0 @@
1
- Feature: Vendoring cookbooks to a directory
2
- Background:
3
- * the Chef Server has cookbooks:
4
- | fake | 1.0.0 |
5
- | ekaf | 2.0.0 |
6
-
7
- Scenario: successfully vendoring a Berksfile with multiple cookbook demands
8
- Given I have a Berksfile pointing at the local Berkshelf API with:
9
- """
10
- cookbook 'fake'
11
- cookbook 'ekaf'
12
- """
13
- When I successfully run `berks vendor cukebooks`
14
- Then the directory "cukebooks/fake" should contain version "1.0.0" of the "fake" cookbook
15
- And the directory "cukebooks/ekaf" should contain version "2.0.0" of the "ekaf" cookbook
16
-
17
- Scenario: attempting to vendor when no Berksfile is present
18
- When I run `berks vendor cukebooks`
19
- Then the exit status should be "BerksfileNotFound"
20
-
21
- Scenario: vendoring a Berksfile with a metadata demand
22
- Given a cookbook named "fake"
23
- And I cd to "fake"
24
- And I have a Berksfile pointing at the local Berkshelf API with:
25
- """
26
- metadata
27
- """
28
- When I successfully run `berks vendor cukebooks`
29
- Then the directory "cukebooks/fake" should contain version "0.0.0" of the "fake" cookbook
30
-
31
- Scenario: vendoring a cookbook with transitive dependencies
32
- Given I have a Berksfile pointing at the local Berkshelf API with:
33
- """
34
- metadata
35
- """
36
- And I write to "metadata.rb" with:
37
- """
38
- name 'bacon'
39
- version '1.0.0'
40
-
41
- depends 'fake'
42
- depends 'ekaf'
43
- """
44
- When I successfully run `berks vendor vendor`
45
- Then the directory "vendor/bacon" should contain version "1.0.0" of the "bacon" cookbook
46
- And the directory "vendor/fake" should contain version "1.0.0" of the "fake" cookbook
47
- And the directory "vendor/ekaf" should contain version "2.0.0" of the "ekaf" cookbook
48
-
49
- Scenario: vendoring a cookbook with transitive dependencies when a lockfile is present
50
- Given a cookbook named "bacon"
51
- And the cookbook "bacon" has the file "metadata.rb" with:
52
- """
53
- name 'bacon'
54
- version '1.0.0'
55
-
56
- depends 'fake'
57
- depends 'ekaf'
58
- """
59
- And I have a Berksfile pointing at the local Berkshelf API with:
60
- """
61
- cookbook 'bacon', path: './bacon'
62
- """
63
- And I write to "Berksfile.lock" with:
64
- """
65
- DEPENDENCIES
66
- bacon
67
- path: ./bacon
68
-
69
- GRAPH
70
- bacon (1.0.0)
71
- ekaf (>= 0.0.0)
72
- fake (>= 0.0.0)
73
- ekaf (2.0.0)
74
- fake (1.0.0)
75
- """
76
- When I successfully run `berks vendor vendor`
77
- Then the directory "vendor/bacon" should contain version "1.0.0" of the "bacon" cookbook
78
- And the directory "vendor/fake" should contain version "1.0.0" of the "fake" cookbook
79
- And the directory "vendor/ekaf" should contain version "2.0.0" of the "ekaf" cookbook
80
-
81
- Scenario: vendoring without an explicit path to vendor into
82
- Given I have a Berksfile pointing at the local Berkshelf API with:
83
- """
84
- cookbook 'fake'
85
- """
86
- When I successfully run `berks vendor`
87
- Then the directory "berks-cookbooks/fake" should contain version "1.0.0" of the "fake" cookbook
88
-
89
- Scenario: vendoring to a directory that already exists
90
- Given I have a Berksfile pointing at the local Berkshelf API with:
91
- """
92
- cookbook 'fake'
93
- """
94
- And a directory named "cukebooks"
95
- And a directory named "cukebooks/fake/ponies"
96
- And a directory named "cukebooks/existing_cookbook"
97
- When I successfully run `berks vendor --delete cukebooks`
98
- Then the directory "cukebooks/fake" should contain version "1.0.0" of the "fake" cookbook
99
- And a directory named "cukebooks/fake/ponies" should not exist
100
- And a directory named "cukebooks/existing_cookbook" should not exist
101
-
102
- Scenario: vendoring into a nested directory
103
- Given I have a Berksfile pointing at the local Berkshelf API with:
104
- """
105
- cookbook 'fake'
106
- """
107
- When I successfully run `berks vendor path/to/cukebooks`
108
- Then the directory "path/to/cukebooks/fake" should contain version "1.0.0" of the "fake" cookbook
109
-
110
- Scenario: vendoring a cookbook with chefignores
111
- Given a cookbook named "bacon"
112
- And the cookbook "bacon" has the file "metadata.rb" with:
113
- """
114
- name 'bacon'
115
- version '1.0.0'
116
- """
117
- And I have a Berksfile pointing at the local Berkshelf API with:
118
- """
119
- cookbook 'bacon', path: './bacon'
120
- """
121
- And the cookbook "bacon" has the file "chefignore" with:
122
- """
123
- *.turd
124
- """
125
- And the cookbook "bacon" has the file "foo.turd" with:
126
- """
127
- poop
128
- """
129
- And the cookbook "bacon" has the file "recipes/foo.turd" with:
130
- """
131
- poop
132
- """
133
- When I successfully run `berks vendor vendor`
134
- Then the directory "vendor/bacon" should contain version "1.0.0" of the "bacon" cookbook
135
- And a file named "vendor/bacon/foo.turd" should not exist
136
- And a file named "vendor/bacon/recipes/foo.turd" should not exist
137
-
138
- Scenario: metadata.json / metadata.rb handling when vendoring a cookbook
139
- Given a cookbook named "bacon"
140
- And the cookbook "bacon" has the file "metadata.rb" with:
141
- """
142
- name 'bacon'
143
- version '1.0.0'
144
- """
145
- And I have a Berksfile pointing at the local Berkshelf API with:
146
- """
147
- cookbook 'bacon', path: './bacon'
148
- """
149
- When I successfully run `berks vendor vendor`
150
- Then the directory "vendor/bacon" should contain version "1.0.0" of the "bacon" cookbook
151
- And a file named "vendor/bacon/metadata.json" should exist
152
- And a file named "vendor/bacon/metadata.rb" should exist
153
- And a file named "bacon/metadata.rb" should exist
154
- And a file named "bacon/metadata.json" should not exist
@@ -1,29 +0,0 @@
1
- Feature: berks verify
2
- Scenario: running verify when there is no Lockfile present
3
- Given a cookbook named "sparkle_motion"
4
- And I cd to "sparkle_motion"
5
- And I have a Berksfile pointing at the local Berkshelf API with:
6
- """
7
- metadata
8
- """
9
- And I run `berks verify`
10
- Then the output should contain:
11
- """
12
- Lockfile not found! Run `berks install` to create the lockfile.
13
- """
14
- And the exit status should be "LockfileNotFound"
15
-
16
- Scenario: running verify when there is a valid Lockfile present
17
- Given a cookbook named "sparkle_motion"
18
- And I cd to "sparkle_motion"
19
- And I have a Berksfile pointing at the local Berkshelf API with:
20
- """
21
- metadata
22
- """
23
- When I successfully run `berks install`
24
- And I successfully run `berks verify`
25
- Then the output should contain:
26
- """
27
- Verifying (1) cookbook(s)...
28
- Verified.
29
- """
@@ -1,66 +0,0 @@
1
- @graphviz @not-windows
2
- Feature: berks viz
3
- Scenario: With no options
4
- * I have a Berksfile pointing at the local Berkshelf API with:
5
- """
6
- cookbook 'fake', '1.0.0'
7
- """
8
- * I write to "Berksfile.lock" with:
9
- """
10
- DEPENDENCIES
11
- fake (= 1.0.0)
12
-
13
- GRAPH
14
- fake (1.0.0)
15
- """
16
- * I successfully run `berks viz`
17
- * a file named "graph.png" should exist
18
-
19
- Scenario: When there are transitive dependencies
20
- * I have a Berksfile pointing at the local Berkshelf API with:
21
- """
22
- cookbook 'fake', '1.0.0'
23
- """
24
- * I write to "Berksfile.lock" with:
25
- """
26
- DEPENDENCIES
27
- fake (= 1.0.0)
28
-
29
- GRAPH
30
- dep (1.0.0)
31
- fake (1.0.0)
32
- dep (~> 1.0.0)
33
- """
34
- * I successfully run `berks viz`
35
- * a file named "graph.png" should exist
36
-
37
- Scenario: When a custom output is given
38
- * I have a Berksfile pointing at the local Berkshelf API with:
39
- """
40
- cookbook 'fake', '1.0.0'
41
- """
42
- * I write to "Berksfile.lock" with:
43
- """
44
- DEPENDENCIES
45
- fake (= 1.0.0)
46
-
47
- GRAPH
48
- dep (1.0.0)
49
- fake (1.0.0)
50
- dep (~> 1.0.0)
51
- """
52
- * I successfully run `berks viz --outfile ponies.png`
53
- * a file named "graph.png" should not exist
54
- * a file named "ponies.png" should exist
55
-
56
- Scenario: When there is no lockfile present
57
- * I have a Berksfile pointing at the local Berkshelf API with:
58
- """
59
- cookbook 'fake', '1.0.0'
60
- """
61
- * I run `berks viz`
62
- * the output should contain:
63
- """
64
- Lockfile not found! Run `berks install` to create the lockfile.
65
- """
66
- * the exit status should be "LockfileNotFound"
@@ -1,37 +0,0 @@
1
- Feature: Installing cookbooks from the community site
2
- Scenario: when the cookbook exists
3
- Given I have a Berksfile pointing at the community API endpoint with:
4
- """
5
- cookbook 'apache2', '1.6.6'
6
- """
7
- When I successfully run `berks install`
8
- Then the output should contain:
9
- """
10
- Installing apache2 (1.6.6)
11
- """
12
- And the cookbook store should have the cookbooks:
13
- | apache2 | 1.6.6 |
14
-
15
- Scenario: when the cookbook does not exist
16
- Given I have a Berksfile pointing at the community API endpoint with:
17
- """
18
- cookbook '1234567890'
19
- """
20
- When I run `berks install`
21
- Then the output should contain:
22
- """
23
- Unable to find a solution for demands: 1234567890 (>= 0.0.0)
24
- """
25
- And the exit status should be "NoSolutionError"
26
-
27
- Scenario: when the cookbook exists, but the version does not
28
- Given I have a Berksfile pointing at the community API endpoint with:
29
- """
30
- cookbook 'apache2', '0.0.0'
31
- """
32
- When I run `berks install`
33
- Then the output should contain:
34
- """
35
- Unable to find a solution for demands: apache2 (= 0.0.0)
36
- """
37
- And the exit status should be "NoSolutionError"
@@ -1,11 +0,0 @@
1
- Feature: Appending -h or --help to a command
2
- Scenario Outline: Using various help switches
3
- Then the output from `<actual>` should be the same as `<expected>`
4
- Examples:
5
- | actual | expected |
6
- | berks --help | berks help |
7
- | berks -h | berks help |
8
- | berks cookbook --help | berks help cookbook |
9
- | berks cookbook -h | berks help cookbook |
10
- | berks shelf --help | berks shelf help |
11
- | berks shelf -h | berks shelf help |
@@ -1,158 +0,0 @@
1
- Feature: --format json
2
- Background:
3
- * the Chef Server is empty
4
- * the cookbook store is empty
5
-
6
- Scenario: JSON output installing a cookbook from the default location
7
- Given I have a Berksfile pointing at the local Berkshelf API with:
8
- """
9
- cookbook 'berkshelf', '1.0.0'
10
- """
11
- And the Chef Server has cookbooks:
12
- | berkshelf | 1.0.0 |
13
- When I successfully run `berks install --format json`
14
- Then the output should contain JSON:
15
- """
16
- {
17
- "cookbooks": [
18
- {
19
- "api_source": "http://127.0.0.1:26310",
20
- "location_path": "http://127.0.0.1:26310/cookbooks/berkshelf/1.0.0",
21
- "version": "1.0.0",
22
- "name": "berkshelf"
23
- }
24
- ],
25
- "errors": [],
26
- "messages": [
27
- "Resolving cookbook dependencies...",
28
- "Fetching cookbook index from http://127.0.0.1:26310..."
29
- ],
30
- "warnings": []
31
- }
32
- """
33
-
34
- Scenario: JSON output installing a cookbook we already have
35
- Given the cookbook store has the cookbooks:
36
- | berkshelf-cookbook-fixture | 1.0.0 |
37
- And I have a Berksfile pointing at the local Berkshelf API with:
38
- """
39
- cookbook 'berkshelf-cookbook-fixture', '1.0.0'
40
- """
41
- When I successfully run `berks install --format json`
42
- Then the output should contain JSON:
43
- """
44
- {
45
- "cookbooks": [
46
- {
47
- "name": "berkshelf-cookbook-fixture",
48
- "version": "1.0.0"
49
- }
50
- ],
51
- "errors": [],
52
- "messages": [
53
- "Resolving cookbook dependencies...",
54
- "Fetching cookbook index from http://127.0.0.1:26310..."
55
- ],
56
- "warnings": []
57
- }
58
- """
59
-
60
- Scenario: JSON output when running the show command
61
- Given the cookbook store has the cookbooks:
62
- | fake | 1.0.0 |
63
- And I have a Berksfile pointing at the local Berkshelf API with:
64
- """
65
- cookbook 'fake', '1.0.0'
66
- """
67
- And I write to "Berksfile.lock" with:
68
- """
69
- DEPENDENCIES
70
- fake (= 1.0.0)
71
-
72
- GRAPH
73
- fake (1.0.0)
74
- """
75
- When I successfully run `berks show fake --format json`
76
- Then the output should contain JSON:
77
- """
78
- {
79
- "cookbooks": [
80
- {
81
- "name": "fake",
82
- "path": "<%= Berkshelf.cookbook_store.storage_path.join('fake-1.0.0') %>"
83
- }
84
- ],
85
- "errors": [],
86
- "messages": [],
87
- "warnings": []
88
- }
89
- """
90
-
91
- Scenario: JSON output when running the upload command
92
- Given I have a Berksfile pointing at the local Berkshelf API with:
93
- """
94
- cookbook 'example_cookbook', path: '../../spec/fixtures/cookbooks/example_cookbook-0.5.0'
95
- """
96
- And I write to "Berksfile.lock" with:
97
- """
98
- DEPENDENCIES
99
- example_cookbook
100
- path: ../../spec/fixtures/cookbooks/example_cookbook-0.5.0
101
-
102
- GRAPH
103
- example_cookbook (0.5.0)
104
- """
105
- When I successfully run `berks upload --format json`
106
- Then the output should contain JSON:
107
- """
108
- {
109
- "cookbooks": [
110
- {
111
- "name": "example_cookbook",
112
- "version": "0.5.0",
113
- "uploaded_to": "http://localhost:26310"
114
- }
115
- ],
116
- "errors": [],
117
- "messages": [],
118
- "warnings": []
119
- }
120
- """
121
-
122
- Scenario: JSON output when running the outdated command
123
- Given the cookbook store has the cookbooks:
124
- | seth | 0.1.0 |
125
- And the Chef Server has cookbooks:
126
- | seth | 0.1.0 |
127
- | seth | 0.2.9 |
128
- | seth | 1.0.0 |
129
- And I have a Berksfile pointing at the local Berkshelf API with:
130
- """
131
- cookbook 'seth', '~> 0.1'
132
- """
133
- And I write to "Berksfile.lock" with:
134
- """
135
- DEPENDENCIES
136
- seth (~> 0.1)
137
-
138
- GRAPH
139
- seth (0.1.0)
140
- """
141
- And I successfully run `berks outdated --format json`
142
- Then the output should contain JSON:
143
- """
144
- {
145
- "cookbooks": [
146
- {
147
- "local": "0.1.0",
148
- "remote": {
149
- "http://127.0.0.1:26310": "0.2.9"
150
- },
151
- "name": "seth"
152
- }
153
- ],
154
- "errors": [],
155
- "messages": [],
156
- "warnings": []
157
- }
158
- """