summaryrefslogtreecommitdiff
path: root/spec/integration/knife
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-02-05 15:00:00 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2016-02-05 15:00:00 -0800
commit686113531d23f30e9973d659c456ae33eb9cff1f (patch)
treef225de7251a8b49b8d183dd168bab0a0addbe23f /spec/integration/knife
parentd1cf34b059a16a81e0fc48de52ba29863bb41fe6 (diff)
downloadchef-686113531d23f30e9973d659c456ae33eb9cff1f.tar.gz
autofixing whitespace cops
4174 Style/SpaceInsideHashLiteralBraces 1860 Style/SpaceAroundOperators 1336 Style/SpaceInsideBlockBraces 1292 Style/AlignHash 997 Style/SpaceAfterComma 860 Style/SpaceAroundEqualsInParameterDefault 310 Style/EmptyLines 294 Style/IndentationConsistency 267 Style/TrailingWhitespace 238 Style/ExtraSpacing 212 Style/SpaceBeforeBlockBraces 166 Style/MultilineOperationIndentation 144 Style/TrailingBlankLines 120 Style/EmptyLineBetweenDefs 101 Style/IndentationWidth 82 Style/SpaceAroundBlockParameters 40 Style/EmptyLinesAroundMethodBody 29 Style/EmptyLinesAroundAccessModifier 1 Style/RescueEnsureAlignment
Diffstat (limited to 'spec/integration/knife')
-rw-r--r--spec/integration/knife/chef_fs_data_store_spec.rb8
-rw-r--r--spec/integration/knife/cookbook_api_ipv6_spec.rb4
-rw-r--r--spec/integration/knife/delete_spec.rb2
-rw-r--r--spec/integration/knife/diff_spec.rb4
-rw-r--r--spec/integration/knife/download_spec.rb8
-rw-r--r--spec/integration/knife/raw_spec.rb4
-rw-r--r--spec/integration/knife/redirection_spec.rb2
-rw-r--r--spec/integration/knife/show_spec.rb2
-rw-r--r--spec/integration/knife/upload_spec.rb19
9 files changed, 26 insertions, 27 deletions
diff --git a/spec/integration/knife/chef_fs_data_store_spec.rb b/spec/integration/knife/chef_fs_data_store_spec.rb
index e9a2ea4824..02508b799d 100644
--- a/spec/integration/knife/chef_fs_data_store_spec.rb
+++ b/spec/integration/knife/chef_fs_data_store_spec.rb
@@ -179,7 +179,7 @@ EOM
context "PUT /TYPE/NAME" do
before do
file "empty.json", {}
- file "dummynode.json", { "name" => "x", "chef_environment" => "rspec" , "json_class" => "Chef::Node", "normal" => {"foo" => "bar"}}
+ file "dummynode.json", { "name" => "x", "chef_environment" => "rspec" , "json_class" => "Chef::Node", "normal" => { "foo" => "bar" } }
file "rolestuff.json", '{"description":"hi there","name":"x"}'
file "cookbooks_to_upload/x/metadata.rb", cookbook_x_100_metadata_rb
end
@@ -234,7 +234,7 @@ EOM
context "POST /TYPE/NAME" do
before do
file "empty.json", { "name" => "z" }
- file "dummynode.json", { "name" => "z", "chef_environment" => "rspec" , "json_class" => "Chef::Node", "normal" => {"foo" => "bar"}}
+ file "dummynode.json", { "name" => "z", "chef_environment" => "rspec" , "json_class" => "Chef::Node", "normal" => { "foo" => "bar" } }
file "empty_x.json", { "name" => "x" }
file "empty_id.json", { "id" => "z" }
file "rolestuff.json", '{"description":"hi there","name":"x"}'
@@ -479,7 +479,7 @@ EOM
context "PUT /TYPE/NAME" do
before do
file "empty.json", {}
- file "dummynode.json", { "name" => "x", "chef_environment" => "rspec" , "json_class" => "Chef::Node", "normal" => {"foo" => "bar"}}
+ file "dummynode.json", { "name" => "x", "chef_environment" => "rspec" , "json_class" => "Chef::Node", "normal" => { "foo" => "bar" } }
file "rolestuff.json", '{"description":"hi there","name":"x"}'
file "cookbooks_to_upload/x/metadata.rb", cookbook_x_100_metadata_rb
end
@@ -505,7 +505,7 @@ EOM
context "POST /TYPE/NAME" do
before do
file "empty.json", { "name" => "z" }
- file "dummynode.json", { "name" => "z", "chef_environment" => "rspec" , "json_class" => "Chef::Node", "normal" => {"foo" => "bar"}}
+ file "dummynode.json", { "name" => "z", "chef_environment" => "rspec" , "json_class" => "Chef::Node", "normal" => { "foo" => "bar" } }
file "empty_x.json", { "name" => "x" }
file "empty_id.json", { "id" => "z" }
file "rolestuff.json", '{"description":"hi there","name":"x"}'
diff --git a/spec/integration/knife/cookbook_api_ipv6_spec.rb b/spec/integration/knife/cookbook_api_ipv6_spec.rb
index 3126c93a1c..0a4a6a6e94 100644
--- a/spec/integration/knife/cookbook_api_ipv6_spec.rb
+++ b/spec/integration/knife/cookbook_api_ipv6_spec.rb
@@ -23,7 +23,7 @@ describe "Knife cookbook API integration with IPv6", :workstation, :not_supporte
include Chef::Mixin::ShellOut
when_the_chef_server "is bound to IPv6" do
- let(:chef_zero_opts) { {:host => "::1"} }
+ let(:chef_zero_opts) { { :host => "::1" } }
let(:client_key) do
<<-END_VALIDATION_PEM
@@ -102,7 +102,7 @@ END_CLIENT_RB
it "downloads the cookbook" do
shell_out!("knife cookbook download apache2 #{knife_config_flag} -d #{cache_path}", :cwd => chef_dir)
- expect(Dir["#{cache_path}/*"].map {|entry| File.basename(entry)}).to include("apache2-0.0.1")
+ expect(Dir["#{cache_path}/*"].map { |entry| File.basename(entry) }).to include("apache2-0.0.1")
end
end
diff --git a/spec/integration/knife/delete_spec.rb b/spec/integration/knife/delete_spec.rb
index 9f2accdbfa..d8cb8d950f 100644
--- a/spec/integration/knife/delete_spec.rb
+++ b/spec/integration/knife/delete_spec.rb
@@ -916,7 +916,7 @@ EOM
when_the_chef_server "has an earlier version for the cookbook" do
before do
- cookbook "x", "1.0.0", { "onlyin1.0.0.rb" => ""}
+ cookbook "x", "1.0.0", { "onlyin1.0.0.rb" => "" }
cookbook "x", "0.9.9", { "onlyin0.9.9.rb" => "hi" }
end
diff --git a/spec/integration/knife/diff_spec.rb b/spec/integration/knife/diff_spec.rb
index 3cc2518915..b7d2f4d1c3 100644
--- a/spec/integration/knife/diff_spec.rb
+++ b/spec/integration/knife/diff_spec.rb
@@ -174,7 +174,7 @@ EOM
when_the_chef_server "has a later version for the cookbook" do
before do
- cookbook "x", "1.0.0", { "onlyin1.0.0.rb" => ""}
+ cookbook "x", "1.0.0", { "onlyin1.0.0.rb" => "" }
cookbook "x", "1.0.1", { "onlyin1.0.1.rb" => "" }
end
@@ -470,7 +470,7 @@ EOM
when_the_chef_server "has a later version for the cookbook" do
before do
- cookbook "x", "1.0.0", { "onlyin1.0.0.rb" => ""}
+ cookbook "x", "1.0.0", { "onlyin1.0.0.rb" => "" }
cookbook "x", "1.0.1", { "onlyin1.0.1.rb" => "" }
end
diff --git a/spec/integration/knife/download_spec.rb b/spec/integration/knife/download_spec.rb
index ec322ca01c..2c9f64b61a 100644
--- a/spec/integration/knife/download_spec.rb
+++ b/spec/integration/knife/download_spec.rb
@@ -489,7 +489,7 @@ EOM
when_the_chef_server "has an earlier version for the cookbook" do
before do
- cookbook "x", "1.0.0", { "onlyin1.0.0.rb" => ""}
+ cookbook "x", "1.0.0", { "onlyin1.0.0.rb" => "" }
cookbook "x", "0.9.9", { "onlyin0.9.9.rb" => "hi" }
end
@@ -986,7 +986,7 @@ EOM
when_the_chef_server "has an earlier version for the cookbook" do
before do
- cookbook "x", "1.0.0", { "onlyin1.0.0.rb" => ""}
+ cookbook "x", "1.0.0", { "onlyin1.0.0.rb" => "" }
cookbook "x", "0.9.9", { "onlyin0.9.9.rb" => "hi" }
end
@@ -1254,8 +1254,8 @@ EOM
file "members.json", [ "bar" ]
file "nodes/x.json", {}
file "org.json", { "full_name" => "Something" }
- file "policies/x-1.0.0.json", { }
- file "policies/blah-1.0.0.json", { }
+ file "policies/x-1.0.0.json", {}
+ file "policies/blah-1.0.0.json", {}
file "policy_groups/x.json", { "policies" => { "x" => { "revision_id" => "1.0.0" }, "blah" => { "revision_id" => "1.0.0" } } }
file "roles/x.json", {}
end
diff --git a/spec/integration/knife/raw_spec.rb b/spec/integration/knife/raw_spec.rb
index 8d3499617c..9078bf09a1 100644
--- a/spec/integration/knife/raw_spec.rb
+++ b/spec/integration/knife/raw_spec.rb
@@ -186,7 +186,7 @@ EOM
before :each do
Chef::Config.chef_server_url = "http://localhost:9018"
app = lambda do |env|
- [200, {"Content-Type" => "application/json" }, ['{ "x": "y", "a": "b" }'] ]
+ [200, { "Content-Type" => "application/json" }, ['{ "x": "y", "a": "b" }'] ]
end
@raw_server, @raw_server_thread = start_app_server(app, 9018)
end
@@ -216,7 +216,7 @@ EOM
before :each do
Chef::Config.chef_server_url = "http://localhost:9018"
app = lambda do |env|
- [200, {"Content-Type" => "text" }, ['{ "x": "y", "a": "b" }'] ]
+ [200, { "Content-Type" => "text" }, ['{ "x": "y", "a": "b" }'] ]
end
@raw_server, @raw_server_thread = start_app_server(app, 9018)
end
diff --git a/spec/integration/knife/redirection_spec.rb b/spec/integration/knife/redirection_spec.rb
index 9febfc0ce5..29c1ee6ffb 100644
--- a/spec/integration/knife/redirection_spec.rb
+++ b/spec/integration/knife/redirection_spec.rb
@@ -34,7 +34,7 @@ describe "redirection", :workstation do
real_chef_server_url = Chef::Config.chef_server_url
Chef::Config.chef_server_url = "http://localhost:9018"
app = lambda do |env|
- [302, {"Content-Type" => "text","Location" => "#{real_chef_server_url}#{env['PATH_INFO']}" }, ["302 found"] ]
+ [302, { "Content-Type" => "text", "Location" => "#{real_chef_server_url}#{env['PATH_INFO']}" }, ["302 found"] ]
end
@redirector_server, @redirector_server_thread = start_app_server(app, 9018)
end
diff --git a/spec/integration/knife/show_spec.rb b/spec/integration/knife/show_spec.rb
index a1de48e121..ed4802fef9 100644
--- a/spec/integration/knife/show_spec.rb
+++ b/spec/integration/knife/show_spec.rb
@@ -129,7 +129,7 @@ EOM
before do
environment "x", {
"default_attributes" => { "foo" => "bar" },
- "cookbook_versions" => { "blah" => "= 1.0.0"},
+ "cookbook_versions" => { "blah" => "= 1.0.0" },
"override_attributes" => { "x" => "y" },
"description" => "woo",
"name" => "x",
diff --git a/spec/integration/knife/upload_spec.rb b/spec/integration/knife/upload_spec.rb
index 2ecbd4e64a..6f8dce5ae7 100644
--- a/spec/integration/knife/upload_spec.rb
+++ b/spec/integration/knife/upload_spec.rb
@@ -80,7 +80,7 @@ Deleted extra entry /roles/x.json (purge is on)
Deleted extra entry /users/admin.json (purge is on)
Deleted extra entry /users/x.json (purge is on)
EOM
- knife("diff --name-status /").should_succeed <<EOM
+ knife("diff --name-status /").should_succeed <<EOM
D\t/environments/_default.json
EOM
end
@@ -565,7 +565,7 @@ EOM
when_the_chef_server "has an earlier version for the cookbook" do
before do
- cookbook "x", "1.0.0", { "onlyin1.0.0.rb" => ""}
+ cookbook "x", "1.0.0", { "onlyin1.0.0.rb" => "" }
cookbook "x", "0.9.9", { "onlyin0.9.9.rb" => "hi" }
end
@@ -1129,7 +1129,7 @@ EOM
when_the_chef_server "has an earlier version for the cookbook" do
before do
- cookbook "x", "1.0.0", { "onlyin1.0.0.rb" => ""}
+ cookbook "x", "1.0.0", { "onlyin1.0.0.rb" => "" }
cookbook "x", "0.9.9", { "onlyin0.9.9.rb" => "hi" }
end
it "knife upload /cookbooks uploads the local version" do
@@ -1248,7 +1248,6 @@ EOM
end
end # with versioned cookbooks
-
when_the_chef_server "has a user" do
before do
user "x", {}
@@ -1296,8 +1295,8 @@ EOM
file "members.json", [ "bar" ]
file "org.json", { "full_name" => "wootles" }
file "nodes/x.json", {}
- file "policies/x-1.0.0.json", { }
- file "policies/blah-1.0.0.json", { }
+ file "policies/x-1.0.0.json", {}
+ file "policies/blah-1.0.0.json", {}
file "policy_groups/x.json", { "policies" => { "x" => { "revision_id" => "1.0.0" }, "blah" => { "revision_id" => "1.0.0" } } }
file "roles/x.json", {}
end
@@ -1397,9 +1396,9 @@ EOM
environment "x", { "description" => "foo" }
group "x", { "groups" => [ "admin" ] }
node "x", { "run_list" => [ "blah" ] }
- policy "x", "1.0.0", { }
- policy "x", "1.0.1", { }
- policy "y", "1.0.0", { }
+ policy "x", "1.0.0", {}
+ policy "x", "1.0.1", {}
+ policy "y", "1.0.0", {}
policy_group "x", {
"policies" => {
"x" => { "revision_id" => "1.0.1" },
@@ -1443,7 +1442,7 @@ EOM
when_the_repository "has an org.json that changes full_name" do
before do
- file "org.json", { "full_name" => "Something Else"}
+ file "org.json", { "full_name" => "Something Else" }
end
it "knife upload / emits a warning for bar and adds foo and foobar" do