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/search/query.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/search/query.rb')
-rw-r--r-- | lib/chef/search/query.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/chef/search/query.rb b/lib/chef/search/query.rb index 6041cafcf8..8a205160fa 100644 --- a/lib/chef/search/query.rb +++ b/lib/chef/search/query.rb @@ -29,7 +29,7 @@ class Chef attr_accessor :rest attr_reader :config - def initialize(url=nil, config:Chef::Config) + def initialize(url = nil, config:Chef::Config) @config = config @url = url end @@ -40,7 +40,7 @@ class Chef # Backwards compatability for cookbooks. # This can be removed in Chef > 12. - def partial_search(type, query="*:*", *args, &block) + def partial_search(type, query = "*:*", *args, &block) Chef::Log.warn(<<-WARNDEP) DEPRECATED: The 'partial_search' API is deprecated and will be removed in future releases. Please use 'search' with a :filter_result argument to get @@ -80,7 +80,7 @@ WARNDEP # an example of the returned json may be: # {"ip_address":"127.0.0.1", "ruby_version": "1.9.3"} # - def search(type, query="*:*", *args, &block) + def search(type, query = "*:*", *args, &block) validate_type(type) args_h = hashify_args(*args) @@ -116,8 +116,8 @@ WARNDEP def validate_type(t) unless t.kind_of?(String) || t.kind_of?(Symbol) msg = "Invalid search object type #{t.inspect} (#{t.class}), must be a String or Symbol." + - "Usage: search(:node, QUERY[, OPTIONAL_ARGS])" + - " `knife search environment QUERY (options)`" + "Usage: search(:node, QUERY[, OPTIONAL_ARGS])" + + " `knife search environment QUERY (options)`" raise Chef::Exceptions::InvalidSearchQuery, msg end end |