lib/myjohndeere/file_resource.rb in myjohndeere-0.1.8 vs lib/myjohndeere/file_resource.rb in myjohndeere-0.1.9
- old
+ new
@@ -35,10 +35,10 @@
return send_create(access_token, body, {map_layer_id: map_layer_id})
end
def self.upload_file(access_token, file_resource_id, file_path)
- raise ArgumentError.new("You must pass an existing file") if !::File.exists?(file_path)
+ raise ArgumentError.new("You must pass an existing file") if !::File.exist?(file_path)
raise ArgumentError.new("You must pass a valid file_resource_id") if file_resource_id.nil?
::File.open(file_path, "rb:UTF-8") do |f|
body = f.read()
response = access_token.execute_request(:put,
\ No newline at end of file