From 0098c3458bec21d03af176dd9a5ebad5339a3823 Mon Sep 17 00:00:00 2001 From: erikathea Date: Wed, 13 Aug 2014 10:34:48 +0800 Subject: [PATCH 1/2] fix for no implicit conversion of HTTParty::Response into String --- lib/geckoboard/push.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/geckoboard/push.rb b/lib/geckoboard/push.rb index d2b5600..c05b683 100644 --- a/lib/geckoboard/push.rb +++ b/lib/geckoboard/push.rb @@ -24,7 +24,7 @@ def initialize(widget_key) # Makes a call to Geckoboard to push data to the current widget def push(data) raise Geckoboard::Push::Error.new("Api key not configured.") if Geckoboard::Push.api_key.nil? || Geckoboard::Push.api_key.empty? - result = JSON.parse(self.class.post("/#{Geckoboard::Push.api_version || 'v1'}/send/#{@widget_key}", {:body => {:api_key => Geckoboard::Push.api_key, :data => data}.to_json})) + result = JSON.parse(self.class.post("/#{Geckoboard::Push.api_version || 'v1'}/send/#{@widget_key}", {:body => {:api_key => Geckoboard::Push.api_key, :data => data}.to_json}).body) raise Geckoboard::Push::Error.new(result["error"]) unless result["success"] result["success"] end From 2497f6f20bbc6ce163ca4c686a636e1cc3a395fb Mon Sep 17 00:00:00 2001 From: erikathea Date: Wed, 13 Aug 2014 10:42:58 +0800 Subject: [PATCH 2/2] use ruby > 1.8 to test in travis ci --- .travis.yml | 3 +-- Gemfile.lock | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index b3a5c8b..846daa3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,4 @@ language: ruby rvm: - - 1.8.7 - - 1.9.2 - 1.9.3 + - 2.0.0-p247 diff --git a/Gemfile.lock b/Gemfile.lock index 1d5d0ad..76cd75c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -27,7 +27,6 @@ PLATFORMS DEPENDENCIES fakeweb (~> 1.3.0) geckoboard-push! - httparty (~> 0.8.1) mocha (~> 0.10.0) rake rdoc