lib/chef-api/resources/data_bag.rb in chef-infra-api-0.10.0 vs lib/chef-api/resources/data_bag.rb in chef-infra-api-0.10.2

- old
+ new

@@ -1,8 +1,8 @@ module ChefAPI class Resource::DataBag < Resource::Base - collection_path '/data' + collection_path "/data" schema do attribute :name, type: String, primary: true, required: true end @@ -24,12 +24,12 @@ # the name of the data bag # # @return [Array<DataBagItem>] # def from_file(path, name = File.basename(path)) - path = File.expand_path(path) + path = File.expand_path(path) - raise Error::FileNotFound.new(path: path) unless File.exists?(path) + raise Error::FileNotFound.new(path: path) unless File.exist?(path) raise Error::NotADirectory.new(path: path) unless File.directory?(path) raise ArgumentError unless File.directory?(path) bag = new(name: name)