cucumber-chef 2.1.0.rc.4 → 2.1.0.rc.5
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.
- data/.travis.yml +8 -9
- data/bin/cucumber-chef +1 -0
- data/lib/cucumber/chef/helpers/chef_client.rb +5 -2
- data/lib/cucumber/chef/helpers/server.rb +1 -0
- data/lib/cucumber/chef/steps/chef_steps.rb +20 -1
- data/lib/cucumber/chef/steps/provision_steps.rb +1 -0
- data/lib/cucumber/chef/version.rb +1 -1
- metadata +2 -2
data/.travis.yml
CHANGED
@@ -4,16 +4,15 @@ rvm:
|
|
4
4
|
- 1.9.2
|
5
5
|
- 1.9.3
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
- master
|
10
|
-
|
11
|
-
notifications:
|
12
|
-
irc:
|
13
|
-
- "irc.freenode.org#cucumber-chef"
|
7
|
+
before_install:
|
8
|
+
- sudo apt-get -qq update
|
14
9
|
|
15
10
|
before_script:
|
16
11
|
- mkdir -p $HOME/.chef/
|
17
12
|
|
18
|
-
|
19
|
-
|
13
|
+
bundler_args: --binstubs
|
14
|
+
|
15
|
+
script: "rake spec"
|
16
|
+
|
17
|
+
notifications:
|
18
|
+
irc: "irc.freenode.net#jovelabs"
|
data/bin/cucumber-chef
CHANGED
@@ -514,6 +514,7 @@ class CucumberChef < Thor
|
|
514
514
|
"root_dir" => Cucumber::Chef.root_dir,
|
515
515
|
"home_dir" => Cucumber::Chef.home_dir,
|
516
516
|
"log_file" => Cucumber::Chef.log_file,
|
517
|
+
"artifacts_dir" => Cucumber::Chef.artifacts_dir,
|
517
518
|
"config_rb" => Cucumber::Chef.config_rb,
|
518
519
|
"containers_bin" => Cucumber::Chef.containers_bin,
|
519
520
|
"knife_rb" => Cucumber::Chef.knife_rb,
|
@@ -62,12 +62,15 @@ module Cucumber::Chef::Helpers::ChefClient
|
|
62
62
|
arguments = {
|
63
63
|
"--node-name" => name,
|
64
64
|
"--json-attributes" => File.join("/etc", "chef", "attributes.json").to_s,
|
65
|
-
"--log_level" =>
|
65
|
+
"--log_level" => @chef_client_config[:log_level],
|
66
|
+
"--logfile" => @chef_client_config[:log_location],
|
67
|
+
"--server" => @chef_client_config[:chef_server_url],
|
68
|
+
"--environment" => @chef_client_config[:environment]
|
66
69
|
}.reject{ |k,v| v.nil? }.sort
|
67
70
|
|
68
71
|
output = nil
|
69
72
|
bm = ::Benchmark.realtime do
|
70
|
-
output = command_run_chroot(name, ["/usr/bin/chef-client", arguments, args].flatten.join(" "))
|
73
|
+
output = command_run_chroot(name, ["/usr/bin/chef-client", arguments, args, "--once"].flatten.join(" "))
|
71
74
|
end
|
72
75
|
logger.info { "Chef client run on container '#{name}' took %0.4f seconds." % bm }
|
73
76
|
|
@@ -23,11 +23,20 @@ And /^the following (databag|databags) (has|have) been (updated|uploaded):$/ do
|
|
23
23
|
table.hashes.each do |entry|
|
24
24
|
data_bag = entry['databag']
|
25
25
|
data_bag_path = entry['databag_path']
|
26
|
+
$test_lab.knife_cli(%Q{data bag create "#{data_bag}"}, :silence => true)
|
27
|
+
$test_lab.knife_cli(%Q{data bag from file "#{data_bag}" "#{data_bag_path}"}, :silence => true)
|
28
|
+
end
|
29
|
+
end
|
26
30
|
|
27
|
-
|
31
|
+
And /^the following (databag|databags) (has|have) been (deleted|removed):$/ do |ignore0, ignore1, ignore2, table|
|
32
|
+
table.hashes.each do |entry|
|
33
|
+
data_bag = entry['databag']
|
34
|
+
$test_lab.knife_cli(%Q{data bag delete "#{data_bag}" --yes}, :silence => true)
|
28
35
|
end
|
29
36
|
end
|
30
37
|
|
38
|
+
################################################################################
|
39
|
+
|
31
40
|
And /^the following (role|roles) (has|have) been (updated|uploaded):$/ do |ignore0, ignore1, ignore2, table|
|
32
41
|
table.hashes.each do |entry|
|
33
42
|
role = entry['role']
|
@@ -43,6 +52,8 @@ And /^the following (role|roles) (has|have) been (updated|uploaded):$/ do |ignor
|
|
43
52
|
end
|
44
53
|
end
|
45
54
|
|
55
|
+
################################################################################
|
56
|
+
|
46
57
|
And /^the following (cookbook|cookbooks) (has|have) been (updated|uploaded):$/ do |ignore0, ignore1, ignore2, table|
|
47
58
|
cookbooks = table.hashes.inject(Hash.new) do |memo, entry|
|
48
59
|
cookbook = entry['cookbook']
|
@@ -56,6 +67,12 @@ And /^the following (cookbook|cookbooks) (has|have) been (updated|uploaded):$/ d
|
|
56
67
|
end
|
57
68
|
end
|
58
69
|
|
70
|
+
And /^all of the cookbooks in "([^\"]*)" (has|have) been (updated|uploaded)$/ do |cookbook_path, ignore0, ignore1|
|
71
|
+
$test_lab.knife_cli(%Q{cookbook upload -a -o #{cookbook_path}}, :silence => true)
|
72
|
+
end
|
73
|
+
|
74
|
+
################################################################################
|
75
|
+
|
59
76
|
And /^the following (environment|environments) (has|have) been (updated|uploaded):$/ do |ignore0, ignore1, ignore2, table|
|
60
77
|
table.hashes.each do |entry|
|
61
78
|
environment = entry['environment']
|
@@ -70,3 +87,5 @@ And /^the following (environment|environments) (has|have) been (updated|uploaded
|
|
70
87
|
end
|
71
88
|
end
|
72
89
|
end
|
90
|
+
|
91
|
+
################################################################################
|
@@ -60,6 +60,7 @@ And /^"([^\"]*)" is in the "([^\"]*)" environment$/ do |name, environment|
|
|
60
60
|
end
|
61
61
|
|
62
62
|
And /^the chef-client has been run on "([^\"]*)"$/ do |name|
|
63
|
+
$test_lab.knife_cli(%Q{index rebuild --yes --verbose})
|
63
64
|
$test_lab.drb.chef_run_client(name)
|
64
65
|
chef_client_artifacts(name)
|
65
66
|
end
|
@@ -24,7 +24,7 @@ module Cucumber
|
|
24
24
|
|
25
25
|
################################################################################
|
26
26
|
|
27
|
-
VERSION = "2.1.0.rc.
|
27
|
+
VERSION = "2.1.0.rc.5" unless const_defined?(:VERSION)
|
28
28
|
|
29
29
|
################################################################################
|
30
30
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cucumber-chef
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.0.rc.
|
4
|
+
version: 2.1.0.rc.5
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-01-
|
13
|
+
date: 2013-01-29 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: chef
|