From 51cfbdc4d16739caac4d946fadbe678444aafe34 Mon Sep 17 00:00:00 2001 From: Thom May Date: Thu, 14 Jan 2016 14:08:03 +0000 Subject: Use double quotes by default This is an entirely mechanically generated (chefstyle -a) change, to go along with chef/chefstyle#5 . We should pick something and use it consistently, and my opinion is that double quotes are the appropriate thing. --- lib/chef/knife/configure.rb | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'lib/chef/knife/configure.rb') diff --git a/lib/chef/knife/configure.rb b/lib/chef/knife/configure.rb index 8bb8930aee..f4d539aa13 100644 --- a/lib/chef/knife/configure.rb +++ b/lib/chef/knife/configure.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require 'chef/knife' +require "chef/knife" class Chef class Knife @@ -25,7 +25,7 @@ class Chef attr_reader :chef_repo, :new_client_key, :validation_client_name, :validation_key deps do - require 'ohai' + require "ohai" Chef::Knife::ClientCreate.load_deps Chef::Knife::UserCreate.load_deps end @@ -61,7 +61,7 @@ class Chef def configure_chef # We are just faking out the system so that you can do this without a key specified - Chef::Config[:node_name] = 'woot' + Chef::Config[:node_name] = "woot" super Chef::Config[:node_name] = nil end @@ -136,14 +136,14 @@ EOH @chef_server = config[:chef_server_url] || ask_question("Please enter the chef server URL: ", :default => "https://#{server_name}:443") if config[:initial] @new_client_name = config[:node_name] || ask_question("Please enter a name for the new user: ", :default => Etc.getlogin) - @admin_client_name = config[:admin_client_name] || ask_question("Please enter the existing admin name: ", :default => 'admin') - @admin_client_key = config[:admin_client_key] || ask_question("Please enter the location of the existing admin's private key: ", :default => '/etc/chef-server/admin.pem') + @admin_client_name = config[:admin_client_name] || ask_question("Please enter the existing admin name: ", :default => "admin") + @admin_client_key = config[:admin_client_key] || ask_question("Please enter the location of the existing admin's private key: ", :default => "/etc/chef-server/admin.pem") @admin_client_key = File.expand_path(@admin_client_key) else @new_client_name = config[:node_name] || ask_question("Please enter an existing username or clientname for the API: ", :default => Etc.getlogin) end - @validation_client_name = config[:validation_client_name] || ask_question("Please enter the validation clientname: ", :default => 'chef-validator') - @validation_key = config[:validation_key] || ask_question("Please enter the location of the validation key: ", :default => '/etc/chef-server/chef-validator.pem') + @validation_client_name = config[:validation_client_name] || ask_question("Please enter the validation clientname: ", :default => "chef-validator") + @validation_key = config[:validation_key] || ask_question("Please enter the location of the validation key: ", :default => "/etc/chef-server/chef-validator.pem") @validation_key = File.expand_path(@validation_key) @chef_repo = config[:repository] || ask_question("Please enter the path to a chef repository (or leave blank): ") @@ -154,9 +154,9 @@ EOH def guess_servername o = Ohai::System.new o.load_plugins - o.require_plugin 'os' - o.require_plugin 'hostname' - o[:fqdn] || o[:machinename] || o[:hostname] || 'localhost' + o.require_plugin "os" + o.require_plugin "hostname" + o[:fqdn] || o[:machinename] || o[:hostname] || "localhost" end def config_file -- cgit v1.2.1