termtter 2.2.0 → 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/ChangeLog +7 -0
- data/Gemfile +1 -1
- data/VERSION +1 -1
- data/lib/plugins/{expand-tinyurl.rb → expand_url.rb} +1 -1
- data/lib/plugins/quicklook.rb +1 -1
- data/lib/plugins/{tinyurl.rb → url_shortener.rb} +13 -13
- data/lib/termtter/version.rb +1 -1
- data/spec/plugins/expand_url_spec.rb +32 -0
- data/spec/plugins/{tinyurl_spec.rb → url_shortener_spec.rb} +9 -9
- data/termtter.gemspec +11 -32
- metadata +25 -207
- data/spec/plugins/expand-tinyurl_spec.rb +0 -21
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 5de3d65ab24659675cda8734741447b3cd198a28
|
4
|
+
data.tar.gz: 7128dc6441e6fe09f5b4b53f477ee563476bf94f
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 16bf26f2e015ad2010c109a4438412553b7d9e947e3931f925ee0872442a31588de478cf38fa47ccee559363ff7b5e7a69c0d004153c5793ec0c7bfaeb764ffc
|
7
|
+
data.tar.gz: 996433e58598aae53bb96f8043a5ab1c548336faa9b4e05177c754477a8c182a18e903e7e6d71b106c9fc2f012db4d8934079a9f45e202b5ab9e42fd5cf550a0
|
data/ChangeLog
CHANGED
data/Gemfile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.2.
|
1
|
+
2.2.1
|
@@ -25,7 +25,7 @@ config.plugins.expand_tinyurl.set_default(:shortters, [])
|
|
25
25
|
config.plugins.expand_tinyurl.set_default(:skip_users, [])
|
26
26
|
|
27
27
|
Termtter::Client::register_hook(
|
28
|
-
:name => :
|
28
|
+
:name => :expand_url,
|
29
29
|
:point => :filter_for_output,
|
30
30
|
:exec_proc => lambda do |statuses, event|
|
31
31
|
shortters = URL_SHORTTERS + config.plugins.expand_tinyurl.shortters
|
data/lib/plugins/quicklook.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
2
|
|
3
|
-
config.plugins.
|
3
|
+
config.plugins.url_shortener.set_default(:shorturl_makers, [
|
4
4
|
{ :host => "api.bit.ly",
|
5
5
|
:format => '/v3/shorten?login=termtter&apiKey=R_e7f22d523a803dbff7f67de18c109856&longUrl=%s&format=txt' },
|
6
6
|
{ :host => "is.gd", :format => '/api.php?longurl=%s' },
|
7
7
|
{ :host => "tinyurl.com", :format => '/api-create.php?url=%s' },
|
8
8
|
])
|
9
|
-
config.plugins.
|
9
|
+
config.plugins.url_shortener.set_default(:ignore_regexp, %r{
|
10
10
|
\Ahttp://bit\.ly/ | \Ahttp://tinyurl\.com/ | \Ahttp://is\.gd/
|
11
11
|
| \Ahttp://ff\.im/ | \Ahttp://j\.mp/ | \Ahttp://goo\.gl/
|
12
12
|
| \Ahttp://tr\.im/ | \Ahttp://short\.to/ | \Ahttp://ow\.ly/
|
@@ -14,27 +14,27 @@ config.plugins.tinyurl.set_default(:ignore_regexp, %r{
|
|
14
14
|
| \Ahttp://htn\.to/ | \Ahttp://cot\.ag/ | \Ahttp://ht\.ly/ | \Ahttp://p\.tl/
|
15
15
|
| \Ahttp://url4\.eu/ | \Ahttp://t\.co/
|
16
16
|
}x )
|
17
|
-
config.plugins.
|
18
|
-
config.plugins.
|
17
|
+
config.plugins.url_shortener.set_default(:url_shortener_hook_commands, [:update, :reply, :retweet])
|
18
|
+
config.plugins.url_shortener.set_default(
|
19
19
|
:uri_regexp,
|
20
20
|
/#{URI.regexp(%w(http https ftp))}\S*/ )
|
21
21
|
|
22
22
|
# Shorten URLs in tweets which size is longer than this value.
|
23
23
|
# If you want to shorten only when over termtter's limit, set `140'
|
24
|
-
config.plugins.
|
24
|
+
config.plugins.url_shortener.set_default(:when_over, 0)
|
25
25
|
|
26
26
|
module Termtter::Client
|
27
27
|
register_hook(
|
28
|
-
:name => :
|
29
|
-
:points => config.plugins.
|
28
|
+
:name => :url_shortener,
|
29
|
+
:points => config.plugins.url_shortener.url_shortener_hook_commands.map {|cmd|
|
30
30
|
"modify_arg_for_#{cmd.to_s}".to_sym
|
31
31
|
},
|
32
32
|
:exec_proc => lambda {|cmd, arg|
|
33
|
-
if config.plugins.
|
34
|
-
arg.charsize > config.plugins.
|
35
|
-
arg.gsub(config.plugins.
|
33
|
+
if config.plugins.url_shortener.when_over == 0 || # skip character count
|
34
|
+
arg.charsize > config.plugins.url_shortener.when_over
|
35
|
+
arg.gsub(config.plugins.url_shortener.uri_regexp) do |url|
|
36
36
|
result = nil
|
37
|
-
config.plugins.
|
37
|
+
config.plugins.url_shortener.shorturl_makers.each do |site|
|
38
38
|
result = shorten_url(url, site[:host], site[:format])
|
39
39
|
break if result
|
40
40
|
end
|
@@ -48,7 +48,7 @@ module Termtter::Client
|
|
48
48
|
|
49
49
|
# returns nil if not shorten
|
50
50
|
def self.shorten_url(url, host, format)
|
51
|
-
return url if config.plugins.
|
51
|
+
return url if config.plugins.url_shortener.ignore_regexp =~ url # already shorten
|
52
52
|
url_enc = URI.escape(url, /[^a-zA-Z0-9.:]/)
|
53
53
|
res = Termtter::HTTPpool.start(host) do |h|
|
54
54
|
h.get(format % url_enc)
|
@@ -67,5 +67,5 @@ module Termtter::Client
|
|
67
67
|
end
|
68
68
|
end
|
69
69
|
|
70
|
-
#
|
70
|
+
# url_shortener.rb
|
71
71
|
# make URLs in your update to convert tinyurl.com/XXXXXXX.
|
data/lib/termtter/version.rb
CHANGED
@@ -0,0 +1,32 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
|
3
|
+
require File.expand_path(File.dirname(__FILE__)) + '/../spec_helper'
|
4
|
+
|
5
|
+
describe Termtter::Client, 'when the plugin expand_url is loaded' do
|
6
|
+
it 'should expand url in status' do
|
7
|
+
f = nil
|
8
|
+
Termtter::Client.should_receive(:register_hook).once do |params|
|
9
|
+
f = params[:exec_proc]
|
10
|
+
end
|
11
|
+
config.plugins.expand_tinyurl.set_default('tinyurl.com', nil)
|
12
|
+
Termtter::Client.plug 'expand_url'
|
13
|
+
f.should_not be_nil
|
14
|
+
status_struct = Struct.new(:text)
|
15
|
+
statuses = []
|
16
|
+
user_struct = Struct.new(:id, :screen_name, :protected)
|
17
|
+
user_1 = user_struct.new(1, 'jugyo')
|
18
|
+
user_2 = user_struct.new(2, 'oyguj')
|
19
|
+
status_struct = Struct.new(:id, :text, :source, :user, :in_reply_to_status_id,
|
20
|
+
:in_reply_to_user_id, :created_at)
|
21
|
+
statuses << status_struct.new(1, 'あああ http://tinyurl.com/de5my6 aaa', 'termtter', user_1, 100, nil, Time.now.to_s)
|
22
|
+
statuses << status_struct.new(2, 'bar', 'termtter', user_1, nil, nil, Time.now.to_s)
|
23
|
+
statuses << status_struct.new(3, 'xxx', 'web', user_2, nil, nil, Time.now.to_s)
|
24
|
+
f.call(statuses, nil)
|
25
|
+
statuses[0].text.should == 'あああ http://example.com/テスト aaa'
|
26
|
+
end
|
27
|
+
|
28
|
+
it 'should define expand_url method' do
|
29
|
+
expand_url('is.gd', '/5oDxw').should == 'http://example.com/'
|
30
|
+
expand_url('goo.gl', '/e').should == 'http://www.google.com/'
|
31
|
+
end
|
32
|
+
end
|
@@ -5,16 +5,16 @@ require 'open-uri'
|
|
5
5
|
require 'uri'
|
6
6
|
require 'net/http'
|
7
7
|
|
8
|
-
describe 'plugin
|
8
|
+
describe 'plugin url_shortener' do
|
9
9
|
before do
|
10
10
|
Termtter::Client.setup_task_manager
|
11
11
|
end
|
12
12
|
|
13
|
-
it 'adds hook :
|
13
|
+
it 'adds hook :url_shortener' do
|
14
14
|
Termtter::Client.should_receive(:register_hook).once
|
15
|
-
Termtter::Client.plug '
|
16
|
-
#Termtter::Client.get_hook(:
|
17
|
-
#Termtter::Client.get_hook(:
|
15
|
+
Termtter::Client.plug 'url_shortener'
|
16
|
+
#Termtter::Client.get_hook(:url_shortener).should be_a_kind_of(Hook)
|
17
|
+
#Termtter::Client.get_hook(:url_shortener).name.should == :url_shortener
|
18
18
|
end
|
19
19
|
|
20
20
|
it 'truncates url' do
|
@@ -27,7 +27,7 @@ describe 'plugin tinyurl' do
|
|
27
27
|
end
|
28
28
|
end
|
29
29
|
)
|
30
|
-
Termtter::Client.plug '
|
30
|
+
Termtter::Client.plug 'url_shortener'
|
31
31
|
Termtter::Client.execute('update http://www.google.com/')
|
32
32
|
end
|
33
33
|
|
@@ -43,7 +43,7 @@ describe 'plugin tinyurl' do
|
|
43
43
|
end
|
44
44
|
end
|
45
45
|
)
|
46
|
-
Termtter::Client.plug '
|
46
|
+
Termtter::Client.plug 'url_shortener'
|
47
47
|
Termtter::Client.execute('update http://ja.wikipedia.org/wiki/深田恭子')
|
48
48
|
end
|
49
49
|
|
@@ -57,7 +57,7 @@ describe 'plugin tinyurl' do
|
|
57
57
|
end
|
58
58
|
end
|
59
59
|
)
|
60
|
-
Termtter::Client.plug '
|
60
|
+
Termtter::Client.plug 'url_shortener'
|
61
61
|
Termtter::Client.execute('update http://ja.wikipedia.org/wiki/%E3%82%B9%E3%83%88%E3%83%AA%E3%83%BC%E3%83%88%E3%82%B3%E3%83%B3%E3%83%94%E3%83%A5%E3%83%BC%E3%83%86%E3%82%A3%E3%83%B3%E3%82%B0')
|
62
62
|
end
|
63
63
|
|
@@ -71,7 +71,7 @@ describe 'plugin tinyurl' do
|
|
71
71
|
end
|
72
72
|
end
|
73
73
|
)
|
74
|
-
Termtter::Client.plug '
|
74
|
+
Termtter::Client.plug 'url_shortener'
|
75
75
|
Termtter::Client.execute('update http://www.google.co.jp/search?hl=ja&source=hp&q=ujihisa&lr=&aq=f&aqi=g4g-r6&aql=&oq=&gs_rfai=')
|
76
76
|
|
77
77
|
end
|
data/termtter.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "termtter"
|
8
|
-
s.version = "2.2.
|
8
|
+
s.version = "2.2.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["jugyo", "ujihisa", "koichiroo", "id774"]
|
12
|
-
s.date = "2013-
|
12
|
+
s.date = "2013-05-20"
|
13
13
|
s.description = "Termtter is a terminal based Twitter client."
|
14
14
|
s.email = "jugyo.org@gmail.com"
|
15
15
|
s.executables = ["termtter", "termtter_frame"]
|
@@ -83,7 +83,7 @@ Gem::Specification.new do |s|
|
|
83
83
|
"lib/plugins/error_log.rb",
|
84
84
|
"lib/plugins/event_invoked_at.rb",
|
85
85
|
"lib/plugins/exec_and_update.rb",
|
86
|
-
"lib/plugins/
|
86
|
+
"lib/plugins/expand_url.rb",
|
87
87
|
"lib/plugins/favotter.rb",
|
88
88
|
"lib/plugins/fib_filter.rb",
|
89
89
|
"lib/plugins/fibyou.rb",
|
@@ -202,7 +202,6 @@ Gem::Specification.new do |s|
|
|
202
202
|
"lib/plugins/system_status.rb",
|
203
203
|
"lib/plugins/time_signal.rb",
|
204
204
|
"lib/plugins/timer.rb",
|
205
|
-
"lib/plugins/tinyurl.rb",
|
206
205
|
"lib/plugins/toppo.rb",
|
207
206
|
"lib/plugins/train.rb",
|
208
207
|
"lib/plugins/translate_tweet.rb",
|
@@ -214,6 +213,7 @@ Gem::Specification.new do |s|
|
|
214
213
|
"lib/plugins/update_editor.rb",
|
215
214
|
"lib/plugins/uri-open.rb",
|
216
215
|
"lib/plugins/url.rb",
|
216
|
+
"lib/plugins/url_shortener.rb",
|
217
217
|
"lib/plugins/user_stream.rb",
|
218
218
|
"lib/plugins/w3mimg.rb",
|
219
219
|
"lib/plugins/wassr.rb",
|
@@ -259,7 +259,7 @@ Gem::Specification.new do |s|
|
|
259
259
|
"spec/plugins/defaults/retweet_spec.rb",
|
260
260
|
"spec/plugins/draft_spec.rb",
|
261
261
|
"spec/plugins/english_spec_.rb",
|
262
|
-
"spec/plugins/
|
262
|
+
"spec/plugins/expand_url_spec.rb",
|
263
263
|
"spec/plugins/fib_spec.rb",
|
264
264
|
"spec/plugins/filter_spec_.rb",
|
265
265
|
"spec/plugins/footer_spec.rb",
|
@@ -274,8 +274,8 @@ Gem::Specification.new do |s|
|
|
274
274
|
"spec/plugins/standard_commands_spec.rb",
|
275
275
|
"spec/plugins/storage/sqlite3_spec.rb",
|
276
276
|
"spec/plugins/storage/status_spec_.rb",
|
277
|
-
"spec/plugins/tinyurl_spec.rb",
|
278
277
|
"spec/plugins/truncate_spec.rb",
|
278
|
+
"spec/plugins/url_shortener_spec.rb",
|
279
279
|
"spec/plugins/whois_spec_.rb",
|
280
280
|
"spec/spec_helper.rb",
|
281
281
|
"spec/termtter/active_rubytter_spec.rb",
|
@@ -302,67 +302,46 @@ Gem::Specification.new do |s|
|
|
302
302
|
s.licenses = ["MIT"]
|
303
303
|
s.require_paths = ["lib"]
|
304
304
|
s.rubyforge_project = "termtter"
|
305
|
-
s.rubygems_version = "
|
305
|
+
s.rubygems_version = "2.0.3"
|
306
306
|
s.summary = "Terminal based Twitter client."
|
307
307
|
|
308
308
|
if s.respond_to? :specification_version then
|
309
|
-
s.specification_version =
|
309
|
+
s.specification_version = 4
|
310
310
|
|
311
311
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
312
|
-
s.add_runtime_dependency(%q<termtter>, [">= 0"])
|
313
312
|
s.add_runtime_dependency(%q<json>, ["> 1.1.3"])
|
314
313
|
s.add_runtime_dependency(%q<highline>, ["~> 1.5.0"])
|
315
314
|
s.add_runtime_dependency(%q<termcolor>, ["~> 1.0.0"])
|
316
315
|
s.add_runtime_dependency(%q<rubytter>, ["~> 1.5.1"])
|
317
|
-
s.add_runtime_dependency(%q<notify>, ["~> 0.
|
316
|
+
s.add_runtime_dependency(%q<notify>, ["~> 0.5.1"])
|
318
317
|
s.add_development_dependency(%q<rspec>, [">= 0"])
|
319
318
|
s.add_development_dependency(%q<rdoc>, [">= 0"])
|
320
319
|
s.add_development_dependency(%q<cucumber>, [">= 0"])
|
321
320
|
s.add_development_dependency(%q<bundler>, [">= 0"])
|
322
321
|
s.add_development_dependency(%q<jeweler>, [">= 0"])
|
323
|
-
s.add_development_dependency(%q<cucumber>, [">= 0"])
|
324
|
-
s.add_development_dependency(%q<bundler>, [">= 0"])
|
325
|
-
s.add_development_dependency(%q<jeweler>, [">= 0"])
|
326
|
-
s.add_development_dependency(%q<cucumber>, [">= 0"])
|
327
|
-
s.add_development_dependency(%q<bundler>, [">= 0"])
|
328
|
-
s.add_development_dependency(%q<jeweler>, [">= 0"])
|
329
322
|
else
|
330
|
-
s.add_dependency(%q<termtter>, [">= 0"])
|
331
323
|
s.add_dependency(%q<json>, ["> 1.1.3"])
|
332
324
|
s.add_dependency(%q<highline>, ["~> 1.5.0"])
|
333
325
|
s.add_dependency(%q<termcolor>, ["~> 1.0.0"])
|
334
326
|
s.add_dependency(%q<rubytter>, ["~> 1.5.1"])
|
335
|
-
s.add_dependency(%q<notify>, ["~> 0.
|
327
|
+
s.add_dependency(%q<notify>, ["~> 0.5.1"])
|
336
328
|
s.add_dependency(%q<rspec>, [">= 0"])
|
337
329
|
s.add_dependency(%q<rdoc>, [">= 0"])
|
338
330
|
s.add_dependency(%q<cucumber>, [">= 0"])
|
339
331
|
s.add_dependency(%q<bundler>, [">= 0"])
|
340
332
|
s.add_dependency(%q<jeweler>, [">= 0"])
|
341
|
-
s.add_dependency(%q<cucumber>, [">= 0"])
|
342
|
-
s.add_dependency(%q<bundler>, [">= 0"])
|
343
|
-
s.add_dependency(%q<jeweler>, [">= 0"])
|
344
|
-
s.add_dependency(%q<cucumber>, [">= 0"])
|
345
|
-
s.add_dependency(%q<bundler>, [">= 0"])
|
346
|
-
s.add_dependency(%q<jeweler>, [">= 0"])
|
347
333
|
end
|
348
334
|
else
|
349
|
-
s.add_dependency(%q<termtter>, [">= 0"])
|
350
335
|
s.add_dependency(%q<json>, ["> 1.1.3"])
|
351
336
|
s.add_dependency(%q<highline>, ["~> 1.5.0"])
|
352
337
|
s.add_dependency(%q<termcolor>, ["~> 1.0.0"])
|
353
338
|
s.add_dependency(%q<rubytter>, ["~> 1.5.1"])
|
354
|
-
s.add_dependency(%q<notify>, ["~> 0.
|
339
|
+
s.add_dependency(%q<notify>, ["~> 0.5.1"])
|
355
340
|
s.add_dependency(%q<rspec>, [">= 0"])
|
356
341
|
s.add_dependency(%q<rdoc>, [">= 0"])
|
357
342
|
s.add_dependency(%q<cucumber>, [">= 0"])
|
358
343
|
s.add_dependency(%q<bundler>, [">= 0"])
|
359
344
|
s.add_dependency(%q<jeweler>, [">= 0"])
|
360
|
-
s.add_dependency(%q<cucumber>, [">= 0"])
|
361
|
-
s.add_dependency(%q<bundler>, [">= 0"])
|
362
|
-
s.add_dependency(%q<jeweler>, [">= 0"])
|
363
|
-
s.add_dependency(%q<cucumber>, [">= 0"])
|
364
|
-
s.add_dependency(%q<bundler>, [">= 0"])
|
365
|
-
s.add_dependency(%q<jeweler>, [">= 0"])
|
366
345
|
end
|
367
346
|
end
|
368
347
|
|
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: termtter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
5
|
-
prerelease:
|
4
|
+
version: 2.2.1
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- jugyo
|
@@ -12,44 +11,25 @@ authors:
|
|
12
11
|
autorequire:
|
13
12
|
bindir: bin
|
14
13
|
cert_chain: []
|
15
|
-
date: 2013-
|
14
|
+
date: 2013-05-20 00:00:00.000000000 Z
|
16
15
|
dependencies:
|
17
|
-
- !ruby/object:Gem::Dependency
|
18
|
-
name: termtter
|
19
|
-
requirement: !ruby/object:Gem::Requirement
|
20
|
-
none: false
|
21
|
-
requirements:
|
22
|
-
- - ! '>='
|
23
|
-
- !ruby/object:Gem::Version
|
24
|
-
version: '0'
|
25
|
-
type: :runtime
|
26
|
-
prerelease: false
|
27
|
-
version_requirements: !ruby/object:Gem::Requirement
|
28
|
-
none: false
|
29
|
-
requirements:
|
30
|
-
- - ! '>='
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: '0'
|
33
16
|
- !ruby/object:Gem::Dependency
|
34
17
|
name: json
|
35
18
|
requirement: !ruby/object:Gem::Requirement
|
36
|
-
none: false
|
37
19
|
requirements:
|
38
|
-
- -
|
20
|
+
- - '>'
|
39
21
|
- !ruby/object:Gem::Version
|
40
22
|
version: 1.1.3
|
41
23
|
type: :runtime
|
42
24
|
prerelease: false
|
43
25
|
version_requirements: !ruby/object:Gem::Requirement
|
44
|
-
none: false
|
45
26
|
requirements:
|
46
|
-
- -
|
27
|
+
- - '>'
|
47
28
|
- !ruby/object:Gem::Version
|
48
29
|
version: 1.1.3
|
49
30
|
- !ruby/object:Gem::Dependency
|
50
31
|
name: highline
|
51
32
|
requirement: !ruby/object:Gem::Requirement
|
52
|
-
none: false
|
53
33
|
requirements:
|
54
34
|
- - ~>
|
55
35
|
- !ruby/object:Gem::Version
|
@@ -57,7 +37,6 @@ dependencies:
|
|
57
37
|
type: :runtime
|
58
38
|
prerelease: false
|
59
39
|
version_requirements: !ruby/object:Gem::Requirement
|
60
|
-
none: false
|
61
40
|
requirements:
|
62
41
|
- - ~>
|
63
42
|
- !ruby/object:Gem::Version
|
@@ -65,7 +44,6 @@ dependencies:
|
|
65
44
|
- !ruby/object:Gem::Dependency
|
66
45
|
name: termcolor
|
67
46
|
requirement: !ruby/object:Gem::Requirement
|
68
|
-
none: false
|
69
47
|
requirements:
|
70
48
|
- - ~>
|
71
49
|
- !ruby/object:Gem::Version
|
@@ -73,7 +51,6 @@ dependencies:
|
|
73
51
|
type: :runtime
|
74
52
|
prerelease: false
|
75
53
|
version_requirements: !ruby/object:Gem::Requirement
|
76
|
-
none: false
|
77
54
|
requirements:
|
78
55
|
- - ~>
|
79
56
|
- !ruby/object:Gem::Version
|
@@ -81,7 +58,6 @@ dependencies:
|
|
81
58
|
- !ruby/object:Gem::Dependency
|
82
59
|
name: rubytter
|
83
60
|
requirement: !ruby/object:Gem::Requirement
|
84
|
-
none: false
|
85
61
|
requirements:
|
86
62
|
- - ~>
|
87
63
|
- !ruby/object:Gem::Version
|
@@ -89,7 +65,6 @@ dependencies:
|
|
89
65
|
type: :runtime
|
90
66
|
prerelease: false
|
91
67
|
version_requirements: !ruby/object:Gem::Requirement
|
92
|
-
none: false
|
93
68
|
requirements:
|
94
69
|
- - ~>
|
95
70
|
- !ruby/object:Gem::Version
|
@@ -97,241 +72,85 @@ dependencies:
|
|
97
72
|
- !ruby/object:Gem::Dependency
|
98
73
|
name: notify
|
99
74
|
requirement: !ruby/object:Gem::Requirement
|
100
|
-
none: false
|
101
75
|
requirements:
|
102
76
|
- - ~>
|
103
77
|
- !ruby/object:Gem::Version
|
104
|
-
version: 0.
|
78
|
+
version: 0.5.1
|
105
79
|
type: :runtime
|
106
80
|
prerelease: false
|
107
81
|
version_requirements: !ruby/object:Gem::Requirement
|
108
|
-
none: false
|
109
82
|
requirements:
|
110
83
|
- - ~>
|
111
84
|
- !ruby/object:Gem::Version
|
112
|
-
version: 0.
|
85
|
+
version: 0.5.1
|
113
86
|
- !ruby/object:Gem::Dependency
|
114
87
|
name: rspec
|
115
88
|
requirement: !ruby/object:Gem::Requirement
|
116
|
-
none: false
|
117
89
|
requirements:
|
118
|
-
- -
|
90
|
+
- - '>='
|
119
91
|
- !ruby/object:Gem::Version
|
120
92
|
version: '0'
|
121
93
|
type: :development
|
122
94
|
prerelease: false
|
123
95
|
version_requirements: !ruby/object:Gem::Requirement
|
124
|
-
none: false
|
125
96
|
requirements:
|
126
|
-
- -
|
97
|
+
- - '>='
|
127
98
|
- !ruby/object:Gem::Version
|
128
99
|
version: '0'
|
129
100
|
- !ruby/object:Gem::Dependency
|
130
101
|
name: rdoc
|
131
102
|
requirement: !ruby/object:Gem::Requirement
|
132
|
-
none: false
|
133
|
-
requirements:
|
134
|
-
- - ! '>='
|
135
|
-
- !ruby/object:Gem::Version
|
136
|
-
version: '0'
|
137
|
-
type: :development
|
138
|
-
prerelease: false
|
139
|
-
version_requirements: !ruby/object:Gem::Requirement
|
140
|
-
none: false
|
141
|
-
requirements:
|
142
|
-
- - ! '>='
|
143
|
-
- !ruby/object:Gem::Version
|
144
|
-
version: '0'
|
145
|
-
- !ruby/object:Gem::Dependency
|
146
|
-
name: cucumber
|
147
|
-
requirement: !ruby/object:Gem::Requirement
|
148
|
-
none: false
|
149
|
-
requirements:
|
150
|
-
- - ! '>='
|
151
|
-
- !ruby/object:Gem::Version
|
152
|
-
version: '0'
|
153
|
-
type: :development
|
154
|
-
prerelease: false
|
155
|
-
version_requirements: !ruby/object:Gem::Requirement
|
156
|
-
none: false
|
157
|
-
requirements:
|
158
|
-
- - ! '>='
|
159
|
-
- !ruby/object:Gem::Version
|
160
|
-
version: '0'
|
161
|
-
- !ruby/object:Gem::Dependency
|
162
|
-
name: bundler
|
163
|
-
requirement: !ruby/object:Gem::Requirement
|
164
|
-
none: false
|
165
|
-
requirements:
|
166
|
-
- - ! '>='
|
167
|
-
- !ruby/object:Gem::Version
|
168
|
-
version: '0'
|
169
|
-
type: :development
|
170
|
-
prerelease: false
|
171
|
-
version_requirements: !ruby/object:Gem::Requirement
|
172
|
-
none: false
|
173
|
-
requirements:
|
174
|
-
- - ! '>='
|
175
|
-
- !ruby/object:Gem::Version
|
176
|
-
version: '0'
|
177
|
-
- !ruby/object:Gem::Dependency
|
178
|
-
name: jeweler
|
179
|
-
requirement: !ruby/object:Gem::Requirement
|
180
|
-
none: false
|
181
|
-
requirements:
|
182
|
-
- - ! '>='
|
183
|
-
- !ruby/object:Gem::Version
|
184
|
-
version: '0'
|
185
|
-
type: :development
|
186
|
-
prerelease: false
|
187
|
-
version_requirements: !ruby/object:Gem::Requirement
|
188
|
-
none: false
|
189
|
-
requirements:
|
190
|
-
- - ! '>='
|
191
|
-
- !ruby/object:Gem::Version
|
192
|
-
version: '0'
|
193
|
-
- !ruby/object:Gem::Dependency
|
194
|
-
name: cucumber
|
195
|
-
requirement: !ruby/object:Gem::Requirement
|
196
|
-
none: false
|
197
|
-
requirements:
|
198
|
-
- - ! '>='
|
199
|
-
- !ruby/object:Gem::Version
|
200
|
-
version: '0'
|
201
|
-
type: :development
|
202
|
-
prerelease: false
|
203
|
-
version_requirements: !ruby/object:Gem::Requirement
|
204
|
-
none: false
|
205
|
-
requirements:
|
206
|
-
- - ! '>='
|
207
|
-
- !ruby/object:Gem::Version
|
208
|
-
version: '0'
|
209
|
-
- !ruby/object:Gem::Dependency
|
210
|
-
name: bundler
|
211
|
-
requirement: !ruby/object:Gem::Requirement
|
212
|
-
none: false
|
213
|
-
requirements:
|
214
|
-
- - ! '>='
|
215
|
-
- !ruby/object:Gem::Version
|
216
|
-
version: '0'
|
217
|
-
type: :development
|
218
|
-
prerelease: false
|
219
|
-
version_requirements: !ruby/object:Gem::Requirement
|
220
|
-
none: false
|
221
|
-
requirements:
|
222
|
-
- - ! '>='
|
223
|
-
- !ruby/object:Gem::Version
|
224
|
-
version: '0'
|
225
|
-
- !ruby/object:Gem::Dependency
|
226
|
-
name: jeweler
|
227
|
-
requirement: !ruby/object:Gem::Requirement
|
228
|
-
none: false
|
229
|
-
requirements:
|
230
|
-
- - ! '>='
|
231
|
-
- !ruby/object:Gem::Version
|
232
|
-
version: '0'
|
233
|
-
type: :development
|
234
|
-
prerelease: false
|
235
|
-
version_requirements: !ruby/object:Gem::Requirement
|
236
|
-
none: false
|
237
|
-
requirements:
|
238
|
-
- - ! '>='
|
239
|
-
- !ruby/object:Gem::Version
|
240
|
-
version: '0'
|
241
|
-
- !ruby/object:Gem::Dependency
|
242
|
-
name: cucumber
|
243
|
-
requirement: !ruby/object:Gem::Requirement
|
244
|
-
none: false
|
245
|
-
requirements:
|
246
|
-
- - ! '>='
|
247
|
-
- !ruby/object:Gem::Version
|
248
|
-
version: '0'
|
249
|
-
type: :development
|
250
|
-
prerelease: false
|
251
|
-
version_requirements: !ruby/object:Gem::Requirement
|
252
|
-
none: false
|
253
|
-
requirements:
|
254
|
-
- - ! '>='
|
255
|
-
- !ruby/object:Gem::Version
|
256
|
-
version: '0'
|
257
|
-
- !ruby/object:Gem::Dependency
|
258
|
-
name: bundler
|
259
|
-
requirement: !ruby/object:Gem::Requirement
|
260
|
-
none: false
|
261
|
-
requirements:
|
262
|
-
- - ! '>='
|
263
|
-
- !ruby/object:Gem::Version
|
264
|
-
version: '0'
|
265
|
-
type: :development
|
266
|
-
prerelease: false
|
267
|
-
version_requirements: !ruby/object:Gem::Requirement
|
268
|
-
none: false
|
269
|
-
requirements:
|
270
|
-
- - ! '>='
|
271
|
-
- !ruby/object:Gem::Version
|
272
|
-
version: '0'
|
273
|
-
- !ruby/object:Gem::Dependency
|
274
|
-
name: jeweler
|
275
|
-
requirement: !ruby/object:Gem::Requirement
|
276
|
-
none: false
|
277
103
|
requirements:
|
278
|
-
- -
|
104
|
+
- - '>='
|
279
105
|
- !ruby/object:Gem::Version
|
280
106
|
version: '0'
|
281
107
|
type: :development
|
282
108
|
prerelease: false
|
283
109
|
version_requirements: !ruby/object:Gem::Requirement
|
284
|
-
none: false
|
285
110
|
requirements:
|
286
|
-
- -
|
111
|
+
- - '>='
|
287
112
|
- !ruby/object:Gem::Version
|
288
113
|
version: '0'
|
289
114
|
- !ruby/object:Gem::Dependency
|
290
115
|
name: cucumber
|
291
116
|
requirement: !ruby/object:Gem::Requirement
|
292
|
-
none: false
|
293
117
|
requirements:
|
294
|
-
- -
|
118
|
+
- - '>='
|
295
119
|
- !ruby/object:Gem::Version
|
296
120
|
version: '0'
|
297
121
|
type: :development
|
298
122
|
prerelease: false
|
299
123
|
version_requirements: !ruby/object:Gem::Requirement
|
300
|
-
none: false
|
301
124
|
requirements:
|
302
|
-
- -
|
125
|
+
- - '>='
|
303
126
|
- !ruby/object:Gem::Version
|
304
127
|
version: '0'
|
305
128
|
- !ruby/object:Gem::Dependency
|
306
129
|
name: bundler
|
307
130
|
requirement: !ruby/object:Gem::Requirement
|
308
|
-
none: false
|
309
131
|
requirements:
|
310
|
-
- -
|
132
|
+
- - '>='
|
311
133
|
- !ruby/object:Gem::Version
|
312
134
|
version: '0'
|
313
135
|
type: :development
|
314
136
|
prerelease: false
|
315
137
|
version_requirements: !ruby/object:Gem::Requirement
|
316
|
-
none: false
|
317
138
|
requirements:
|
318
|
-
- -
|
139
|
+
- - '>='
|
319
140
|
- !ruby/object:Gem::Version
|
320
141
|
version: '0'
|
321
142
|
- !ruby/object:Gem::Dependency
|
322
143
|
name: jeweler
|
323
144
|
requirement: !ruby/object:Gem::Requirement
|
324
|
-
none: false
|
325
145
|
requirements:
|
326
|
-
- -
|
146
|
+
- - '>='
|
327
147
|
- !ruby/object:Gem::Version
|
328
148
|
version: '0'
|
329
149
|
type: :development
|
330
150
|
prerelease: false
|
331
151
|
version_requirements: !ruby/object:Gem::Requirement
|
332
|
-
none: false
|
333
152
|
requirements:
|
334
|
-
- -
|
153
|
+
- - '>='
|
335
154
|
- !ruby/object:Gem::Version
|
336
155
|
version: '0'
|
337
156
|
description: Termtter is a terminal based Twitter client.
|
@@ -409,7 +228,7 @@ files:
|
|
409
228
|
- lib/plugins/error_log.rb
|
410
229
|
- lib/plugins/event_invoked_at.rb
|
411
230
|
- lib/plugins/exec_and_update.rb
|
412
|
-
- lib/plugins/
|
231
|
+
- lib/plugins/expand_url.rb
|
413
232
|
- lib/plugins/favotter.rb
|
414
233
|
- lib/plugins/fib_filter.rb
|
415
234
|
- lib/plugins/fibyou.rb
|
@@ -528,7 +347,6 @@ files:
|
|
528
347
|
- lib/plugins/system_status.rb
|
529
348
|
- lib/plugins/time_signal.rb
|
530
349
|
- lib/plugins/timer.rb
|
531
|
-
- lib/plugins/tinyurl.rb
|
532
350
|
- lib/plugins/toppo.rb
|
533
351
|
- lib/plugins/train.rb
|
534
352
|
- lib/plugins/translate_tweet.rb
|
@@ -540,6 +358,7 @@ files:
|
|
540
358
|
- lib/plugins/update_editor.rb
|
541
359
|
- lib/plugins/uri-open.rb
|
542
360
|
- lib/plugins/url.rb
|
361
|
+
- lib/plugins/url_shortener.rb
|
543
362
|
- lib/plugins/user_stream.rb
|
544
363
|
- lib/plugins/w3mimg.rb
|
545
364
|
- lib/plugins/wassr.rb
|
@@ -585,7 +404,7 @@ files:
|
|
585
404
|
- spec/plugins/defaults/retweet_spec.rb
|
586
405
|
- spec/plugins/draft_spec.rb
|
587
406
|
- spec/plugins/english_spec_.rb
|
588
|
-
- spec/plugins/
|
407
|
+
- spec/plugins/expand_url_spec.rb
|
589
408
|
- spec/plugins/fib_spec.rb
|
590
409
|
- spec/plugins/filter_spec_.rb
|
591
410
|
- spec/plugins/footer_spec.rb
|
@@ -600,8 +419,8 @@ files:
|
|
600
419
|
- spec/plugins/standard_commands_spec.rb
|
601
420
|
- spec/plugins/storage/sqlite3_spec.rb
|
602
421
|
- spec/plugins/storage/status_spec_.rb
|
603
|
-
- spec/plugins/tinyurl_spec.rb
|
604
422
|
- spec/plugins/truncate_spec.rb
|
423
|
+
- spec/plugins/url_shortener_spec.rb
|
605
424
|
- spec/plugins/whois_spec_.rb
|
606
425
|
- spec/spec_helper.rb
|
607
426
|
- spec/termtter/active_rubytter_spec.rb
|
@@ -626,26 +445,25 @@ files:
|
|
626
445
|
homepage: http://termtter.github.com/
|
627
446
|
licenses:
|
628
447
|
- MIT
|
448
|
+
metadata: {}
|
629
449
|
post_install_message:
|
630
450
|
rdoc_options: []
|
631
451
|
require_paths:
|
632
452
|
- lib
|
633
453
|
required_ruby_version: !ruby/object:Gem::Requirement
|
634
|
-
none: false
|
635
454
|
requirements:
|
636
|
-
- -
|
455
|
+
- - '>='
|
637
456
|
- !ruby/object:Gem::Version
|
638
457
|
version: '0'
|
639
458
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
640
|
-
none: false
|
641
459
|
requirements:
|
642
|
-
- -
|
460
|
+
- - '>='
|
643
461
|
- !ruby/object:Gem::Version
|
644
462
|
version: '0'
|
645
463
|
requirements: []
|
646
464
|
rubyforge_project: termtter
|
647
|
-
rubygems_version:
|
465
|
+
rubygems_version: 2.0.2
|
648
466
|
signing_key:
|
649
|
-
specification_version:
|
467
|
+
specification_version: 4
|
650
468
|
summary: Terminal based Twitter client.
|
651
469
|
test_files: []
|
@@ -1,21 +0,0 @@
|
|
1
|
-
# -*- coding: utf-8 -*-
|
2
|
-
|
3
|
-
require File.expand_path(File.dirname(__FILE__)) + '/../spec_helper'
|
4
|
-
|
5
|
-
describe Termtter::Client, 'when the plugin expand-tinyurl is loaded' do
|
6
|
-
before do
|
7
|
-
be_quiet { Termtter::Client.plug 'expand-tinyurl' }
|
8
|
-
end
|
9
|
-
|
10
|
-
it 'should define expand_url method' do
|
11
|
-
# TODO: 直接ネットにアクセスしに行かないようにしたい。 fakeweb?
|
12
|
-
|
13
|
-
expand_url('tinyurl.com', '/kotu').should == 'http://example.com/'
|
14
|
-
|
15
|
-
expand_url('tinyurl.com', '/de5my6').should == 'http://example.com/テスト'
|
16
|
-
|
17
|
-
expand_url('is.gd', '/5oDxw').should == 'http://example.com/'
|
18
|
-
|
19
|
-
expand_url('goo.gl', '/e').should == 'http://www.google.com/'
|
20
|
-
end
|
21
|
-
end
|