blackwinter-twitter2jabber 0.1.4 → 0.1.6

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.
data/README CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  == VERSION
4
4
 
5
- This documentation refers to twitter2jabber version 0.1.4
5
+ This documentation refers to twitter2jabber version 0.1.6
6
6
 
7
7
 
8
8
  == DESCRIPTION
@@ -178,7 +178,7 @@ class Twitter2Jabber
178
178
  tweets.sort_by { |tweet|
179
179
  tweet.created_at = Time.parse(tweet.created_at)
180
180
  }
181
- rescue Twitter::TwitterError, Timeout::Error
181
+ rescue Twitter::TwitterError, Twitter::Unavailable, Timeout::Error
182
182
  []
183
183
  rescue => err
184
184
  warn "#{err} (#{err.class})"
@@ -222,7 +222,8 @@ class Twitter2Jabber
222
222
  end
223
223
 
224
224
  def process_html(text)
225
- text.gsub(/((?:\A|\s)@)(\w+)/, '\1<a href="http://twitter.com/\2">\2</a>')
225
+ text.gsub(/(?=\A|\W)@(\w+)/, '@<a href="http://twitter.com/\1">\1</a>').
226
+ gsub(/(?=\A|\W)#(\w+)/, '<a href="http://search.twitter.com/search?q=%23\1">#\1</a>')
226
227
  end
227
228
 
228
229
  def process_text(text)
@@ -4,7 +4,7 @@ class Twitter2Jabber
4
4
 
5
5
  MAJOR = 0
6
6
  MINOR = 1
7
- TINY = 4
7
+ TINY = 6
8
8
 
9
9
  class << self
10
10
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blackwinter-twitter2jabber
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jens Wille
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-09-08 00:00:00 -07:00
12
+ date: 2009-09-11 00:00:00 -07:00
13
13
  default_executable: twitter2jabber
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency