summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Anderson <mark@chef.io>2019-05-03 16:30:28 -0700
committerMark Anderson <mark@chef.io>2019-05-03 21:40:19 -0700
commita8dcabbb4a527816d4d19784fe2011dad28c470b (patch)
treeba1c78c52215ec02b9fbe52ec6937a317b2e56c0
parentc1fec9e0b6c4195be55e89d749bbffbae470539b (diff)
downloadchef-a8dcabbb4a527816d4d19784fe2011dad28c470b.tar.gz
Use keyword arguments for acceptance
Signed-off-by: Mark Anderson <mark@chef.io>
-rwxr-xr-xchef-bin/bin/chef-apply2
-rwxr-xr-xchef-bin/bin/chef-client2
-rwxr-xr-xchef-bin/bin/chef-solo2
-rw-r--r--lib/chef/application.rb2
-rw-r--r--lib/chef/application/solo.rb2
-rw-r--r--spec/unit/application_spec.rb2
6 files changed, 6 insertions, 6 deletions
diff --git a/chef-bin/bin/chef-apply b/chef-bin/bin/chef-apply
index f9f01710b2..05b975a118 100755
--- a/chef-bin/bin/chef-apply
+++ b/chef-bin/bin/chef-apply
@@ -21,4 +21,4 @@
$:.unshift(File.join(File.dirname(__FILE__), "..", "lib"))
require "chef/application/apply"
-Chef::Application::Apply.new.run(true)
+Chef::Application::Apply.new.run(enforce_license: true)
diff --git a/chef-bin/bin/chef-client b/chef-bin/bin/chef-client
index df0a18f9a6..45a6af546a 100755
--- a/chef-bin/bin/chef-client
+++ b/chef-bin/bin/chef-client
@@ -22,4 +22,4 @@ $:.unshift(File.join(File.dirname(__FILE__), "..", "lib"))
require "chef"
require "chef/application/client"
-Chef::Application::Client.new.run(true)
+Chef::Application::Client.new.run(enforce_license: true)
diff --git a/chef-bin/bin/chef-solo b/chef-bin/bin/chef-solo
index 2768f3224c..7a2168230d 100755
--- a/chef-bin/bin/chef-solo
+++ b/chef-bin/bin/chef-solo
@@ -21,4 +21,4 @@
$:.unshift(File.join(File.dirname(__FILE__), "..", "lib"))
require "chef/application/solo"
-Chef::Application::Solo.new.run(true)
+Chef::Application::Solo.new.run(enforce_license: true)
diff --git a/lib/chef/application.rb b/lib/chef/application.rb
index f567e62806..7388e3d22d 100644
--- a/lib/chef/application.rb
+++ b/lib/chef/application.rb
@@ -61,7 +61,7 @@ class Chef
end
# Get this party started
- def run(enforce_license = false)
+ def run(enforce_license: false)
setup_signal_handlers
reconfigure
setup_application
diff --git a/lib/chef/application/solo.rb b/lib/chef/application/solo.rb
index 4a3957146e..b1957fbf7c 100644
--- a/lib/chef/application/solo.rb
+++ b/lib/chef/application/solo.rb
@@ -217,7 +217,7 @@ class Chef::Application::Solo < Chef::Application
attr_reader :chef_client_json
# Get this party started
- def run(enforce_license = false)
+ def run(enforce_license: false)
setup_signal_handlers
setup_application
reconfigure
diff --git a/spec/unit/application_spec.rb b/spec/unit/application_spec.rb
index e5dc0c4a33..10dff0e250 100644
--- a/spec/unit/application_spec.rb
+++ b/spec/unit/application_spec.rb
@@ -90,7 +90,7 @@ describe Chef::Application do
describe "when enforce_license is set to true" do
it "should check the license acceptance" do
expect(@app).to receive(:check_license_acceptance)
- @app.run(true)
+ @app.run(enforce_license: true)
end
end