berkshelf 7.0.7 → 7.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Rakefile +1 -1
- data/berkshelf.gemspec +8 -9
- data/bin/berks +5 -0
- data/lib/berkshelf/cached_cookbook.rb +1 -1
- data/lib/berkshelf/chef_config_compat.rb +1 -0
- data/lib/berkshelf/chef_repo_universe.rb +2 -2
- data/lib/berkshelf/formatters/json.rb +3 -3
- data/lib/berkshelf/lockfile.rb +3 -3
- data/lib/berkshelf/uploader.rb +3 -3
- data/lib/berkshelf/version.rb +1 -1
- metadata +32 -186
- data/.github/lock.yml +0 -1
- data/.gitignore +0 -30
- data/.rubocop.yml +0 -12
- data/.travis.yml +0 -73
- data/CHANGELOG.legacy.md +0 -307
- data/CHANGELOG.md +0 -1589
- data/CONTRIBUTING.md +0 -68
- data/Gemfile.lock +0 -292
- data/PLUGINS.md +0 -25
- data/README.md +0 -72
- data/Thorfile +0 -61
- data/appveyor.yml +0 -31
- data/docs/berkshelf_for_newcomers.md +0 -64
- data/features/artifactory.feature +0 -70
- data/features/berksfile.feature +0 -46
- data/features/commands/apply.feature +0 -41
- data/features/commands/contingent.feature +0 -47
- data/features/commands/info.feature +0 -141
- data/features/commands/install.feature +0 -646
- data/features/commands/list.feature +0 -78
- data/features/commands/outdated.feature +0 -176
- data/features/commands/package.feature +0 -17
- data/features/commands/search.feature +0 -17
- data/features/commands/shelf/list.feature +0 -32
- data/features/commands/shelf/show.feature +0 -113
- data/features/commands/shelf/uninstall.feature +0 -96
- data/features/commands/show.feature +0 -83
- data/features/commands/update.feature +0 -142
- data/features/commands/upload.feature +0 -499
- data/features/commands/vendor.feature +0 -154
- data/features/commands/verify.feature +0 -29
- data/features/commands/viz.feature +0 -66
- data/features/community_site.feature +0 -37
- data/features/help.feature +0 -11
- data/features/json_formatter.feature +0 -158
- data/features/lifecycle.feature +0 -378
- data/features/lockfile.feature +0 -378
- data/features/step_definitions/berksfile_steps.rb +0 -54
- data/features/step_definitions/chef/config_steps.rb +0 -12
- data/features/step_definitions/chef_server_steps.rb +0 -60
- data/features/step_definitions/cli_steps.rb +0 -18
- data/features/step_definitions/config_steps.rb +0 -46
- data/features/step_definitions/environment_steps.rb +0 -11
- data/features/step_definitions/filesystem_steps.rb +0 -286
- data/features/step_definitions/gem_steps.rb +0 -13
- data/features/step_definitions/json_steps.rb +0 -29
- data/features/step_definitions/utility_steps.rb +0 -11
- data/features/support/aruba.rb +0 -12
- data/features/support/env.rb +0 -77
- data/spec/fixtures/cookbooks/example_cookbook/.gitignore +0 -2
- data/spec/fixtures/cookbooks/example_cookbook/.kitchen.yml +0 -26
@@ -1,13 +0,0 @@
|
|
1
|
-
Given /^the gem "(.*)" is not installed$/ do |gem_name|
|
2
|
-
allow(Gem::Specification).to receive(:find_by_name)
|
3
|
-
.with(gem_name)
|
4
|
-
.and_raise(Gem::LoadError)
|
5
|
-
end
|
6
|
-
|
7
|
-
Then /^the output should contain a warning to suggest supporting the option "(.*?)" by installing "(.*?)"$/ do |option, gem_name|
|
8
|
-
step "the output should contain \"This cookbook was generated with --#{option}, however, #{gem_name} is not installed.\nTo make use of --#{option}: gem install #{gem_name}\""
|
9
|
-
end
|
10
|
-
|
11
|
-
Then /^the output should contain a warning to suggest supporting the default for "(.*?)" by installing "(.*?)"$/ do |option, gem_name|
|
12
|
-
step "the output should contain \"By default, this cookbook was generated to support #{gem_name}, however, #{gem_name} is not installed.\nTo skip support for #{gem_name}, use --no-#{option}\"\nTo install #{gem_name}: gem install #{gem_name}"
|
13
|
-
end
|
@@ -1,29 +0,0 @@
|
|
1
|
-
class Hash
|
2
|
-
def sort_by_key(&block)
|
3
|
-
keys.sort(&block).reduce({}) do |seed, key|
|
4
|
-
seed[key] = self[key]
|
5
|
-
if seed[key].is_a?(Hash)
|
6
|
-
seed[key] = seed[key].sort_by_key(&block)
|
7
|
-
elsif seed[key].is_a?(Array)
|
8
|
-
seed[key] = seed[key].map do |i|
|
9
|
-
i.respond_to?(:sort_by_key) ? i.sort_by_key(&block) : i
|
10
|
-
end
|
11
|
-
end
|
12
|
-
seed
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
# Pending Ridley allowing newer Faraday and Celluloid.
|
18
|
-
def clean_json_output(output)
|
19
|
-
output.gsub(/^.+warning: constant ::Fixnum is deprecated$/, "") \
|
20
|
-
.gsub(/^.*forwarding to private method Celluloid::PoolManager#url_prefix$/, "")
|
21
|
-
end
|
22
|
-
|
23
|
-
Then /^the output should contain JSON:$/ do |data|
|
24
|
-
parsed = ERB.new(data).result
|
25
|
-
target = JSON.pretty_generate(JSON.parse(parsed).sort_by_key)
|
26
|
-
actual = JSON.pretty_generate(JSON.parse(all_commands.map { |c| clean_json_output(c.output) }.join("\n")).sort_by_key)
|
27
|
-
|
28
|
-
expect(actual).to eq(target)
|
29
|
-
end
|
@@ -1,11 +0,0 @@
|
|
1
|
-
Given /^skip\s+"([^\"]+)"$/ do |msg|
|
2
|
-
skip
|
3
|
-
end
|
4
|
-
|
5
|
-
Then /the output from \`(.+)\` should be the same as \`(.+)\`/ do |actual, expected|
|
6
|
-
run(actual)
|
7
|
-
actual_output = last_command_started.stdout
|
8
|
-
run(expected)
|
9
|
-
expected_output = last_command_started.stdout
|
10
|
-
expect(actual_output).to eql(expected_output)
|
11
|
-
end
|
data/features/support/aruba.rb
DELETED
data/features/support/env.rb
DELETED
@@ -1,77 +0,0 @@
|
|
1
|
-
def windows?
|
2
|
-
!!(RUBY_PLATFORM =~ /mswin|mingw|windows/)
|
3
|
-
end
|
4
|
-
|
5
|
-
require "aruba/cucumber"
|
6
|
-
require "aruba/in_process"
|
7
|
-
require "aruba/spawn_process"
|
8
|
-
require "cucumber/rspec/doubles"
|
9
|
-
|
10
|
-
Dir["spec/support/**/*.rb"].each { |f| require File.expand_path(f) }
|
11
|
-
|
12
|
-
World(Berkshelf::RSpec::PathHelpers)
|
13
|
-
|
14
|
-
# these tests used to start a chef-zero server on one port, and a berks-api server on another port
|
15
|
-
# they now start a chef-zero server that supports the universe endpoint on one port.
|
16
|
-
#
|
17
|
-
# if there becomes a need to integration test talking to a supermarket/universe endpoint and then
|
18
|
-
# talking to a separate chef-server, then these features could be split back up again, but the
|
19
|
-
# Berkshelf::RSpec::ChefServer helper class would need to support managing multiple chef-zero servers.
|
20
|
-
CHEF_SERVER_PORT = 26310
|
21
|
-
BERKS_API_PORT = 26310
|
22
|
-
|
23
|
-
at_exit do
|
24
|
-
Berkshelf::RSpec::ChefServer.stop
|
25
|
-
end
|
26
|
-
|
27
|
-
Before do
|
28
|
-
|
29
|
-
# Legacy ENV variables until we can move over to all InProcess
|
30
|
-
Berkshelf.instance_variable_set(:@berkshelf_path, nil)
|
31
|
-
ENV["BERKSHELF_PATH"] = berkshelf_path.to_s
|
32
|
-
ENV["BERKSHELF_CONFIG"] = Berkshelf.config.path.to_s
|
33
|
-
ENV["BERKSHELF_CHEF_CONFIG"] = chef_config_path.to_s
|
34
|
-
|
35
|
-
aruba.config.command_launcher = :in_process
|
36
|
-
aruba.config.main_class = Berkshelf::Cli::Runner
|
37
|
-
@dirs = ["spec/tmp/aruba"] # set aruba's temporary directory
|
38
|
-
|
39
|
-
clean_tmp_path
|
40
|
-
Berkshelf.initialize_filesystem
|
41
|
-
Berkshelf::CookbookStore.instance.initialize_filesystem
|
42
|
-
reload_configs
|
43
|
-
Berkshelf::CachedCookbook.instance_variable_set(:@loaded_cookbooks, nil)
|
44
|
-
|
45
|
-
# This appears to be dead code
|
46
|
-
# endpoints = [
|
47
|
-
# {
|
48
|
-
# type: "chef_server",
|
49
|
-
# options: {
|
50
|
-
# url: "http://localhost:#{CHEF_SERVER_PORT}",
|
51
|
-
# client_name: "reset",
|
52
|
-
# client_key: File.expand_path("spec/config/berkshelf.pem"),
|
53
|
-
# },
|
54
|
-
# },
|
55
|
-
# ]
|
56
|
-
|
57
|
-
Berkshelf::RSpec::ChefServer.start(port: CHEF_SERVER_PORT)
|
58
|
-
|
59
|
-
aruba.config.io_wait_timeout = Cucumber::JRUBY ? 7 : 5
|
60
|
-
@aruba_timeout_seconds = Cucumber::JRUBY ? 35 : 15
|
61
|
-
end
|
62
|
-
|
63
|
-
Before("@spawn") do
|
64
|
-
aruba.config.command_launcher = :spawn
|
65
|
-
|
66
|
-
Berkshelf.instance_variable_set(:@berkshelf_path, nil)
|
67
|
-
set_environment_variable("BERKSHELF_PATH", berkshelf_path.to_s)
|
68
|
-
set_environment_variable("BERKSHELF_CONFIG", Berkshelf.config.path.to_s)
|
69
|
-
set_environment_variable("BERKSHELF_CHEF_CONFIG", chef_config_path.to_s)
|
70
|
-
end
|
71
|
-
|
72
|
-
Before("@slow_process") do
|
73
|
-
aruba.config.io_wait_timeout = Cucumber::JRUBY ? 70 : 30
|
74
|
-
@aruba_timeout_seconds = Cucumber::JRUBY ? 140 : 60
|
75
|
-
end
|
76
|
-
|
77
|
-
require "berkshelf/cli"
|
@@ -1,26 +0,0 @@
|
|
1
|
-
---
|
2
|
-
driver_plugin: vagrant
|
3
|
-
|
4
|
-
platforms:
|
5
|
-
- name: ubuntu-12.04
|
6
|
-
driver_config:
|
7
|
-
box: canonical-ubuntu-12.04
|
8
|
-
box_url: http://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-amd64-vagrant-disk1.box
|
9
|
-
require_chef_omnibus: true
|
10
|
-
- name: ubuntu-10.04
|
11
|
-
driver_config:
|
12
|
-
box: opscode-ubuntu-10.04
|
13
|
-
box_url: http://opscode-vm.s3.amazonaws.com/vagrant/opscode_ubuntu-10.04_chef-11.2.0.box
|
14
|
-
- name: centos-6.3
|
15
|
-
driver_config:
|
16
|
-
box: opscode-centos-6.3
|
17
|
-
box_url: http://opscode-vm.s3.amazonaws.com/vagrant/opscode_centos-6.3_chef-11.2.0.box
|
18
|
-
- name: centos-5.8
|
19
|
-
driver_config:
|
20
|
-
box: opscode-centos-5.8
|
21
|
-
box_url: http://opscode-vm.s3.amazonaws.com/vagrant/opscode_centos-5.8_chef-11.2.0.box
|
22
|
-
|
23
|
-
suites:
|
24
|
-
- name: default
|
25
|
-
run_list: []
|
26
|
-
attributes: {}
|