termtter 0.8.10 → 0.8.13

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/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.2.4")
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 {|arg|
7
- if arg =~ /^(\w+)/
8
- res = Termtter::API::twitter.social($1.strip, :follow)
9
- if res.code == '200'
10
- puts "Followed user @#{$1}"
11
- else
12
- puts "Failed: #{res}"
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 {|arg|
25
- if arg =~ /^(\w+)/
26
- res = Termtter::API::twitter.social($1.strip, :leave)
27
- if res.code == '200'
28
- puts "Leaved user @#{$1}"
29
- else
30
- puts "Failed: #{res}"
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
  },
@@ -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 = '<% color = s.has_keyword ? 4 : status_color %>' +
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%>><%=TermColor.escape(status)%></<%=status_color%>> <90><%=id%></90>')
11
+ '<90><%=time%></90> <<%=status_color%>><%=status%></<%=status_color%>> <90><%=id%></90>')
12
12
 
13
13
  $highline = HighLine.new
14
14
 
@@ -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
  }
@@ -1,4 +1,4 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  module Termtter
3
- VERSION = '0.8.10'
3
+ VERSION = '0.8.13'
4
4
  end
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.10
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-02 00:00:00 +09:00
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.2.4
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