lib/messenger/campfire.rb in messenger-0.3.3 vs lib/messenger/campfire.rb in messenger-0.3.4

- old
+ new

@@ -14,12 +14,13 @@ def self.deliver(url, body, options={}) raise Messenger::URLError, "The URL provided is invalid" unless valid_url?(url) ssl, api_key, room, subdomain = matcher(url) options[:headers] ||= {} response = HTTParty.post( - "http#{ssl ? "s" : ""}://#{api_key}:x@#{subdomain}.campfirenow.com/room/#{room}/speak.json", + "http#{ssl ? "s" : ""}://#{subdomain}.campfirenow.com/room/#{room}/speak.json", :headers => { "Content-Type" => "application/json"}.merge(options[:headers]), - :body => { "message" => { "body" => body } }.to_json + :body => { "message" => { "body" => body } }.to_json, + :basic_auth => {:username => api_key, :password => 'x'} ) Messenger::Result.new(success?(response), response) end def self.obfuscate(url)