lib/ppds/tumblr.rb in grumblr-2.2.0 vs lib/ppds/tumblr.rb in grumblr-2.3.0
- old
+ new
@@ -53,16 +53,17 @@
self.blogs = []
end
def query(action, data)
raise 'Cannot authenticate without credentials' unless data[:email] and data[:password]
- RestClient.post(API_URL + action, data) { |response| response.body }
+ response = RestClient.post(API_URL + action, data)
+ response.to_str
rescue RestClient::RequestFailed => e
raise 'Query failed: %s' % e.response.body
rescue RestClient::RequestTimeout
raise 'Timeout occured'
- rescue Exception
- raise $!
+# rescue Exception
+# raise $!
end
def authenticate(email, password)
data = {
:email => email,