termtter 0.8.10 → 0.8.13
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/lib/plugin/follow.rb +18 -14
- data/lib/plugin/keyword.rb +1 -2
- data/lib/plugin/stdout.rb +1 -1
- data/lib/termtter/client.rb +2 -0
- data/lib/termtter/version.rb +1 -1
- metadata +3 -3
data/Rakefile
CHANGED
@@ -27,7 +27,7 @@ Gem::Specification.new do |s|
|
|
27
27
|
s.add_dependency("json_pure", ">= 1.1.3")
|
28
28
|
s.add_dependency("configatron", ">= 2.2.2")
|
29
29
|
s.add_dependency("highline", ">= 1.5.0")
|
30
|
-
s.add_dependency("termcolor", ">= 0.
|
30
|
+
s.add_dependency("termcolor", ">= 0.3.1")
|
31
31
|
s.authors = %w(jugyo ujihisa)
|
32
32
|
s.email = 'jugyo.org@gmail.com'
|
33
33
|
s.homepage = 'http://wiki.github.com/jugyo/termtter'
|
data/lib/plugin/follow.rb
CHANGED
@@ -3,13 +3,15 @@
|
|
3
3
|
module Termtter::Client
|
4
4
|
register_command(
|
5
5
|
:name => :follow, :aliases => [],
|
6
|
-
:exec_proc => lambda {|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
6
|
+
:exec_proc => lambda {|args|
|
7
|
+
args.split(' ').each do |arg|
|
8
|
+
if arg =~ /^(\w+)/
|
9
|
+
res = Termtter::API::twitter.social($1.strip, :follow)
|
10
|
+
if res.code == '200'
|
11
|
+
puts "Followed user @#{$1}"
|
12
|
+
else
|
13
|
+
puts "Failed: #{res}"
|
14
|
+
end
|
13
15
|
end
|
14
16
|
end
|
15
17
|
},
|
@@ -21,13 +23,15 @@ module Termtter::Client
|
|
21
23
|
|
22
24
|
register_command(
|
23
25
|
:name => :leave, :aliases => [],
|
24
|
-
:exec_proc => lambda {|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
26
|
+
:exec_proc => lambda {|args|
|
27
|
+
args.split(' ').each do |arg|
|
28
|
+
if arg =~ /^(\w+)/
|
29
|
+
res = Termtter::API::twitter.social($1.strip, :leave)
|
30
|
+
if res.code == '200'
|
31
|
+
puts "Leaved user @#{$1}"
|
32
|
+
else
|
33
|
+
puts "Failed: #{res}"
|
34
|
+
end
|
31
35
|
end
|
32
36
|
end
|
33
37
|
},
|
data/lib/plugin/keyword.rb
CHANGED
@@ -14,6 +14,5 @@ end
|
|
14
14
|
# keyword.rb
|
15
15
|
# provides a keyword watching method
|
16
16
|
# example config
|
17
|
-
# configatron.plugins.stdout.timeline_format =
|
18
|
-
# '<90><%=time%></90> <<%=color%>><%=status%></<%=color%>> <90><%=id%></90>'
|
17
|
+
# configatron.plugins.stdout.timeline_format = '<%= color(time, 90) %> <%= color(status, s.has_keyword ? 4 : status_color) %> <%= color(id, 90) %>'
|
19
18
|
# configatron.plugins.keyword.keywords = [ /motemen/ ]
|
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%>><%=
|
11
|
+
'<90><%=time%></90> <<%=status_color%>><%=status%></<%=status_color%>> <90><%=id%></90>')
|
12
12
|
|
13
13
|
$highline = HighLine.new
|
14
14
|
|
data/lib/termtter/client.rb
CHANGED
@@ -227,6 +227,8 @@ module Termtter
|
|
227
227
|
password = ui.ask('your twitter password: ') { |q| q.echo = false }
|
228
228
|
|
229
229
|
File.open(File.expand_path('~/.termtter'), 'w') {|io|
|
230
|
+
io.puts '# -*- coding: utf-8 -*-'
|
231
|
+
|
230
232
|
plugins = Dir.glob(File.dirname(__FILE__) + "/../lib/plugin/*.rb").map {|f|
|
231
233
|
f.match(%r|lib/plugin/(.*?).rb$|)[1]
|
232
234
|
}
|
data/lib/termtter/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: termtter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jugyo
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2009-03-
|
13
|
+
date: 2009-03-03 00:00:00 +09:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -51,7 +51,7 @@ dependencies:
|
|
51
51
|
requirements:
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.
|
54
|
+
version: 0.3.1
|
55
55
|
version:
|
56
56
|
description: Termtter is a terminal based Twitter client
|
57
57
|
email: jugyo.org@gmail.com
|