lib/nightcrawler_swift/commands/delete.rb in nightcrawler_swift-0.11.1 vs lib/nightcrawler_swift/commands/delete.rb in nightcrawler_swift-1.0.0
- old
+ new
@@ -5,10 +5,10 @@
if path.nil? or path.empty?
raise Exceptions::ValidationError.new "Delete command requires a path parameter"
end
response = delete "#{connection.upload_url}/#{path}", headers: { accept: :json }
- [200, 201].include?(response.code)
+ response.code >= 200 && response.code < 300
end
end
end