diff options
Diffstat (limited to 'lib/chef/knife/core/object_loader.rb')
-rw-r--r-- | lib/chef/knife/core/object_loader.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/chef/knife/core/object_loader.rb b/lib/chef/knife/core/object_loader.rb index 97ca381471..69c2428bd4 100644 --- a/lib/chef/knife/core/object_loader.rb +++ b/lib/chef/knife/core/object_loader.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require 'ffi_yajl' -require 'chef/util/path_helper' -require 'chef/data_bag_item' +require "ffi_yajl" +require "chef/util/path_helper" +require "chef/data_bag_item" class Chef class Knife @@ -71,14 +71,14 @@ class Chef # # @api public def find_all_objects(path) - path = File.join(Chef::Util::PathHelper.escape_glob(File.expand_path(path)), '*') - path << '.{json,rb}' + path = File.join(Chef::Util::PathHelper.escape_glob(File.expand_path(path)), "*") + path << ".{json,rb}" objects = Dir.glob(path) objects.map { |o| File.basename(o) } end def find_all_object_dirs(path) - path = File.join(Chef::Util::PathHelper.escape_glob(File.expand_path(path)), '*') + path = File.join(Chef::Util::PathHelper.escape_glob(File.expand_path(path)), "*") objects = Dir.glob(path) objects.delete_if { |o| !File.directory?(o) } objects.map { |o| File.basename(o) } |