messenger 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
- require 'typhoeus'
1
+ require 'httparty'
2
2
  require 'json'
3
3
 
4
4
  class Messenger::Campfire
@@ -15,7 +15,7 @@ class Messenger::Campfire
15
15
  raise Messenger::URLError, "The URL provided is invalid" unless valid_url?(url)
16
16
  ssl, api_key, room, subdomain = matcher(url)
17
17
  options[:headers] ||= {}
18
- response = Typhoeus::Request.post(
18
+ response = HTTParty.post(
19
19
  "http#{ssl ? "s" : ""}://#{api_key}:x@#{subdomain}.campfirenow.com/room/#{room}/speak.json",
20
20
  :headers => { "Content-Type" => "application/json"}.merge(options[:headers]),
21
21
  :body => { "message" => { "body" => body } }.to_json
@@ -1,4 +1,4 @@
1
- require 'typhoeus'
1
+ require 'httparty'
2
2
  require 'json'
3
3
 
4
4
  class Messenger::Notifo
@@ -18,8 +18,8 @@ class Messenger::Notifo
18
18
  def self.deliver(url, message, options={})
19
19
  raise Messenger::URLError, "The URL provided is invalid" unless valid_url?(url)
20
20
  username = matcher(url)
21
- response = Typhoeus::Request.post("https://#{options[:notifo_api_username]}:#{options[:notifo_api_secret]}@api.notifo.com/v1/send_notification",
22
- :body => { :to => username, :msg => message, :title => options[:notifo_title], :uri => options[:notifo_url] }.to_param)
21
+ response = HTTParty.post("https://#{options[:notifo_api_username]}:#{options[:notifo_api_secret]}@api.notifo.com/v1/send_notification",
22
+ :body => { :to => username, :msg => message, :title => options[:notifo_title], :uri => options[:notifo_url] })
23
23
  Messenger::Result.new(success?(response), response)
24
24
  end
25
25
 
@@ -1,3 +1,3 @@
1
1
  module Messenger
2
- VERSION = '0.3.0'
2
+ VERSION = '0.3.1'
3
3
  end
data/lib/messenger/web.rb CHANGED
@@ -1,4 +1,4 @@
1
- require 'typhoeus'
1
+ require 'httparty'
2
2
 
3
3
  class Messenger::Web
4
4
 
@@ -15,7 +15,7 @@ class Messenger::Web
15
15
  # The body of the message is posted as the body of the request, not the query.
16
16
  def self.deliver(url, body, options={})
17
17
  raise Messenger::URLError, "The URL provided is invalid" unless valid_url?(url)
18
- response = Typhoeus::Request.post(url, options.merge(:body => body))
18
+ response = HTTParty.post(url, options.merge(:body => body))
19
19
  Messenger::Result.new(success?(response), response)
20
20
  end
21
21
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 3
8
- - 0
9
- version: 0.3.0
8
+ - 1
9
+ version: 0.3.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Brandon Arbini
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-06-22 00:00:00 -05:00
18
+ date: 2010-06-24 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -55,7 +55,7 @@ dependencies:
55
55
  type: :runtime
56
56
  version_requirements: *id003
57
57
  - !ruby/object:Gem::Dependency
58
- name: typhoeus
58
+ name: httparty
59
59
  prerelease: false
60
60
  requirement: &id004 !ruby/object:Gem::Requirement
61
61
  requirements: