safubot 0.0.6 → 0.0.7
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/lib/safubot/twitter.rb +5 -4
- data/lib/safubot/version.rb +1 -1
- metadata +2 -2
data/lib/safubot/twitter.rb
CHANGED
@@ -197,16 +197,17 @@ module Safubot
|
|
197
197
|
# @param status A raw JSON-derived tweet.
|
198
198
|
def handle_tweet(status)
|
199
199
|
return if status.user.screen_name == @username
|
200
|
-
|
201
|
-
|
200
|
+
tweet = Tweet.from(status)
|
201
|
+
if tweet.text.match(/@#{@username}/i) && !tweet.original_tweet
|
202
|
+
handle_request(tweet.make_request)
|
202
203
|
else
|
203
|
-
emit(:timeline,
|
204
|
+
emit(:timeline, tweet)
|
204
205
|
end
|
205
206
|
end
|
206
207
|
|
207
208
|
# Constructs the appropriate series of mentions for a reply to this tweet.
|
208
209
|
def reply_header(tweet)
|
209
|
-
(["@#{tweet.username}"] + (tweet.header_mentions - ["@#{@username}"])).join
|
210
|
+
(["@#{tweet.username}"] + (tweet.header_mentions - ["@#{@username}"])).join(' ')
|
210
211
|
end
|
211
212
|
|
212
213
|
# Replies to a tweet using the appropriate mentions.
|
data/lib/safubot/version.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: safubot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.7
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Jaiden Mispy
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-12-
|
13
|
+
date: 2011-12-02 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|