berkshelf 5.5.0 → 5.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +21 -3
- data/Gemfile +31 -31
- data/Gemfile.lock +3 -3
- data/Guardfile +13 -13
- data/Rakefile +1 -0
- data/Thorfile +16 -16
- data/berkshelf.gemspec +35 -35
- data/features/step_definitions/chef/config_steps.rb +4 -4
- data/features/step_definitions/chef_server_steps.rb +6 -6
- data/features/step_definitions/cli_steps.rb +3 -3
- data/features/step_definitions/config_steps.rb +5 -5
- data/features/step_definitions/filesystem_steps.rb +12 -11
- data/features/support/env.rb +21 -21
- data/lib/berkshelf.rb +66 -66
- data/lib/berkshelf/base_generator.rb +10 -11
- data/lib/berkshelf/berksfile.rb +38 -38
- data/lib/berkshelf/cached_cookbook.rb +7 -7
- data/lib/berkshelf/cli.rb +126 -126
- data/lib/berkshelf/commands/shelf.rb +19 -18
- data/lib/berkshelf/commands/test_command.rb +2 -2
- data/lib/berkshelf/community_rest.rb +38 -38
- data/lib/berkshelf/config.rb +42 -41
- data/lib/berkshelf/cookbook_generator.rb +38 -38
- data/lib/berkshelf/cookbook_store.rb +4 -4
- data/lib/berkshelf/core_ext/file_utils.rb +1 -1
- data/lib/berkshelf/dependency.rb +23 -21
- data/lib/berkshelf/downloader.rb +24 -25
- data/lib/berkshelf/errors.rb +17 -17
- data/lib/berkshelf/file_syncer.rb +9 -8
- data/lib/berkshelf/formatters/human.rb +3 -3
- data/lib/berkshelf/formatters/json.rb +2 -2
- data/lib/berkshelf/init_generator.rb +64 -64
- data/lib/berkshelf/installer.rb +103 -102
- data/lib/berkshelf/location.rb +9 -9
- data/lib/berkshelf/locations/git.rb +16 -16
- data/lib/berkshelf/locations/github.rb +1 -1
- data/lib/berkshelf/locations/path.rb +2 -2
- data/lib/berkshelf/lockfile.rb +309 -315
- data/lib/berkshelf/mixin/git.rb +3 -3
- data/lib/berkshelf/packager.rb +4 -4
- data/lib/berkshelf/resolver.rb +2 -2
- data/lib/berkshelf/resolver/graph.rb +1 -1
- data/lib/berkshelf/shell.rb +1 -1
- data/lib/berkshelf/source.rb +6 -6
- data/lib/berkshelf/source_uri.rb +2 -2
- data/lib/berkshelf/ssl_policies.rb +3 -3
- data/lib/berkshelf/thor.rb +1 -1
- data/lib/berkshelf/uploader.rb +48 -48
- data/lib/berkshelf/validator.rb +2 -2
- data/lib/berkshelf/version.rb +1 -1
- data/lib/berkshelf/visualizer.rb +11 -11
- data/spec/config/knife.rb +2 -2
- data/spec/fixtures/Berksfile +3 -3
- data/spec/fixtures/cookbook-path/jenkins-config/metadata.rb +3 -3
- data/spec/fixtures/cookbook-store/jenkins-2.0.3/metadata.rb +5 -5
- data/spec/fixtures/cookbook-store/jenkins-2.0.4/metadata.rb +4 -4
- data/spec/fixtures/cookbooks/example_cookbook-0.5.0/metadata.rb +3 -3
- data/spec/fixtures/cookbooks/example_cookbook/metadata.rb +3 -3
- data/spec/spec_helper.rb +9 -9
- data/spec/support/chef_api.rb +11 -12
- data/spec/support/chef_server.rb +10 -10
- data/spec/support/git.rb +23 -23
- data/spec/support/kitchen.rb +2 -2
- data/spec/support/matchers/filepath_matchers.rb +2 -2
- data/spec/support/path_helpers.rb +12 -12
- data/spec/support/shared_examples/formatter.rb +1 -1
- data/spec/unit/berkshelf/berksfile_spec.rb +78 -78
- data/spec/unit/berkshelf/cached_cookbook_spec.rb +42 -42
- data/spec/unit/berkshelf/cli_spec.rb +6 -6
- data/spec/unit/berkshelf/community_rest_spec.rb +83 -83
- data/spec/unit/berkshelf/config_spec.rb +13 -13
- data/spec/unit/berkshelf/cookbook_generator_spec.rb +39 -39
- data/spec/unit/berkshelf/cookbook_store_spec.rb +41 -41
- data/spec/unit/berkshelf/core_ext/file_utils_spec.rb +5 -6
- data/spec/unit/berkshelf/core_ext/pathname_spec.rb +1 -1
- data/spec/unit/berkshelf/dependency_spec.rb +43 -43
- data/spec/unit/berkshelf/downloader_spec.rb +20 -20
- data/spec/unit/berkshelf/errors_spec.rb +3 -3
- data/spec/unit/berkshelf/file_syncer_spec.rb +86 -86
- data/spec/unit/berkshelf/formatters/base_spec.rb +23 -23
- data/spec/unit/berkshelf/formatters/human_spec.rb +2 -2
- data/spec/unit/berkshelf/formatters/json_spec.rb +2 -2
- data/spec/unit/berkshelf/formatters/null_spec.rb +3 -3
- data/spec/unit/berkshelf/init_generator_spec.rb +92 -92
- data/spec/unit/berkshelf/installer_spec.rb +8 -8
- data/spec/unit/berkshelf/location_spec.rb +11 -11
- data/spec/unit/berkshelf/locations/base_spec.rb +35 -35
- data/spec/unit/berkshelf/locations/git_spec.rb +87 -87
- data/spec/unit/berkshelf/locations/path_spec.rb +40 -40
- data/spec/unit/berkshelf/lockfile_parser_spec.rb +71 -71
- data/spec/unit/berkshelf/lockfile_spec.rb +197 -197
- data/spec/unit/berkshelf/logger_spec.rb +3 -3
- data/spec/unit/berkshelf/mixin/logging_spec.rb +5 -5
- data/spec/unit/berkshelf/packager_spec.rb +2 -2
- data/spec/unit/berkshelf/resolver/graph_spec.rb +1 -1
- data/spec/unit/berkshelf/resolver_spec.rb +17 -17
- data/spec/unit/berkshelf/shell_spec.rb +34 -34
- data/spec/unit/berkshelf/source_spec.rb +12 -11
- data/spec/unit/berkshelf/source_uri_spec.rb +1 -1
- data/spec/unit/berkshelf/ssl_policies_spec.rb +25 -25
- data/spec/unit/berkshelf/uploader_spec.rb +54 -54
- data/spec/unit/berkshelf/validator_spec.rb +16 -16
- data/spec/unit/berkshelf/visualizer_spec.rb +17 -17
- data/spec/unit/berkshelf_spec.rb +18 -18
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 76fea59944506c666666757823f166119c9bf4c8
|
4
|
+
data.tar.gz: fa4472c072c5acbc9ecceaa121b3ad25812e8519
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fdceb6ac85c361ba183083a888a9b932517564e316717e80942424a9a6d541868ec3c448c05a9ea0184436a4d22ee24a9bfea2de5e96cb64d29f257abbeddf29
|
7
|
+
data.tar.gz: 74a4f37b94b1afabe8ff22ba7ca5ac3ec7edc19171cffbf7d3256121709fd1e14d9d9bbdecfc6e73b2f94713d94b595ece75da67703b2dd78b219a94a9120d61
|
data/CHANGELOG.md
CHANGED
@@ -1,10 +1,28 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
-
## [5.
|
4
|
-
[Full Changelog](https://github.com/berkshelf/berkshelf/compare/v5.
|
3
|
+
## [5.6.0](https://github.com/berkshelf/berkshelf/tree/5.6.0) (2017-02-02)
|
4
|
+
[Full Changelog](https://github.com/berkshelf/berkshelf/compare/v5.5.0...5.6.0)
|
5
5
|
|
6
6
|
**Merged pull requests:**
|
7
7
|
|
8
|
+
- Bump Mixlib-Archive to 0.4 [\#1666](https://github.com/berkshelf/berkshelf/pull/1666) ([thommay](https://github.com/thommay))
|
9
|
+
- chefstyle fixes [\#1662](https://github.com/berkshelf/berkshelf/pull/1662) ([lamont-granquist](https://github.com/lamont-granquist))
|
10
|
+
|
11
|
+
## [v5.5.0](https://github.com/berkshelf/berkshelf/tree/v5.5.0) (2017-01-24)
|
12
|
+
[Full Changelog](https://github.com/berkshelf/berkshelf/compare/v5.4.0...v5.5.0)
|
13
|
+
|
14
|
+
**Merged pull requests:**
|
15
|
+
|
16
|
+
- remove Thread.exclusive [\#1661](https://github.com/berkshelf/berkshelf/pull/1661) ([lamont-granquist](https://github.com/lamont-granquist))
|
17
|
+
- Revert vendoring metadata.rb file [\#1660](https://github.com/berkshelf/berkshelf/pull/1660) ([lamont-granquist](https://github.com/lamont-granquist))
|
18
|
+
- bundle update [\#1659](https://github.com/berkshelf/berkshelf/pull/1659) ([lamont-granquist](https://github.com/lamont-granquist))
|
19
|
+
|
20
|
+
## [v5.4.0](https://github.com/berkshelf/berkshelf/tree/v5.4.0) (2017-01-19)
|
21
|
+
[Full Changelog](https://github.com/berkshelf/berkshelf/compare/v5.3.0...v5.4.0)
|
22
|
+
|
23
|
+
**Merged pull requests:**
|
24
|
+
|
25
|
+
- Prepare for 5.4.0 [\#1658](https://github.com/berkshelf/berkshelf/pull/1658) ([thommay](https://github.com/thommay))
|
8
26
|
- vendor the metadata.rb file [\#1652](https://github.com/berkshelf/berkshelf/pull/1652) ([lamont-granquist](https://github.com/lamont-granquist))
|
9
27
|
- Add a format option to berkz viz that outputs a dotfile [\#1646](https://github.com/berkshelf/berkshelf/pull/1646) ([borntyping](https://github.com/borntyping))
|
10
28
|
|
@@ -1373,4 +1391,4 @@
|
|
1373
1391
|
|
1374
1392
|
|
1375
1393
|
|
1376
|
-
\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
|
1394
|
+
\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
|
data/Gemfile
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
source
|
1
|
+
source "https://rubygems.org"
|
2
2
|
|
3
3
|
gemspec
|
4
4
|
|
@@ -7,51 +7,51 @@ group :changelog do
|
|
7
7
|
end
|
8
8
|
|
9
9
|
group :guard do
|
10
|
-
gem
|
11
|
-
gem
|
12
|
-
gem
|
13
|
-
gem
|
14
|
-
gem
|
10
|
+
gem "coolline"
|
11
|
+
gem "guard"
|
12
|
+
gem "guard-cucumber"
|
13
|
+
gem "guard-rspec"
|
14
|
+
gem "guard-spork"
|
15
15
|
|
16
|
-
require
|
16
|
+
require "rbconfig"
|
17
17
|
|
18
|
-
if RbConfig::CONFIG[
|
19
|
-
gem
|
20
|
-
gem
|
18
|
+
if RbConfig::CONFIG["target_os"] =~ /darwin/i
|
19
|
+
gem "growl", require: false
|
20
|
+
gem "rb-fsevent", require: false
|
21
21
|
|
22
|
-
if `uname`.strip ==
|
23
|
-
gem
|
22
|
+
if `uname`.strip == "Darwin" && `sw_vers -productVersion`.strip >= "10.8"
|
23
|
+
gem "terminal-notifier-guard", "~> 1.5.3", require: false
|
24
24
|
end rescue Errno::ENOENT
|
25
25
|
|
26
|
-
elsif RbConfig::CONFIG[
|
27
|
-
gem
|
28
|
-
gem
|
26
|
+
elsif RbConfig::CONFIG["target_os"] =~ /linux/i
|
27
|
+
gem "libnotify", "~> 0.8.0", require: false
|
28
|
+
gem "rb-inotify", require: false
|
29
29
|
|
30
|
-
elsif RbConfig::CONFIG[
|
31
|
-
gem
|
32
|
-
gem
|
33
|
-
gem
|
30
|
+
elsif RbConfig::CONFIG["target_os"] =~ /mswin|mingw/i
|
31
|
+
gem "rb-notifu", ">= 0.0.4", require: false
|
32
|
+
gem "wdm", require: false
|
33
|
+
gem "win32console", require: false
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
37
37
|
group :build do
|
38
|
-
gem
|
38
|
+
gem "rake", ">= 10.1"
|
39
39
|
end
|
40
40
|
|
41
41
|
group :development do
|
42
42
|
# these all deliberately float because berkshelf has a Gemfile.lock that
|
43
43
|
# equality pins them. temporarily pin as necessary for API breaks.
|
44
|
-
gem
|
45
|
-
gem
|
46
|
-
gem
|
47
|
-
gem
|
48
|
-
gem
|
49
|
-
gem
|
50
|
-
gem
|
51
|
-
gem
|
52
|
-
gem
|
53
|
-
gem
|
54
|
-
gem
|
44
|
+
gem "aruba", ">= 0.10.0"
|
45
|
+
gem "chef-zero", ">= 4.0"
|
46
|
+
gem "dep_selector", ">= 1.0"
|
47
|
+
gem "fuubar", ">= 2.0"
|
48
|
+
gem "rspec", ">= 3.0"
|
49
|
+
gem "spork", ">= 0.9"
|
50
|
+
gem "test-kitchen", ">= 1.2"
|
51
|
+
gem "webmock", ">= 1.11"
|
52
|
+
gem "yard", ">= 0.8"
|
53
|
+
gem "http", ">= 0.9.8"
|
54
|
+
gem "activesupport", "~> 4.0" # pinning for ruby 2.1.x
|
55
55
|
end
|
56
56
|
|
57
57
|
group :test do
|
data/Gemfile.lock
CHANGED
@@ -34,7 +34,7 @@ GIT
|
|
34
34
|
PATH
|
35
35
|
remote: .
|
36
36
|
specs:
|
37
|
-
berkshelf (5.
|
37
|
+
berkshelf (5.6.0)
|
38
38
|
addressable (~> 2.3, >= 2.3.4)
|
39
39
|
berkshelf-api-client (>= 2.0.2, < 4.0)
|
40
40
|
buff-config (~> 2.0)
|
@@ -44,7 +44,7 @@ PATH
|
|
44
44
|
faraday (~> 0.9)
|
45
45
|
httpclient (~> 2.7)
|
46
46
|
minitar (~> 0.5, >= 0.5.4)
|
47
|
-
mixlib-archive (~> 0.
|
47
|
+
mixlib-archive (~> 0.4)
|
48
48
|
octokit (~> 4.0)
|
49
49
|
retryable (~> 2.0)
|
50
50
|
ridley (~> 5.0)
|
@@ -213,7 +213,7 @@ GEM
|
|
213
213
|
method_source (0.8.2)
|
214
214
|
minitar (0.5.4)
|
215
215
|
minitest (5.10.1)
|
216
|
-
mixlib-archive (0.
|
216
|
+
mixlib-archive (0.4.1)
|
217
217
|
mixlib-log
|
218
218
|
mixlib-authentication (1.4.1)
|
219
219
|
mixlib-log
|
data/Guardfile
CHANGED
@@ -1,23 +1,23 @@
|
|
1
|
-
guard
|
2
|
-
watch(
|
3
|
-
watch(
|
1
|
+
guard "spork" do
|
2
|
+
watch("Gemfile")
|
3
|
+
watch("spec/spec_helper.rb") { :rspec }
|
4
4
|
watch(%r{^features/support/}) { :cucumber }
|
5
5
|
end
|
6
6
|
|
7
|
-
rspec_cli =
|
8
|
-
rspec_cli +=
|
9
|
-
guard
|
7
|
+
rspec_cli = "--color --drb --format Fuubar"
|
8
|
+
rspec_cli += " --tag ~@api_client --tag ~@not_supported_on_windows" if RUBY_PLATFORM =~ /mswin|mingw|windows/
|
9
|
+
guard "rspec", cli: rspec_cli, all_on_start: false, all_after_pass: false do
|
10
10
|
watch(%r{^spec/unit/.+_spec\.rb$})
|
11
11
|
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/unit/#{m[1]}_spec.rb" }
|
12
|
-
watch(
|
12
|
+
watch("spec/spec_helper.rb") { "spec" }
|
13
13
|
end
|
14
14
|
|
15
|
-
cucumber_cli =
|
16
|
-
cucumber_cli +=
|
17
|
-
guard
|
15
|
+
cucumber_cli = "--drb --format pretty --tags ~@no_run --tags ~@wip"
|
16
|
+
cucumber_cli += " --tags ~@spawn --tags ~@api_server" if RUBY_PLATFORM =~ /mswin|mingw|windows/
|
17
|
+
guard "cucumber", cli: cucumber_cli, all_on_start: false, all_after_pass: false do
|
18
18
|
watch(%r{^features/.+\.feature$})
|
19
|
-
watch(%r{^features/support/.+$}) {
|
20
|
-
watch(%r{^features/step_definitions/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] ||
|
19
|
+
watch(%r{^features/support/.+$}) { "features" }
|
20
|
+
watch(%r{^features/step_definitions/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || "features" }
|
21
21
|
|
22
|
-
watch(%r{^lib/berkshelf/cli.rb}) {
|
22
|
+
watch(%r{^lib/berkshelf/cli.rb}) { "features" }
|
23
23
|
end
|
data/Rakefile
CHANGED
@@ -28,6 +28,7 @@ begin
|
|
28
28
|
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
|
29
29
|
config.future_release = Berkshelf::VERSION
|
30
30
|
config.issues = false
|
31
|
+
config.max_issues = 0
|
31
32
|
config.enhancement_labels = "enhancement,Enhancement,New Feature,Feature".split(",")
|
32
33
|
config.bug_labels = "bug,Bug,Improvement".split(",")
|
33
34
|
config.exclude_labels = "duplicate,question,invalid,wontfix,no_changelog,Exclude From Changelog,Question,Upstream Bug,Discussion".split(",")
|
data/Thorfile
CHANGED
@@ -1,26 +1,26 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
$:.unshift File.expand_path(
|
2
|
+
$:.unshift File.expand_path("../lib", __FILE__)
|
3
3
|
|
4
|
-
require
|
5
|
-
require
|
4
|
+
require "bundler"
|
5
|
+
require "thor/rake_compat"
|
6
6
|
|
7
7
|
class Gem < Thor
|
8
8
|
include Thor::RakeCompat
|
9
9
|
Bundler::GemHelper.install_tasks
|
10
10
|
|
11
|
-
desc
|
11
|
+
desc "build", "Build berkshelf-#{Berkshelf::VERSION}.gem into the pkg directory"
|
12
12
|
def build
|
13
|
-
Rake::Task[
|
13
|
+
Rake::Task["build"].execute
|
14
14
|
end
|
15
15
|
|
16
|
-
desc
|
16
|
+
desc "install", "Build and install berkshelf-#{Berkshelf::VERSION}.gem into system gems"
|
17
17
|
def install
|
18
|
-
Rake::Task[
|
18
|
+
Rake::Task["install"].execute
|
19
19
|
end
|
20
20
|
|
21
|
-
desc
|
21
|
+
desc "release", "Create tag v#{Berkshelf::VERSION} and build and push berkshelf-#{Berkshelf::VERSION}.gem to Rubygems"
|
22
22
|
def release
|
23
|
-
Rake::Task[
|
23
|
+
Rake::Task["release"].execute
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
@@ -28,34 +28,34 @@ class Spec < Thor
|
|
28
28
|
include Thor::Actions
|
29
29
|
default_task :all
|
30
30
|
|
31
|
-
desc
|
31
|
+
desc "all", "Run all specs and features"
|
32
32
|
def all
|
33
33
|
exit(units_command && acceptance_command)
|
34
34
|
end
|
35
35
|
|
36
|
-
desc
|
36
|
+
desc "ci", "Run tests on Travis"
|
37
37
|
def ci
|
38
|
-
ENV[
|
38
|
+
ENV["CI"] = "true" # Travis-CI also sets this, but set it here for local testing
|
39
39
|
all
|
40
40
|
end
|
41
41
|
|
42
|
-
desc
|
42
|
+
desc "unit", "Run unit tests"
|
43
43
|
def unit
|
44
44
|
exit(units_command)
|
45
45
|
end
|
46
46
|
|
47
|
-
desc
|
47
|
+
desc "acceptance", "Run acceptance tests"
|
48
48
|
def acceptance
|
49
49
|
exit(acceptance_command)
|
50
50
|
end
|
51
51
|
|
52
52
|
no_tasks do
|
53
53
|
def units_command
|
54
|
-
run(
|
54
|
+
run("rspec --color --format progress spec/unit")
|
55
55
|
end
|
56
56
|
|
57
57
|
def acceptance_command
|
58
|
-
run(
|
58
|
+
run("cucumber --color --format progress --tags ~@no_run --strict")
|
59
59
|
end
|
60
60
|
end
|
61
61
|
end
|
data/berkshelf.gemspec
CHANGED
@@ -1,48 +1,48 @@
|
|
1
1
|
# -*- encoding: utf-8; mode: ruby -*-
|
2
|
-
require File.expand_path(
|
2
|
+
require File.expand_path("../lib/berkshelf/version", __FILE__)
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
|
-
s.authors
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
5
|
+
s.authors = [
|
6
|
+
"Jamie Winsor",
|
7
|
+
"Josiah Kiehl",
|
8
|
+
"Michael Ivey",
|
9
|
+
"Justin Campbell",
|
10
|
+
"Seth Vargo",
|
11
11
|
]
|
12
|
-
s.email
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
12
|
+
s.email = [
|
13
|
+
"jamie@vialstudios.com",
|
14
|
+
"jkiehl@riotgames.com",
|
15
|
+
"michael.ivey@riotgames.com",
|
16
|
+
"justin@justincampbell.me",
|
17
|
+
"sethvargo@gmail.com",
|
18
18
|
]
|
19
19
|
|
20
20
|
s.description = %q{Manages a Cookbook's, or an Application's, Cookbook dependencies}
|
21
21
|
s.summary = s.description
|
22
|
-
s.homepage =
|
23
|
-
s.license =
|
22
|
+
s.homepage = "http://berkshelf.com"
|
23
|
+
s.license = "Apache 2.0"
|
24
24
|
s.files = `git ls-files`.split($\)
|
25
|
-
s.executables = s.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
25
|
+
s.executables = s.files.grep(%r{^bin/}).map { |f| File.basename(f) }
|
26
26
|
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
27
|
-
s.name =
|
28
|
-
s.require_paths = [
|
27
|
+
s.name = "berkshelf"
|
28
|
+
s.require_paths = ["lib"]
|
29
29
|
s.version = Berkshelf::VERSION
|
30
|
-
s.required_ruby_version =
|
31
|
-
s.required_rubygems_version =
|
30
|
+
s.required_ruby_version = ">= 2.2.0"
|
31
|
+
s.required_rubygems_version = ">= 2.0.0"
|
32
32
|
|
33
|
-
s.add_dependency
|
34
|
-
s.add_dependency
|
35
|
-
s.add_dependency
|
36
|
-
s.add_dependency
|
37
|
-
s.add_dependency
|
38
|
-
s.add_dependency
|
39
|
-
s.add_dependency
|
40
|
-
s.add_dependency
|
41
|
-
s.add_dependency
|
42
|
-
s.add_dependency
|
43
|
-
s.add_dependency
|
44
|
-
s.add_dependency
|
45
|
-
s.add_dependency
|
46
|
-
s.add_dependency
|
47
|
-
s.add_dependency
|
33
|
+
s.add_dependency "addressable", "~> 2.3", ">= 2.3.4"
|
34
|
+
s.add_dependency "berkshelf-api-client", ">= 2.0.2", "< 4.0"
|
35
|
+
s.add_dependency "buff-config", "~> 2.0"
|
36
|
+
s.add_dependency "buff-extensions", "~> 2.0"
|
37
|
+
s.add_dependency "buff-shell_out", "~> 1.0"
|
38
|
+
s.add_dependency "cleanroom", "~> 1.0"
|
39
|
+
s.add_dependency "faraday", "~> 0.9"
|
40
|
+
s.add_dependency "httpclient", "~> 2.7"
|
41
|
+
s.add_dependency "minitar", "~> 0.5", ">= 0.5.4"
|
42
|
+
s.add_dependency "retryable", "~> 2.0"
|
43
|
+
s.add_dependency "ridley", "~> 5.0"
|
44
|
+
s.add_dependency "solve", "> 2.0", "< 4.0"
|
45
|
+
s.add_dependency "thor", "~> 0.19", "< 0.19.2"
|
46
|
+
s.add_dependency "octokit", "~> 4.0"
|
47
|
+
s.add_dependency "mixlib-archive", "~> 0.4"
|
48
48
|
end
|
@@ -1,12 +1,12 @@
|
|
1
1
|
Given(/^I do not have a Berkshelf config$/) do
|
2
|
-
FileUtils.rm_f(ENV[
|
2
|
+
FileUtils.rm_f(ENV["BERKSHELF_CONFIG"])
|
3
3
|
end
|
4
4
|
|
5
5
|
Given /^I do not have a Chef config$/ do
|
6
|
-
path = tmp_path.join(
|
6
|
+
path = tmp_path.join("knife.rb").to_s
|
7
7
|
Berkshelf.chef_config = Ridley::Chef::Config.new(path)
|
8
8
|
Berkshelf.chef_config.save
|
9
9
|
|
10
|
-
ENV[
|
11
|
-
set_environment_variable
|
10
|
+
ENV["BERKSHELF_CHEF_CONFIG"] = path
|
11
|
+
set_environment_variable "BERKSHELF_CHEF_CONFIG", path
|
12
12
|
end
|
@@ -9,27 +9,27 @@ Given /^the Chef Server has cookbooks:$/ do |cookbooks|
|
|
9
9
|
metadata = []
|
10
10
|
metadata << "name '#{name}'"
|
11
11
|
metadata << "version '#{version}'"
|
12
|
-
dependencies.to_s.split(
|
12
|
+
dependencies.to_s.split(",").map { |d| d.split(" ", 2) }.each do |(name, constraint)|
|
13
13
|
metadata << "depends '#{name}', '#{constraint}'"
|
14
14
|
end
|
15
15
|
|
16
|
-
chef_cookbook(name, {
|
16
|
+
chef_cookbook(name, { "metadata.rb" => metadata.join("\n") })
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
20
|
Given /^the Chef Server has frozen cookbooks:$/ do |cookbooks|
|
21
21
|
cookbooks.raw.each do |name, version|
|
22
|
-
chef_cookbook(name, {
|
22
|
+
chef_cookbook(name, { "metadata.rb" => "version '#{version}'", frozen: true })
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
26
|
Given(/^the Chef Server has an environment named "(.*?)"$/) do |name|
|
27
|
-
chef_environment(name, {
|
27
|
+
chef_environment(name, { "description" => "This is an environment" })
|
28
28
|
end
|
29
29
|
|
30
30
|
Given(/^the Chef Server does not have an environment named "(.*?)"$/) do |name|
|
31
|
-
if chef_server.data_store.exists?([
|
32
|
-
chef_server.data_store.delete([
|
31
|
+
if chef_server.data_store.exists?(["organizations", "chef", "environments", name])
|
32
|
+
chef_server.data_store.delete(["organizations", "chef", "environments", name])
|
33
33
|
end
|
34
34
|
end
|
35
35
|
|
@@ -1,18 +1,18 @@
|
|
1
1
|
Then /^the exit status should be "(.+)"$/ do |name|
|
2
|
-
error = name.split(
|
2
|
+
error = name.split("::").reduce(Berkshelf) { |klass, id| klass.const_get(id) }
|
3
3
|
expect(last_command_started).to have_exit_status(error.status_code)
|
4
4
|
end
|
5
5
|
|
6
6
|
Then /^the results should have the cookbooks:$/ do |cookbooks|
|
7
7
|
list = last_command_started.stdout
|
8
8
|
cookbooks.split("\n").each do |cookbook|
|
9
|
-
expect(list).to
|
9
|
+
expect(list).to include(cookbook)
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
13
13
|
Then /^the results should each start with "(.+)"$/ do |prefix|
|
14
14
|
list = last_command_started.stdout
|
15
15
|
list.split("\n").each do |cookbook|
|
16
|
-
expect(cookbook).to
|
16
|
+
expect(cookbook).to start_with(prefix)
|
17
17
|
end
|
18
18
|
end
|
@@ -1,21 +1,21 @@
|
|
1
|
-
require
|
1
|
+
require "tempfile"
|
2
2
|
|
3
3
|
Given /^I already have a Berkshelf config file$/ do
|
4
|
-
path = Tempfile.new(
|
4
|
+
path = Tempfile.new("berkshelf").path
|
5
5
|
config = Berkshelf::Config.new(path)
|
6
6
|
config.save
|
7
7
|
|
8
8
|
Berkshelf.config = config
|
9
9
|
|
10
|
-
ENV[
|
11
|
-
set_environment_variable
|
10
|
+
ENV["BERKSHELF_CONFIG"] = path
|
11
|
+
set_environment_variable "BERKSHELF_CONFIG", path
|
12
12
|
end
|
13
13
|
|
14
14
|
Given /^I have a Berkshelf config file containing:$/ do |contents|
|
15
15
|
path = Berkshelf.config.path
|
16
16
|
FileUtils.mkdir_p(Pathname.new(path).dirname.to_s)
|
17
17
|
|
18
|
-
File.open(path,
|
18
|
+
File.open(path, "w+") { |f| f.write(contents) }
|
19
19
|
|
20
20
|
Berkshelf.config = Berkshelf::Config.from_file(path)
|
21
21
|
end
|