From 2b0d5900b28a2846b880f31d12a123193c5f9ec6 Mon Sep 17 00:00:00 2001 From: Raffael Schmid Date: Sat, 26 Jan 2013 20:56:18 +0100 Subject: [PATCH] replace faraday with httparty --- Gemfile | 2 +- Gemfile.lock | 2 +- app/models/notification_services/hubot_service.rb | 2 +- spec/models/notification_service/hubot_service_spec.rb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Gemfile b/Gemfile index 26b8e58..b4b3c0e 100644 --- a/Gemfile +++ b/Gemfile @@ -55,7 +55,7 @@ gem 'hoi' # Pushover (iOS Push notifications) gem 'rushover' # Hubot -gem 'faraday' +gem 'httparty' # Authentication # --------------------------------------- diff --git a/Gemfile.lock b/Gemfile.lock index 9760757..89aa0ae 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -344,7 +344,6 @@ DEPENDENCIES email_spec execjs fabrication (~> 1.3.0) - faraday foreman gitlab! haml @@ -352,6 +351,7 @@ DEPENDENCIES hoi hoptoad_notifier (~> 2.4) htmlentities (~> 4.3.0) + httparty inherited_resources kaminari (>= 0.14.1) launchy diff --git a/app/models/notification_services/hubot_service.rb b/app/models/notification_services/hubot_service.rb index ef9a522..9a56981 100644 --- a/app/models/notification_services/hubot_service.rb +++ b/app/models/notification_services/hubot_service.rb @@ -26,7 +26,7 @@ class NotificationServices::HubotService < NotificationService end def create_notification(problem) - Faraday.post(url, :message => message_for_hubot(problem), :room => room_id) + HTTParty.post(url, :body => {:message => message_for_hubot(problem), :room => room_id}) end end diff --git a/spec/models/notification_service/hubot_service_spec.rb b/spec/models/notification_service/hubot_service_spec.rb index cb32dd6..f3cddd5 100644 --- a/spec/models/notification_service/hubot_service_spec.rb +++ b/spec/models/notification_service/hubot_service_spec.rb @@ -8,7 +8,7 @@ describe NotificationService::HubotService do problem = notice.problem # faraday stubbing - Faraday.should_receive(:post).with(notification_service.api_token, {:message => '[production][foo#bar] FooError: Too Much Bar', :room => notification_service.room_id}).and_return(true) + HTTParty.should_receive(:post).with(notification_service.api_token, :body => {:message => '[production][foo#bar] FooError: Too Much Bar', :room => notification_service.room_id}).and_return(true) notification_service.create_notification(problem) end -- libgit2 0.21.2