lib/messenger/campfire.rb in messenger-0.0.1 vs lib/messenger/campfire.rb in messenger-0.0.2
- old
+ new
@@ -3,9 +3,11 @@
module Messenger
class Campfire
+ # URL format:
+ # campfire://api-key:room-id@subdomain.campfirenow.com
def self.send(url, body, options={})
begin
api_key, room, subdomain = url.match(/^campfire:\/\/([^:]+):([^@]+)@([^\.]+)/)[1,3]
rescue
raise URLError, "The URL provided is invalid"