berkshelf 3.0.0.beta3 → 3.0.0.beta4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/.travis.yml +1 -0
- data/CHANGELOG.md +12 -2
- data/CONTRIBUTING.md +53 -53
- data/Gemfile +1 -1
- data/Guardfile +12 -6
- data/PLUGINS.md +2 -2
- data/README.md +7 -11
- data/berkshelf.gemspec +1 -1
- data/features/commands/apply.feature +15 -4
- data/features/commands/cookbook.feature +1 -1
- data/features/commands/install.feature +85 -15
- data/features/commands/list.feature +35 -2
- data/features/commands/outdated.feature +3 -3
- data/features/commands/package.feature +1 -0
- data/features/commands/show.feature +3 -3
- data/features/commands/update.feature +1 -0
- data/features/commands/upload.feature +28 -4
- data/features/json_formatter.feature +2 -0
- data/features/lockfile.feature +1 -0
- data/features/support/env.rb +8 -4
- data/generator_files/Gemfile.erb +9 -0
- data/generator_files/README.md.erb +15 -33
- data/generator_files/Vagrantfile.erb +6 -3
- data/lib/berkshelf.rb +32 -2
- data/lib/berkshelf/berksfile.rb +59 -83
- data/lib/berkshelf/cli.rb +15 -67
- data/lib/berkshelf/community_rest.rb +18 -2
- data/lib/berkshelf/dependency.rb +6 -4
- data/lib/berkshelf/downloader.rb +3 -0
- data/lib/berkshelf/errors.rb +15 -0
- data/lib/berkshelf/formatters.rb +1 -0
- data/lib/berkshelf/formatters/human_readable.rb +27 -4
- data/lib/berkshelf/formatters/json.rb +21 -5
- data/lib/berkshelf/git.rb +4 -0
- data/lib/berkshelf/installer.rb +3 -1
- data/lib/berkshelf/locations/git_location.rb +22 -10
- data/lib/berkshelf/locations/github_location.rb +3 -7
- data/lib/berkshelf/locations/path_location.rb +0 -19
- data/lib/berkshelf/lockfile.rb +66 -4
- data/lib/berkshelf/mixin/logging.rb +1 -1
- data/lib/berkshelf/version.rb +1 -1
- data/spec/spec_helper.rb +8 -4
- data/spec/support/git.rb +9 -9
- data/spec/support/mercurial.rb +9 -9
- data/spec/unit/berkshelf/api_client_spec.rb +1 -1
- data/spec/unit/berkshelf/berksfile_spec.rb +36 -59
- data/spec/unit/berkshelf/cli_spec.rb +16 -0
- data/spec/unit/berkshelf/config_spec.rb +1 -1
- data/spec/unit/berkshelf/cookbook_generator_spec.rb +4 -6
- data/spec/unit/berkshelf/locations/git_location_spec.rb +1 -1
- data/spec/unit/berkshelf/lockfile_spec.rb +81 -2
- data/spec/unit/berkshelf/resolver/graph_spec.rb +1 -1
- data/spec/unit/berkshelf/ui_spec.rb +4 -4
- metadata +7 -7
- data/features/commands/configure.feature +0 -89
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5f5088e43f8c5365f1e59d658fd1756124755b65
|
4
|
+
data.tar.gz: a69deb7ea7f326a6811000b60fe773ff8012766c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 29b808bebf200fd436c4f49c4207396bcf9210d2c2f9fb53d935cf1d552385f45fb423f5d077c7b4f0d4d6e85c2f2a0bb007becbf0d9780dff1df875ba371961
|
7
|
+
data.tar.gz: 9bf52b249305d61aa2b6aef4a73a1ec06a661219635989bf9c29d4979ff13ed69e6ea9e4cbecc7d9427918c00dbeebd8873f1e8e7f31601db8dde38bfb4d5bc7
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.0.0-
|
1
|
+
2.0.0-p353
|
data/.travis.yml
CHANGED
@@ -12,6 +12,7 @@ bundler_args: --without guard
|
|
12
12
|
before_install:
|
13
13
|
- sudo apt-get install -qq libarchive12 libarchive-dev
|
14
14
|
before_script:
|
15
|
+
- echo "StrictHostKeyChecking no" > ~/.ssh/config
|
15
16
|
- git config --global user.email "ci@berkshelf.com"
|
16
17
|
- git config --global user.name "Berkshelf"
|
17
18
|
script: bundle exec thor spec:ci
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
# 3.0.0
|
2
2
|
|
3
|
-
*
|
3
|
+
* Enhancements
|
4
|
+
* New "universe" resolver which communicates with an API server to resolve constraint graphs faster and more reliably
|
5
|
+
|
6
|
+
* Bug Fixes
|
7
|
+
* Raw metadata will be compiled into metadata.json during vendor process
|
4
8
|
|
5
9
|
# 2.0.10
|
6
10
|
|
@@ -10,6 +14,12 @@
|
|
10
14
|
|
11
15
|
* Update required version of Ridley
|
12
16
|
|
17
|
+
# 2.0.8
|
18
|
+
|
19
|
+
* Account for API changes to solve
|
20
|
+
* Rescue exceptions when parsing the lockfile
|
21
|
+
* Fix deprecation errors
|
22
|
+
|
13
23
|
# 2.0.7
|
14
24
|
|
15
25
|
* Fix crash when parsing a lockfile that contains path locations which no longer exist
|
@@ -98,7 +108,7 @@
|
|
98
108
|
|
99
109
|
# 1.3.1
|
100
110
|
- Support for Vagrant 1.1.x
|
101
|
-
- Move Berkshelf Vagrant plugin into it's [own repository](https://github.com/
|
111
|
+
- Move Berkshelf Vagrant plugin into it's [own repository](https://github.com/berkshelf/vagrant-berkshelf)
|
102
112
|
- Added -d flag to output debug information in berks command
|
103
113
|
- Various bug fixes in uploading cookbooks
|
104
114
|
|
data/CONTRIBUTING.md
CHANGED
@@ -1,53 +1,53 @@
|
|
1
|
-
# Contributing
|
2
|
-
|
3
|
-
## Developing
|
4
|
-
|
5
|
-
If you'd like to submit a patch:
|
6
|
-
|
7
|
-
1. Fork the project.
|
8
|
-
2. Make your feature addition or bug fix.
|
9
|
-
3. Add [tests](#testing) for it. This is important so that it isn't broken in a
|
10
|
-
future version unintentionally.
|
11
|
-
4. Commit. **Do not touch any unrelated code, such as the gemspec or version.**
|
12
|
-
If you must change unrelated code, do it in a commit by itself, so that it
|
13
|
-
can be ignored.
|
14
|
-
5. Send a pull request.
|
15
|
-
|
16
|
-
## Testing
|
17
|
-
|
18
|
-
### Install prerequisites
|
19
|
-
|
20
|
-
Install git and mercurial on your test system. (http://mercurial.selenic.com/wiki/Download)
|
21
|
-
|
22
|
-
Install the latest version of [Bundler](http://gembundler.com)
|
23
|
-
|
24
|
-
$ gem install bundler
|
25
|
-
|
26
|
-
Clone the project
|
27
|
-
|
28
|
-
$ git clone git://github.com/
|
29
|
-
|
30
|
-
and run:
|
31
|
-
|
32
|
-
$ cd berkshelf
|
33
|
-
$ bundle install
|
34
|
-
|
35
|
-
Bundler will install all gems and their dependencies required for testing and developing.
|
36
|
-
|
37
|
-
### Running unit (RSpec) and acceptance (Cucumber) tests
|
38
|
-
|
39
|
-
We use Chef Zero - an in-memory Chef Server for running tests. It is automatically managed by the Specs and Cukes. Simply run:
|
40
|
-
|
41
|
-
$ bundle exec guard start
|
42
|
-
|
43
|
-
See [here](https://github.com/tdegrunt/vagrant-chef-server-bootstrap) for a
|
44
|
-
quick way to get a testing chef server up.
|
45
|
-
|
46
|
-
### Debugging Issues
|
47
|
-
By default, Berkshelf will only give you the top-level output from a failed command. If you're working deep inside the core, an error like:
|
48
|
-
|
49
|
-
Berkshelf Error: wrong number of arguments (2 for 1)
|
50
|
-
|
51
|
-
isn't exactly helpful...
|
52
|
-
|
53
|
-
Specify the `BERKSHELF_DEBUG` flag when running your command to see a full stack trace and other helpful debugging information.
|
1
|
+
# Contributing
|
2
|
+
|
3
|
+
## Developing
|
4
|
+
|
5
|
+
If you'd like to submit a patch:
|
6
|
+
|
7
|
+
1. Fork the project.
|
8
|
+
2. Make your feature addition or bug fix.
|
9
|
+
3. Add [tests](#testing) for it. This is important so that it isn't broken in a
|
10
|
+
future version unintentionally.
|
11
|
+
4. Commit. **Do not touch any unrelated code, such as the gemspec or version.**
|
12
|
+
If you must change unrelated code, do it in a commit by itself, so that it
|
13
|
+
can be ignored.
|
14
|
+
5. Send a pull request.
|
15
|
+
|
16
|
+
## Testing
|
17
|
+
|
18
|
+
### Install prerequisites
|
19
|
+
|
20
|
+
Install git and mercurial on your test system. (http://mercurial.selenic.com/wiki/Download)
|
21
|
+
|
22
|
+
Install the latest version of [Bundler](http://gembundler.com)
|
23
|
+
|
24
|
+
$ gem install bundler
|
25
|
+
|
26
|
+
Clone the project
|
27
|
+
|
28
|
+
$ git clone git://github.com/berkshelf/berkshelf.git
|
29
|
+
|
30
|
+
and run:
|
31
|
+
|
32
|
+
$ cd berkshelf
|
33
|
+
$ bundle install
|
34
|
+
|
35
|
+
Bundler will install all gems and their dependencies required for testing and developing.
|
36
|
+
|
37
|
+
### Running unit (RSpec) and acceptance (Cucumber) tests
|
38
|
+
|
39
|
+
We use Chef Zero - an in-memory Chef Server for running tests. It is automatically managed by the Specs and Cukes. Simply run:
|
40
|
+
|
41
|
+
$ bundle exec guard start
|
42
|
+
|
43
|
+
See [here](https://github.com/tdegrunt/vagrant-chef-server-bootstrap) for a
|
44
|
+
quick way to get a testing chef server up.
|
45
|
+
|
46
|
+
### Debugging Issues
|
47
|
+
By default, Berkshelf will only give you the top-level output from a failed command. If you're working deep inside the core, an error like:
|
48
|
+
|
49
|
+
Berkshelf Error: wrong number of arguments (2 for 1)
|
50
|
+
|
51
|
+
isn't exactly helpful...
|
52
|
+
|
53
|
+
Specify the `BERKSHELF_DEBUG` flag when running your command to see a full stack trace and other helpful debugging information.
|
data/Gemfile
CHANGED
data/Guardfile
CHANGED
@@ -4,19 +4,25 @@ guard 'spork' do
|
|
4
4
|
watch(%r{^features/support/}) { :cucumber }
|
5
5
|
end
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
7
|
+
unless RUBY_PLATFORM =~ /mswin|mingw|windows/
|
8
|
+
guard 'yard', stdout: '/dev/null', stderr: '/dev/null' do
|
9
|
+
watch(%r{app/.+\.rb})
|
10
|
+
watch(%r{lib/.+\.rb})
|
11
|
+
watch(%r{ext/.+\.c})
|
12
|
+
end
|
11
13
|
end
|
12
14
|
|
13
|
-
|
15
|
+
rspec_cli = '--color --drb --format Fuubar'
|
16
|
+
rspec_cli += ' --tag ~@api_client --tag ~@not_supported_on_windows' if RUBY_PLATFORM =~ /mswin|mingw|windows/
|
17
|
+
guard 'rspec', cli: rspec_cli, all_on_start: false, all_after_pass: false do
|
14
18
|
watch(%r{^spec/unit/.+_spec\.rb$})
|
15
19
|
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/unit/#{m[1]}_spec.rb" }
|
16
20
|
watch('spec/spec_helper.rb') { 'spec' }
|
17
21
|
end
|
18
22
|
|
19
|
-
|
23
|
+
cucumber_cli = '--drb --format pretty --tags ~@no_run --tags ~@wip'
|
24
|
+
cucumber_cli += ' --tags ~@spawn --tags ~@api_server' if RUBY_PLATFORM =~ /mswin|mingw|windows/
|
25
|
+
guard 'cucumber', cli: cucumber_cli, all_on_start: false, all_after_pass: false do
|
20
26
|
watch(%r{^features/.+\.feature$})
|
21
27
|
watch(%r{^features/support/.+$}) { 'features' }
|
22
28
|
watch(%r{^features/step_definitions/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'features' }
|
data/PLUGINS.md
CHANGED
@@ -8,7 +8,7 @@ This is a list of community-contributed plugins for Berkshelf. A few notes:
|
|
8
8
|
Plugins
|
9
9
|
-------
|
10
10
|
- [berkshelf-shims](https://github.com/JeffBellegarde/berkshelf-shims) - Provide shims functionality for Berkshelf.
|
11
|
-
- [vagrant-berkshelf](https://github.com/
|
11
|
+
- [vagrant-berkshelf](https://github.com/berkshelf/vagrant-berkshelf) - A Vagrant plugin to add Berkshelf integration to the Chef provisioners.
|
12
12
|
|
13
13
|
I want to add my plugin!
|
14
14
|
------------------------
|
@@ -21,4 +21,4 @@ I want to add my plugin!
|
|
21
21
|
|
22
22
|
For example:
|
23
23
|
|
24
|
-
[berkshelf-myface](https://github.com/
|
24
|
+
[berkshelf-myface](https://github.com/berkshelf/berkshelf-myface) - A plugin to add myface support to Berkshelf.
|
data/README.md
CHANGED
@@ -1,9 +1,7 @@
|
|
1
1
|
Berkshelf
|
2
2
|
=========
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/berkshelf.png)](http://badge.fury.io/rb/berkshelf)
|
4
|
-
[![Build Status](https://travis-ci.org/
|
5
|
-
[![Dependency Status](https://gemnasium.com/RiotGames/berkshelf.png)](https://gemnasium.com/RiotGames/berkshelf)
|
6
|
-
[![Code Climate](https://codeclimate.com/github/RiotGames/berkshelf.png)](https://codeclimate.com/github/RiotGames/berkshelf)
|
4
|
+
[![Build Status](https://travis-ci.org/berkshelf/berkshelf.png?branch=master)](https://travis-ci.org/berkshelf/berkshelf)
|
7
5
|
|
8
6
|
Manage a Cookbook or an Application's Cookbook dependencies
|
9
7
|
|
@@ -33,13 +31,13 @@ Ruby 1.9.1 and 1.9.2 are not officially supported. If you encounter problems, pl
|
|
33
31
|
|
34
32
|
Bash Completion
|
35
33
|
---------------
|
36
|
-
There is a [berkshelf bash completion script](https://raw.github.com/
|
34
|
+
There is a [berkshelf bash completion script](https://raw.github.com/berkshelf/berkshelf/master/berkshelf-complete.sh). If you're using homebrew, you can install it like this:
|
37
35
|
|
38
36
|
brew install bash-completion # if you haven't already
|
39
37
|
|
40
38
|
Download the latest script
|
41
39
|
|
42
|
-
cd `brew --prefix`/etc/bash_completion.d && wget https://raw.github.com/
|
40
|
+
cd `brew --prefix`/etc/bash_completion.d && wget https://raw.github.com/berkshelf/berkshelf/master/berkshelf-complete.sh
|
43
41
|
|
44
42
|
And make sure you have this in your bash/zsh profile:
|
45
43
|
|
@@ -47,7 +45,7 @@ And make sure you have this in your bash/zsh profile:
|
|
47
45
|
|
48
46
|
Plugins
|
49
47
|
-------
|
50
|
-
Please see [Plugins page](https://github.com/
|
48
|
+
Please see [Plugins page](https://github.com/berkshelf/berkshelf/blob/master/PLUGINS.md) for more information.
|
51
49
|
|
52
50
|
Configuration
|
53
51
|
-------------
|
@@ -61,9 +59,7 @@ $PWD/config.json
|
|
61
59
|
~/.berkshelf/config.json
|
62
60
|
```
|
63
61
|
|
64
|
-
You are encouraged to keep project-specific configuration in the `$PWD/.berkshelf` directory.
|
65
|
-
|
66
|
-
$ berks configure --path ./.berkshelf/config.json
|
62
|
+
You are encouraged to keep project-specific configuration in the `$PWD/.berkshelf` directory. A default configuration file is generated for you, but you can update the values to suit your needs.
|
67
63
|
|
68
64
|
SSL Errors
|
69
65
|
----------
|
@@ -89,6 +85,6 @@ Authors
|
|
89
85
|
- Justin Campbell (<justin@justincampbell.me>)
|
90
86
|
- Seth Vargo (<sethvargo@gmail.com>)
|
91
87
|
|
92
|
-
Thank you to all of our [Contributors](https://github.com/
|
88
|
+
Thank you to all of our [Contributors](https://github.com/berkshelf/berkshelf/graphs/contributors), testers, and users.
|
93
89
|
|
94
|
-
If you'd like to contribute, please see our [contribution guidelines](https://github.com/
|
90
|
+
If you'd like to contribute, please see our [contribution guidelines](https://github.com/berkshelf/berkshelf/blob/master/CONTRIBUTING.md) first.
|
data/berkshelf.gemspec
CHANGED
@@ -38,7 +38,7 @@ Gem::Specification.new do |s|
|
|
38
38
|
s.add_dependency 'hashie', '>= 2.0.2'
|
39
39
|
s.add_dependency 'minitar', '~> 0.5.4'
|
40
40
|
s.add_dependency 'retryable', '~> 1.3.3'
|
41
|
-
s.add_dependency 'ridley', '~>
|
41
|
+
s.add_dependency 'ridley', '~> 2.3'
|
42
42
|
s.add_dependency 'solve', '>= 0.8.0'
|
43
43
|
s.add_dependency 'thor', '~> 0.18.0'
|
44
44
|
|
@@ -1,3 +1,4 @@
|
|
1
|
+
@api_server
|
1
2
|
Feature: berks apply
|
2
3
|
Scenario: Locking a cookbook version with dependencies
|
3
4
|
Given the cookbook store contains a cookbook "fake" "1.0.0" with dependencies:
|
@@ -9,10 +10,11 @@ Feature: berks apply
|
|
9
10
|
"""
|
10
11
|
cookbook 'fake', '1.0.0'
|
11
12
|
"""
|
12
|
-
When I successfully run `berks
|
13
|
+
When I successfully run `berks install`
|
14
|
+
And I successfully run `berks apply my_env`
|
13
15
|
Then the version locks in the "my_env" environment should be:
|
14
|
-
| fake | 1.0.0 |
|
15
|
-
| dependency | 2.0.0 |
|
16
|
+
| fake | = 1.0.0 |
|
17
|
+
| dependency | = 2.0.0 |
|
16
18
|
|
17
19
|
|
18
20
|
Scenario: Locking cookbook versions to a non-existent Chef Environment
|
@@ -23,9 +25,18 @@ Feature: berks apply
|
|
23
25
|
"""
|
24
26
|
cookbook 'fake', '1.0.0'
|
25
27
|
"""
|
26
|
-
When I run `berks
|
28
|
+
When I successfully run `berks install`
|
29
|
+
And I run `berks apply my_env`
|
27
30
|
Then the output should contain:
|
28
31
|
"""
|
29
32
|
The environment 'my_env' does not exist
|
30
33
|
"""
|
31
34
|
And the exit status should be "EnvironmentNotFound"
|
35
|
+
|
36
|
+
Scenario: Locking an environment when no lockfile is present
|
37
|
+
When I run `berks apply my_env`
|
38
|
+
Then the output should contain:
|
39
|
+
"""
|
40
|
+
No lockfile found at Berksfile.lock
|
41
|
+
"""
|
42
|
+
And the exit status should be "LockfileNotFound"
|
@@ -13,7 +13,7 @@ Feature: berks cookbook
|
|
13
13
|
| chef-minitest | Chef-Minitest |
|
14
14
|
| scmversion | SCMVersion |
|
15
15
|
| no-bundler | no Bundler |
|
16
|
-
# Disable testing of skip git until Test Kitchen supports the skip_git flag in
|
16
|
+
# Disable testing of skip git until Test Kitchen supports the skip_git flag in its generator
|
17
17
|
# https://github.com/opscode/test-kitchen/issues/141
|
18
18
|
# | skip-git | no Git |
|
19
19
|
| skip-vagrant | no Vagrant |
|
@@ -59,8 +59,8 @@ Feature: berks install
|
|
59
59
|
When I successfully run `berks install`
|
60
60
|
Then the output should contain:
|
61
61
|
"""
|
62
|
-
Installing ruby (1.0.0)
|
63
|
-
Installing elixir (1.0.0)
|
62
|
+
Installing ruby (1.0.0) from http://localhost:26310/ (via 0.0.0.0)
|
63
|
+
Installing elixir (1.0.0) from http://localhost:26310/ (via 0.0.0.0)
|
64
64
|
"""
|
65
65
|
And the cookbook store should have the cookbooks:
|
66
66
|
| ruby | 1.0.0 |
|
@@ -205,9 +205,9 @@ Feature: berks install
|
|
205
205
|
| berkshelf-cookbook-fixture | 1.0.0 | 93f5768b7d14df45e10d16c8bf6fe98ba3ff809a |
|
206
206
|
And the output should contain:
|
207
207
|
"""
|
208
|
-
Fetching 'berkshelf-cookbook-fixture' from github: 'RiotGames/berkshelf-cookbook-fixture' with branch: 'rel'
|
208
|
+
Fetching 'berkshelf-cookbook-fixture' from github: 'git://github.com/RiotGames/berkshelf-cookbook-fixture.git' with branch: 'rel'
|
209
209
|
building universe...
|
210
|
-
Using berkshelf-cookbook-fixture (1.0.0) github: 'RiotGames/berkshelf-cookbook-fixture' with branch: 'rel'
|
210
|
+
Using berkshelf-cookbook-fixture (1.0.0) github: 'git://github.com/RiotGames/berkshelf-cookbook-fixture.git' with branch: 'rel' at ref: '93f5768b7d14df45e10d16c8bf6fe98ba3ff809a'
|
211
211
|
"""
|
212
212
|
|
213
213
|
|
@@ -227,6 +227,37 @@ Feature: berks install
|
|
227
227
|
"""
|
228
228
|
|
229
229
|
|
230
|
+
Scenario: installing a Berksfile that contains a Git location with a ref
|
231
|
+
Given I have a Berksfile pointing at the local Berkshelf API with:
|
232
|
+
"""
|
233
|
+
cookbook "berkshelf-cookbook-fixture", git: "git://github.com/RiotGames/berkshelf-cookbook-fixture.git", ref: "70a527e17d91f01f031204562460ad1c17f972ee"
|
234
|
+
"""
|
235
|
+
When I successfully run `berks install`
|
236
|
+
Then the cookbook store should have the git cookbooks:
|
237
|
+
| berkshelf-cookbook-fixture | 0.2.0 | 70a527e17d91f01f031204562460ad1c17f972ee |
|
238
|
+
And the output should contain:
|
239
|
+
"""
|
240
|
+
Fetching 'berkshelf-cookbook-fixture' from git: 'git://github.com/RiotGames/berkshelf-cookbook-fixture.git' with ref: '70a527e17d91f01f031204562460ad1c17f972ee'
|
241
|
+
building universe...
|
242
|
+
Using berkshelf-cookbook-fixture (0.2.0) git: 'git://github.com/RiotGames/berkshelf-cookbook-fixture.git' with ref: '70a527e17d91f01f031204562460ad1c17f972ee'
|
243
|
+
"""
|
244
|
+
|
245
|
+
|
246
|
+
Scenario: installing a Berksfile that contains a Git location with an abbreviated ref
|
247
|
+
Given I have a Berksfile pointing at the local Berkshelf API with:
|
248
|
+
"""
|
249
|
+
cookbook "berkshelf-cookbook-fixture", git: "git://github.com/RiotGames/berkshelf-cookbook-fixture.git", ref: "70a527"
|
250
|
+
"""
|
251
|
+
When I successfully run `berks install`
|
252
|
+
Then the cookbook store should have the git cookbooks:
|
253
|
+
| berkshelf-cookbook-fixture | 0.2.0 | 70a527e17d91f01f031204562460ad1c17f972ee |
|
254
|
+
And the output should contain:
|
255
|
+
"""
|
256
|
+
Fetching 'berkshelf-cookbook-fixture' from git: 'git://github.com/RiotGames/berkshelf-cookbook-fixture.git' with ref: '70a527'
|
257
|
+
building universe...
|
258
|
+
Using berkshelf-cookbook-fixture (0.2.0) git: 'git://github.com/RiotGames/berkshelf-cookbook-fixture.git' with ref: '70a527' at ref: '70a527e17d91f01f031204562460ad1c17f972ee'
|
259
|
+
"""
|
260
|
+
|
230
261
|
Scenario: installing a Berksfile that contains a GitHub location
|
231
262
|
Given I have a Berksfile pointing at the local Berkshelf API with:
|
232
263
|
"""
|
@@ -237,31 +268,70 @@ Feature: berks install
|
|
237
268
|
| berkshelf-cookbook-fixture | 0.2.0 | 70a527e17d91f01f031204562460ad1c17f972ee |
|
238
269
|
And the output should contain:
|
239
270
|
"""
|
240
|
-
Fetching 'berkshelf-cookbook-fixture' from github: 'RiotGames/berkshelf-cookbook-fixture' with branch: 'v0.2.0'
|
271
|
+
Fetching 'berkshelf-cookbook-fixture' from github: 'git://github.com/RiotGames/berkshelf-cookbook-fixture.git' with branch: 'v0.2.0'
|
241
272
|
building universe...
|
242
|
-
Using berkshelf-cookbook-fixture (0.2.0) github: 'RiotGames/berkshelf-cookbook-fixture' with branch: 'v0.2.0'
|
273
|
+
Using berkshelf-cookbook-fixture (0.2.0) github: 'git://github.com/RiotGames/berkshelf-cookbook-fixture.git' with branch: 'v0.2.0' at ref: '70a527e17d91f01f031204562460ad1c17f972ee'
|
243
274
|
"""
|
244
275
|
|
245
276
|
|
246
|
-
Scenario
|
277
|
+
Scenario: installing a Berksfile that contains a GitHub location ending in .git
|
247
278
|
Given I have a Berksfile pointing at the local Berkshelf API with:
|
248
279
|
"""
|
249
|
-
cookbook "berkshelf-cookbook-fixture", github: "RiotGames/berkshelf-cookbook-fixture", tag: "
|
280
|
+
cookbook "berkshelf-cookbook-fixture", github: "RiotGames/berkshelf-cookbook-fixture.git", tag: "v0.2.0"
|
281
|
+
"""
|
282
|
+
When I run `berks install`
|
283
|
+
Then the output should contain:
|
284
|
+
"""
|
285
|
+
'RiotGames/berkshelf-cookbook-fixture.git' is not a valid GitHub identifier - should not end in '.git'
|
286
|
+
"""
|
287
|
+
And the exit status should be "InvalidGitHubIdentifier"
|
288
|
+
|
289
|
+
|
290
|
+
Scenario: installing a Berksfile that contains a Github location and protocol git
|
291
|
+
Given I have a Berksfile pointing at the local Berkshelf API with:
|
292
|
+
"""
|
293
|
+
cookbook "berkshelf-cookbook-fixture", github: "RiotGames/berkshelf-cookbook-fixture", tag: "v0.2.0", protocol: "git"
|
294
|
+
"""
|
295
|
+
When I successfully run `berks install`
|
296
|
+
Then the cookbook store should have the git cookbooks:
|
297
|
+
| berkshelf-cookbook-fixture | 0.2.0 | 70a527e17d91f01f031204562460ad1c17f972ee |
|
298
|
+
And the output should contain:
|
299
|
+
"""
|
300
|
+
Fetching 'berkshelf-cookbook-fixture' from github: 'git://github.com/RiotGames/berkshelf-cookbook-fixture.git' with branch: 'v0.2.0'
|
301
|
+
building universe...
|
302
|
+
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
|
+
"""
|
304
|
+
|
305
|
+
|
306
|
+
Scenario: installing a Berksfile that contains a Github location and protocol https
|
307
|
+
Given I have a Berksfile pointing at the local Berkshelf API with:
|
308
|
+
"""
|
309
|
+
cookbook "berkshelf-cookbook-fixture", github: "RiotGames/berkshelf-cookbook-fixture", tag: "v0.2.0", protocol: "https"
|
250
310
|
"""
|
251
311
|
When I successfully run `berks install`
|
252
312
|
Then the cookbook store should have the git cookbooks:
|
253
|
-
| berkshelf-cookbook-fixture |
|
313
|
+
| berkshelf-cookbook-fixture | 0.2.0 | 70a527e17d91f01f031204562460ad1c17f972ee |
|
254
314
|
And the output should contain:
|
255
315
|
"""
|
256
|
-
Fetching 'berkshelf-cookbook-fixture' from github: 'RiotGames/berkshelf-cookbook-fixture' with branch: '
|
316
|
+
Fetching 'berkshelf-cookbook-fixture' from github: 'https://github.com/RiotGames/berkshelf-cookbook-fixture.git' with branch: 'v0.2.0'
|
257
317
|
building universe...
|
258
|
-
Using berkshelf-cookbook-fixture (
|
318
|
+
Using berkshelf-cookbook-fixture (0.2.0) github: 'https://github.com/RiotGames/berkshelf-cookbook-fixture.git' with branch: 'v0.2.0' at ref: '70a527e17d91f01f031204562460ad1c17f972ee'
|
259
319
|
"""
|
260
320
|
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
321
|
+
|
322
|
+
# GitHub doesn't permit anonymous SSH access, so we are going to get a
|
323
|
+
# failure message back. That's okay, if GitHub tells us our key was denied,
|
324
|
+
# we know the connection has made it that far.
|
325
|
+
Scenario: installing a Berksfile that contains a Github location and protocol ssh
|
326
|
+
Given I have a Berksfile pointing at the local Berkshelf API with:
|
327
|
+
"""
|
328
|
+
cookbook "berkshelf-cookbook-fixture", github: "RiotGames/berkshelf-cookbook-fixture", tag: "v0.2.0", protocol: "ssh"
|
329
|
+
"""
|
330
|
+
When I run `berks install`
|
331
|
+
Then the output should contain:
|
332
|
+
"""
|
333
|
+
Permission denied (publickey).
|
334
|
+
"""
|
265
335
|
|
266
336
|
|
267
337
|
Scenario: installing a Berksfile that contains a Github location and an unsupported protocol
|