jugyo-termtter 0.8.8 → 0.8.9
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/plugin/bomb.rb +1 -1
- data/lib/plugin/stdout.rb +1 -1
- data/lib/termtter/twitter.rb +1 -4
- data/lib/termtter/version.rb +1 -1
- metadata +1 -1
data/lib/plugin/bomb.rb
CHANGED
@@ -25,5 +25,5 @@ end
|
|
25
25
|
#
|
26
26
|
# See http://gyazo.com/4b33517380673d92f51a52e675ecdb02.png .
|
27
27
|
# configatron.plugins.stdout.timeline_format =
|
28
|
-
#
|
28
|
+
# %q[<90><%=time%></90> <%= s.bomb? ? "<37><41>#{status}</41></37>" : "<#{status_color}>#{status}</#{status_color}>" %> <90><%=id%></90>]
|
29
29
|
# vim: fenc=utf8
|
data/lib/plugin/stdout.rb
CHANGED
@@ -8,7 +8,7 @@ configatron.plugins.stdout.set_default(
|
|
8
8
|
[:none, :red, :green, :yellow, :blue, :magenta, :cyan])
|
9
9
|
configatron.plugins.stdout.set_default(
|
10
10
|
:timeline_format,
|
11
|
-
'<90><%=time%></90> <<%=status_color%>><%=status%></<%=status_color%>> <90><%=id%></90>')
|
11
|
+
'<90><%=time%></90> <<%=status_color%>><%=TermColor.escape(status)%></<%=status_color%>> <90><%=id%></90>')
|
12
12
|
|
13
13
|
$highline = HighLine.new
|
14
14
|
|
data/lib/termtter/twitter.rb
CHANGED
@@ -50,15 +50,12 @@ module Termtter
|
|
50
50
|
return []
|
51
51
|
end
|
52
52
|
|
53
|
-
configatron.search.set_default(:highlihgt_text_format, '<on_magenta><white>\1</white></on_magenta>')
|
54
53
|
def search(query)
|
55
54
|
results = fetch_as_json(search_url_for("/search.json?q=#{CGI.escape(query)}"))['results']
|
56
55
|
return results.map do |s|
|
57
56
|
status = Status.new
|
58
57
|
status.id = s['id']
|
59
|
-
status.text = CGI.unescapeHTML(s['text']).
|
60
|
-
gsub(/(\n|\r)/, '').
|
61
|
-
gsub(/(#{Regexp.escape(query)})/i, configatron.search.highlihgt_text_format)
|
58
|
+
status.text = CGI.unescapeHTML(s['text']).gsub(/(\n|\r)/, '')
|
62
59
|
status.created_at = Time.parse(s["created_at"])
|
63
60
|
status.user_screen_name = s['from_user']
|
64
61
|
status
|
data/lib/termtter/version.rb
CHANGED