jugyo-termtter 1.0.3 → 1.0.6
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 +1 -1
- data/lib/plugins/addspace.rb +27 -0
- data/lib/plugins/bomb.rb +9 -12
- data/lib/plugins/expand-tinyurl.rb +12 -3
- data/lib/plugins/group.rb +10 -6
- data/lib/plugins/growl.rb +3 -3
- data/lib/plugins/history.rb +21 -10
- data/lib/plugins/log.rb +10 -10
- data/lib/plugins/msagent.rb +23 -11
- data/lib/plugins/notify-send.rb +17 -12
- data/lib/plugins/plugin.rb +1 -1
- data/lib/plugins/say.rb +8 -6
- data/lib/plugins/scrape.rb +1 -1
- data/lib/plugins/screen-notify.rb +17 -10
- data/lib/plugins/standard_plugins.rb +30 -19
- data/lib/plugins/stdout.rb +35 -54
- data/lib/plugins/storage/status.rb +23 -20
- data/lib/plugins/storage.rb +17 -23
- data/lib/plugins/update_editor.rb +1 -1
- data/lib/plugins/uri-open.rb +7 -5
- data/lib/plugins/url_addspace.rb +1 -1
- data/lib/termtter/api.rb +2 -1
- data/lib/termtter/client.rb +90 -118
- data/lib/termtter/command.rb +6 -1
- data/lib/termtter/hook.rb +7 -2
- data/lib/termtter/system_extensions.rb +15 -10
- data/lib/termtter/version.rb +1 -1
- data/lib/termtter.rb +11 -0
- data/spec/{plugin → plugins}/cool_spec.rb +0 -0
- data/spec/{plugin → plugins}/english_spec.rb +0 -0
- data/spec/{plugin → plugins}/favorite_spec.rb +0 -0
- data/spec/{plugin → plugins}/fib_spec.rb +0 -0
- data/spec/{plugin → plugins}/filter_spec.rb +0 -0
- data/spec/{plugin → plugins}/pause_spec.rb +0 -0
- data/spec/{plugin → plugins}/plugin_spec.rb +0 -0
- data/spec/{plugin → plugins}/primes_spec.rb +0 -0
- data/spec/{plugin → plugins}/shell_spec.rb +0 -0
- data/spec/{plugin → plugins}/sl_spec.rb +0 -0
- data/spec/{plugin → plugins}/spam_spec.rb +0 -0
- data/spec/{plugin → plugins}/standard_plugins_spec.rb +0 -0
- data/spec/{plugin → plugins}/storage/DB_spec.rb +0 -0
- data/spec/{plugin → plugins}/storage/status_spec.rb +1 -1
- data/spec/termtter/client_spec.rb +5 -8
- data/spec/termtter/command_spec.rb +10 -10
- 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
|
@@ -6,7 +6,7 @@ module Termtter
|
|
6
6
|
|
7
7
|
describe Client do
|
8
8
|
|
9
|
-
it 'should take
|
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
|
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.
|
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.
|
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(:
|
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 "
|
85
|
-
@command.
|
86
|
-
@command.
|
87
|
-
@command.
|
88
|
-
@command.
|
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
|
92
|
-
lambda { @command.
|
93
|
-
lambda { @command.
|
94
|
-
lambda { @command.
|
95
|
-
lambda { @command.
|
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.
|
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-
|
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.
|
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/
|
154
|
-
- spec/
|
155
|
-
- spec/
|
156
|
-
- spec/
|
157
|
-
- spec/
|
158
|
-
- spec/
|
159
|
-
- spec/
|
160
|
-
- spec/
|
161
|
-
- spec/
|
162
|
-
- spec/
|
163
|
-
- spec/
|
164
|
-
- spec/
|
165
|
-
- spec/
|
166
|
-
- spec/
|
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
|