jugyo-termtter 1.0.3 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. data/Rakefile +1 -1
  2. data/lib/plugins/addspace.rb +27 -0
  3. data/lib/plugins/bomb.rb +9 -12
  4. data/lib/plugins/expand-tinyurl.rb +12 -3
  5. data/lib/plugins/group.rb +10 -6
  6. data/lib/plugins/growl.rb +3 -3
  7. data/lib/plugins/history.rb +21 -10
  8. data/lib/plugins/log.rb +10 -10
  9. data/lib/plugins/msagent.rb +23 -11
  10. data/lib/plugins/notify-send.rb +17 -12
  11. data/lib/plugins/plugin.rb +1 -1
  12. data/lib/plugins/say.rb +8 -6
  13. data/lib/plugins/scrape.rb +1 -1
  14. data/lib/plugins/screen-notify.rb +17 -10
  15. data/lib/plugins/standard_plugins.rb +30 -19
  16. data/lib/plugins/stdout.rb +35 -54
  17. data/lib/plugins/storage/status.rb +23 -20
  18. data/lib/plugins/storage.rb +17 -23
  19. data/lib/plugins/update_editor.rb +1 -1
  20. data/lib/plugins/uri-open.rb +7 -5
  21. data/lib/plugins/url_addspace.rb +1 -1
  22. data/lib/termtter/api.rb +2 -1
  23. data/lib/termtter/client.rb +90 -118
  24. data/lib/termtter/command.rb +6 -1
  25. data/lib/termtter/hook.rb +7 -2
  26. data/lib/termtter/system_extensions.rb +15 -10
  27. data/lib/termtter/version.rb +1 -1
  28. data/lib/termtter.rb +11 -0
  29. data/spec/{plugin → plugins}/cool_spec.rb +0 -0
  30. data/spec/{plugin → plugins}/english_spec.rb +0 -0
  31. data/spec/{plugin → plugins}/favorite_spec.rb +0 -0
  32. data/spec/{plugin → plugins}/fib_spec.rb +0 -0
  33. data/spec/{plugin → plugins}/filter_spec.rb +0 -0
  34. data/spec/{plugin → plugins}/pause_spec.rb +0 -0
  35. data/spec/{plugin → plugins}/plugin_spec.rb +0 -0
  36. data/spec/{plugin → plugins}/primes_spec.rb +0 -0
  37. data/spec/{plugin → plugins}/shell_spec.rb +0 -0
  38. data/spec/{plugin → plugins}/sl_spec.rb +0 -0
  39. data/spec/{plugin → plugins}/spam_spec.rb +0 -0
  40. data/spec/{plugin → plugins}/standard_plugins_spec.rb +0 -0
  41. data/spec/{plugin → plugins}/storage/DB_spec.rb +0 -0
  42. data/spec/{plugin → plugins}/storage/status_spec.rb +1 -1
  43. data/spec/termtter/client_spec.rb +5 -8
  44. data/spec/termtter/command_spec.rb +10 -10
  45. metadata +18 -17
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -17,7 +17,7 @@ module Termtter::Storage
17
17
  :created_at => 12345,
18
18
  :in_reply_to_status_id => -1,
19
19
  :in_reply_to_user_id => -1,
20
- :post_text => 'bomb',
20
+ :text => 'bomb',
21
21
  :user_id => 1).should_not be_false
22
22
  end
23
23
  end
@@ -6,7 +6,7 @@ module Termtter
6
6
 
7
7
  describe Client do
8
8
 
9
- it 'should take new_command' do
9
+ it 'should take command' do
10
10
  command = Command.new(:name => :test)
11
11
  Client.register_command(command)
12
12
  Client.get_command(:test).should == command
@@ -17,7 +17,7 @@ module Termtter
17
17
  Client.get_command(:test).name.should == :test
18
18
  end
19
19
 
20
- it 'should call new_command' do
20
+ it 'should call command' do
21
21
  command_arg = nil
22
22
  command = Command.new(:name => :test, :exec_proc => lambda {|arg| command_arg = arg})
23
23
  Client.register_command(command)
@@ -49,7 +49,7 @@ module Termtter
49
49
  hook_called = false
50
50
  Client.register_hook(:name => :test1, :points => [:point1], :exec_proc => lambda {hook_called = true})
51
51
  hook_called.should == false
52
- Client.call_new_hooks(:point1)
52
+ Client.call_hooks(:point1)
53
53
  hook_called.should == true
54
54
  end
55
55
 
@@ -59,7 +59,7 @@ module Termtter
59
59
  Client.register_hook(:name => :test1, :points => [:point1], :exec_proc => lambda {|a1, a2| arg1 = a1; arg2 = a2})
60
60
  arg1.should == nil
61
61
  arg2.should == nil
62
- Client.call_new_hooks(:point1, 'foo', 'bar')
62
+ Client.call_hooks(:point1, 'foo', 'bar')
63
63
  arg1.should == 'foo'
