lib/messenger/messenger.rb in messenger-0.5.0 vs lib/messenger/messenger.rb in messenger-0.6.0
- old
+ new
@@ -32,24 +32,22 @@
# TODO: More services
# sms://1231231234
# twitter://username
# aim://username
case url
- when /^http/ then :http
- when /^campfire/ then :campfire
- when /^jabber/ then :jabber
- when /^notifo/ then :notifo
- when /^mailto|@+/ then :email
+ when /\Ahttp/ then :http
+ when /\Acampfire/ then :campfire
+ when /\Ajabber/ then :jabber
+ when /\Amailto|@+/ then :email
end
end
def self.handler(url)
case protocol(url)
when :email then Messenger::Email
when :http then Messenger::Web
when :campfire then Messenger::Campfire
when :jabber then Messenger::Jabber
- when :notifo then Messenger::Notifo
else
raise Messenger::ProtocolError, "Malformed service URL: #{url}. Either this syntax is wrong or this service type is not yet implemented."
end
end