diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2016-02-05 15:00:00 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2016-02-05 15:00:00 -0800 |
commit | 686113531d23f30e9973d659c456ae33eb9cff1f (patch) | |
tree | f225de7251a8b49b8d183dd168bab0a0addbe23f /lib/chef/knife.rb | |
parent | d1cf34b059a16a81e0fc48de52ba29863bb41fe6 (diff) | |
download | chef-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 'lib/chef/knife.rb')
-rw-r--r-- | lib/chef/knife.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/chef/knife.rb b/lib/chef/knife.rb index 56a23e0dde..164a2cdeda 100644 --- a/lib/chef/knife.rb +++ b/lib/chef/knife.rb @@ -72,7 +72,7 @@ class Chef @ui ||= Chef::Knife::UI.new(STDOUT, STDERR, STDIN, {}) end - def self.msg(msg="") + def self.msg(msg = "") ui.msg(msg) end @@ -195,7 +195,7 @@ class Chef # args::: usually ARGV # options::: A Mixlib::CLI option parser hash. These +options+ are how # subcommands know about global knife CLI options - def self.run(args, options={}) + def self.run(args, options = {}) # Fallback debug logging. Normally the logger isn't configured until we # read the config, but this means any logging that happens before the # config file is read may be lost. If the KNIFE_DEBUG variable is set, we @@ -250,7 +250,7 @@ class Chef if category_commands = guess_category(args) list_commands(category_commands) - elsif missing_plugin = ( OFFICIAL_PLUGINS.find {|plugin| plugin == args[0]} ) + elsif missing_plugin = ( OFFICIAL_PLUGINS.find { |plugin| plugin == args[0] } ) ui.info("The #{missing_plugin} commands were moved to plugins in Chef 0.10") ui.info("You can install the plugin with `(sudo) gem install knife-#{missing_plugin}`") ui.info("Use `chef gem install knife-#{missing_plugin}` instead if using ChefDK") @@ -261,7 +261,7 @@ class Chef exit 10 end - def self.list_commands(preferred_category=nil) + def self.list_commands(preferred_category = nil) category_desc = preferred_category ? preferred_category + " " : "" msg "Available #{category_desc}subcommands: (for details, knife SUB-COMMAND --help)\n\n" subcommand_loader.list_commands(preferred_category).sort.each do |category, commands| @@ -285,7 +285,7 @@ class Chef # Create a new instance of the current class configured for the given # arguments and options - def initialize(argv=[]) + def initialize(argv = []) super() # having to call super in initialize is the most annoying anti-pattern :( @ui = Chef::Knife::UI.new(STDOUT, STDERR, STDIN, config) @@ -510,7 +510,7 @@ class Chef response.body end - def create_object(object, pretty_name=nil, &block) + def create_object(object, pretty_name = nil, &block) output = edit_data(object) if Kernel.block_given? @@ -526,7 +526,7 @@ class Chef output(output) if config[:print_after] end - def delete_object(klass, name, delete_name=nil, &block) + def delete_object(klass, name, delete_name = nil, &block) confirm("Do you really want to delete #{name}") if Kernel.block_given? |