64
64
  arg2.should == 'bar'
65
65
  end
@@ -176,15 +176,12 @@ module Termtter
176
176
  end
177
177
 
178
178
  it 'run' do
179
- Client.should_receive(:puts)
180
179
  Client.should_receive(:load_default_plugins)
181
180
  Client.should_receive(:load_config)
182
181
  Termtter::API.should_receive(:setup)
183
- Client.should_receive(:pre_config_load)
182
+ Client.should_receive(:post_config_load)
184
183
  Client.should_receive(:call_hooks)
185
- Client.should_receive(:call_new_hooks)
186
184
  Client.should_receive(:setup_update_timeline_task)
187
- Client.should_receive(:call_commands)
188
185
  Client.should_receive(:start_input_thread)
189
186
  Client.run
190
187
  end
@@ -81,18 +81,18 @@ module Termtter
81
81
  lambda { Command.new(:aliases => ['u']) }.should raise_error(ArgumentError)
82
82
  end
83
83
 
84
- it 'should call exec_proc when call method "execute"' do
85
- @command.execute('test').should == 'test'
86
- @command.execute(' test').should == ' test'
87
- @command.execute(' test ').should == ' test '
88
- @command.execute('test test').should == 'test test'
84
+ it 'should call exec_proc when call method "call"' do
85
+ @command.call('test').should == 'test'
86
+ @command.call(' test').should == ' test'
87
+ @command.call(' test ').should == ' test '
88
+ @command.call('test test').should == 'test test'
89
89
  end
90
90
 
91
- it 'should raise ArgumentError at execute' do
92
- lambda { @command.execute(nil) }.should_not raise_error(ArgumentError)
93
- lambda { @command.execute('foo') }.should_not raise_error(ArgumentError)
94
- lambda { @command.execute(false) }.should raise_error(ArgumentError)
95
- lambda { @command.execute(Array.new) }.should raise_error(ArgumentError)
91
+ it 'should raise ArgumentError at call' do
92
+ lambda { @command.call(nil) }.should_not raise_error(ArgumentError)
93
+ lambda { @command.call('foo') }.should_not raise_error(ArgumentError)
94
+ lambda { @command.call(false) }.should raise_error(ArgumentError)
95
+ lambda { @command.call(Array.new) }.should raise_error(ArgumentError)
96
96
  end
97
97
  end
98
98
  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: 1.0.3
4
+ version: 1.0.6
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-02-25 00:00:00 -08:00
13
+ date: 2009-03-21 00:00:00 -07: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.4.8
54
+ version: 0.6.3
55
55
  version:
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: sqlite3-ruby
@@ -74,6 +74,7 @@ extra_rdoc_files:
74
74
  - README.rdoc
75
75
  - History.txt
76
76
  files:
77
+ - lib/plugins/addspace.rb
77
78
  - lib/plugins/april_fool.rb
78
79
  - lib/plugins/bomb.rb
79
80
  - lib/plugins/clear.rb
@@ -150,20 +151,20 @@ files:
150
151
  - lib/termtter/task_manager.rb
151
152
  - lib/termtter/version.rb
152
153
  - lib/termtter.rb
153
- - spec/plugin/cool_spec.rb
154
- - spec/plugin/english_spec.rb
155
- - spec/plugin/favorite_spec.rb
156
- - spec/plugin/fib_spec.rb
157
- - spec/plugin/filter_spec.rb
158
- - spec/plugin/pause_spec.rb
159
- - spec/plugin/plugin_spec.rb
160
- - spec/plugin/primes_spec.rb
161
- - spec/plugin/shell_spec.rb
162
- - spec/plugin/sl_spec.rb
163
- - spec/plugin/spam_spec.rb
164
- - spec/plugin/standard_plugins_spec.rb
165
- - spec/plugin/storage/DB_spec.rb
166
- - spec/plugin/storage/status_spec.rb
154
+ - spec/plugins/cool_spec.rb
155
+ - spec/plugins/english_spec.rb
156
+ - spec/plugins/favorite_spec.rb
157
+ - spec/plugins/fib_spec.rb
158
+ - spec/plugins/filter_spec.rb
159
+ - spec/plugins/pause_spec.rb
160
+ - spec/plugins/plugin_spec.rb
161
+ - spec/plugins/primes_spec.rb
162
+ - spec/plugins/shell_spec.rb
163
+ - spec/plugins/sl_spec.rb
164
+ - spec/plugins/spam_spec.rb
165
+ - spec/plugins/standard_plugins_spec.rb
166
+ - spec/plugins/storage/DB_spec.rb
167
+ - spec/plugins/storage/status_spec.rb
167
168
  - spec/spec_helper.rb
168
169
  - spec/termtter/client_spec.rb
169
170
  - spec/termtter/command_spec.rb