messenger 0.3.3 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16,9 +16,10 @@ class Messenger::Campfire
16
16
  ssl, api_key, room, subdomain = matcher(url)
17
17
  options[:headers] ||= {}
18
18
  response = HTTParty.post(
19
- "http#{ssl ? "s" : ""}://#{api_key}:x@#{subdomain}.campfirenow.com/room/#{room}/speak.json",
19
+ "http#{ssl ? "s" : ""}://#{subdomain}.campfirenow.com/room/#{room}/speak.json",
20
20
  :headers => { "Content-Type" => "application/json"}.merge(options[:headers]),
21
- :body => { "message" => { "body" => body } }.to_json
21
+ :body => { "message" => { "body" => body } }.to_json,
22
+ :basic_auth => {:username => api_key, :password => 'x'}
22
23
  )
23
24
  Messenger::Result.new(success?(response), response)
24
25
  end
@@ -18,8 +18,9 @@ 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 = 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] })
21
+ response = HTTParty.post("https://api.notifo.com/v1/send_notification",
22
+ :body => { :to => username, :msg => message, :title => options[:notifo_title], :uri => options[:notifo_url] },
23
+ :basic_auth => {:username => options[:notifo_api_username], :password => options[:notifo_api_secret]})
23
24
  Messenger::Result.new(success?(response), response)
24
25
  end
25
26
 
@@ -1,3 +1,3 @@
1
1
  module Messenger
2
- VERSION = '0.3.3'
2
+ VERSION = '0.3.4'
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 3
8
- - 3
9
- version: 0.3.3
8
+ - 4
9
+ version: 0.3.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - Brandon Arbini