diff options
Diffstat (limited to 'lib/chef/knife/cookbook_upload.rb')
-rw-r--r-- | lib/chef/knife/cookbook_upload.rb | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/lib/chef/knife/cookbook_upload.rb b/lib/chef/knife/cookbook_upload.rb index f67a26dc9a..241eb03862 100644 --- a/lib/chef/knife/cookbook_upload.rb +++ b/lib/chef/knife/cookbook_upload.rb @@ -37,42 +37,42 @@ class Chef banner "knife cookbook upload [COOKBOOKS...] (options)" option :cookbook_path, - :short => "-o PATH:PATH", - :long => "--cookbook-path PATH:PATH", - :description => "A colon-separated path to look for cookbooks in", - :proc => lambda { |o| o.split(":") } + short: "-o PATH:PATH", + long: "--cookbook-path PATH:PATH", + description: "A colon-separated path to look for cookbooks in", + proc: lambda { |o| o.split(":") } option :freeze, - :long => "--freeze", - :description => "Freeze this version of the cookbook so that it cannot be overwritten", - :boolean => true + long: "--freeze", + description: "Freeze this version of the cookbook so that it cannot be overwritten", + boolean: true option :all, - :short => "-a", - :long => "--all", - :description => "Upload all cookbooks, rather than just a single cookbook" + short: "-a", + long: "--all", + description: "Upload all cookbooks, rather than just a single cookbook" option :force, - :long => "--force", - :boolean => true, - :description => "Update cookbook versions even if they have been frozen" + long: "--force", + boolean: true, + description: "Update cookbook versions even if they have been frozen" option :concurrency, - :long => "--concurrency NUMBER_OF_THREADS", - :description => "How many concurrent threads will be used", - :default => 10, - :proc => lambda { |o| o.to_i } + long: "--concurrency NUMBER_OF_THREADS", + description: "How many concurrent threads will be used", + default: 10, + proc: lambda { |o| o.to_i } option :environment, - :short => "-E", - :long => "--environment ENVIRONMENT", - :description => "Set ENVIRONMENT's version dependency match the version you're uploading.", - :default => nil + short: "-E", + long: "--environment ENVIRONMENT", + description: "Set ENVIRONMENT's version dependency match the version you're uploading.", + default: nil option :depends, - :short => "-d", - :long => "--include-dependencies", - :description => "Also upload cookbook dependencies" + short: "-d", + long: "--include-dependencies", + description: "Also upload cookbook dependencies" def run # Sanity check before we load anything from the server @@ -242,7 +242,7 @@ WARNING check_for_broken_links!(cb) check_for_dependencies!(cb) end - Chef::CookbookUploader.new(cookbooks, :force => config[:force], :concurrency => config[:concurrency]).upload_cookbooks + Chef::CookbookUploader.new(cookbooks, force: config[:force], concurrency: config[:concurrency]).upload_cookbooks rescue Chef::Exceptions::CookbookFrozen => e ui.error e raise |