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 CHANGED
@@ -25,5 +25,5 @@ end
25
25
  #
26
26
  # See http://gyazo.com/4b33517380673d92f51a52e675ecdb02.png .
27
27
  # configatron.plugins.stdout.timeline_format =
28
- # '<%= color(time, 90) %> <%= s.bomb? ? color(color(status, 41), 37) : color(status, status_color) %> <%= color(id, 90) %>'
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
 
@@ -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
@@ -1,4 +1,4 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  module Termtter
3
- VERSION = '0.8.8'
3
+ VERSION = '0.8.9'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jugyo-termtter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.8
4
+ version: 0.8.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - jugyo