termtter 1.11.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
data/lib/termtter/api.rb
CHANGED
@@ -103,9 +103,9 @@ module Termtter
|
|
103
103
|
:app_name => config.app_name.empty? ? Termtter::APP_NAME : config.app_name,
|
104
104
|
:host => config.host,
|
105
105
|
:header => {
|
106
|
-
'User-Agent' => 'Termtter http://github.com/
|
106
|
+
'User-Agent' => 'Termtter http://github.com/termtter/termtter',
|
107
107
|
'X-Twitter-Client' => 'Termtter',
|
108
|
-
'X-Twitter-Client-URL' => 'http://github.com/
|
108
|
+
'X-Twitter-Client-URL' => 'http://github.com/termtter/termtter',
|
109
109
|
'X-Twitter-Client-Version' => Termtter::VERSION
|
110
110
|
},
|
111
111
|
:enable_ssl => config.enable_ssl,
|
data/lib/termtter/version.rb
CHANGED
@@ -0,0 +1,22 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
|
3
|
+
require File.expand_path(File.dirname(__FILE__)) + '/../../spec_helper'
|
4
|
+
|
5
|
+
describe Termtter::Client, 'plugin expand_tco_url' do
|
6
|
+
before do
|
7
|
+
be_quiet { Termtter::Client.plug 'defaults/expand_tco_url' }
|
8
|
+
end
|
9
|
+
|
10
|
+
it 'should expand urls' do
|
11
|
+
text1 = 'あいうえお http://example.com/xyz'
|
12
|
+
urls1 = [{:url => 'http://example.com/xyz', :expanded_url => 'http://example.net/abc'}]
|
13
|
+
Termtter::Client.expand_tco_urls!(text1, urls1)
|
14
|
+
text1.should == 'あいうえお http://example.net/abc'
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'should not raise exception when url does not matched' do
|
18
|
+
text = 'text without urls'
|
19
|
+
urls = [{:url => 'http://example.com/xyz', :expanded_url => 'http://example.net/abc'}]
|
20
|
+
lambda { Termtter::Client.expand_tco_urls!(text, urls) }.should_not raise_exception
|
21
|
+
end
|
22
|
+
end
|
metadata
CHANGED
@@ -1,115 +1,107 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: termtter
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 1
|
8
|
-
- 11
|
9
|
-
- 0
|
10
|
-
version: 1.11.0
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 2.0.0
|
5
|
+
prerelease:
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- jugyo
|
14
9
|
- ujihisa
|
15
10
|
- koichiroo
|
16
11
|
autorequire:
|
17
12
|
bindir: bin
|
18
13
|
cert_chain: []
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
dependencies:
|
23
|
-
- !ruby/object:Gem::Dependency
|
14
|
+
date: 2013-04-07 00:00:00.000000000 Z
|
15
|
+
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
24
17
|
name: json
|
25
|
-
|
26
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
18
|
+
requirement: !ruby/object:Gem::Requirement
|
27
19
|
none: false
|
28
|
-
requirements:
|
29
|
-
- -
|
30
|
-
- !ruby/object:Gem::Version
|
31
|
-
hash: 21
|
32
|
-
segments:
|
33
|
-
- 1
|
34
|
-
- 1
|
35
|
-
- 3
|
20
|
+
requirements:
|
21
|
+
- - ! '>='
|
22
|
+
- !ruby/object:Gem::Version
|
36
23
|
version: 1.1.3
|
37
24
|
type: :runtime
|
38
|
-
version_requirements: *id001
|
39
|
-
- !ruby/object:Gem::Dependency
|
40
|
-
name: highline
|
41
25
|
prerelease: false
|
42
|
-
|
26
|
+
version_requirements: !ruby/object:Gem::Requirement
|
27
|
+
none: false
|
28
|
+
requirements:
|
29
|
+
- - ! '>='
|
30
|
+
- !ruby/object:Gem::Version
|
31
|
+
version: 1.1.3
|
32
|
+
- !ruby/object:Gem::Dependency
|
33
|
+
name: highline
|
34
|
+
requirement: !ruby/object:Gem::Requirement
|
43
35
|
none: false
|
44
|
-
requirements:
|
45
|
-
- -
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
hash: 3
|
48
|
-
segments:
|
49
|
-
- 1
|
50
|
-
- 5
|
51
|
-
- 0
|
36
|
+
requirements:
|
37
|
+
- - ! '>='
|
38
|
+
- !ruby/object:Gem::Version
|
52
39
|
version: 1.5.0
|
53
40
|
type: :runtime
|
54
|
-
version_requirements: *id002
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: termcolor
|
57
41
|
prerelease: false
|
58
|
-
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
59
43
|
none: false
|
60
|
-
requirements:
|
61
|
-
- -
|
62
|
-
- !ruby/object:Gem::Version
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
44
|
+
requirements:
|
45
|
+
- - ! '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 1.5.0
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: termcolor
|
50
|
+
requirement: !ruby/object:Gem::Requirement
|
51
|
+
none: false
|
52
|
+
requirements:
|
53
|
+
- - ! '>='
|
54
|
+
- !ruby/object:Gem::Version
|
68
55
|
version: 1.0.0
|
69
56
|
type: :runtime
|
70
|
-
version_requirements: *id003
|
71
|
-
- !ruby/object:Gem::Dependency
|
72
|
-
name: rubytter
|
73
57
|
prerelease: false
|
74
|
-
|
58
|
+
version_requirements: !ruby/object:Gem::Requirement
|
75
59
|
none: false
|
76
|
-
requirements:
|
77
|
-
- -
|
78
|
-
- !ruby/object:Gem::Version
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
60
|
+
requirements:
|
61
|
+
- - ! '>='
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: 1.0.0
|
64
|
+
- !ruby/object:Gem::Dependency
|
65
|
+
name: rubytter
|
66
|
+
requirement: !ruby/object:Gem::Requirement
|
67
|
+
none: false
|
68
|
+
requirements:
|
69
|
+
- - ! '>='
|
70
|
+
- !ruby/object:Gem::Version
|
84
71
|
version: 1.4.0
|
85
72
|
type: :runtime
|
86
|
-
version_requirements: *id004
|
87
|
-
- !ruby/object:Gem::Dependency
|
88
|
-
name: notify
|
89
73
|
prerelease: false
|
90
|
-
|
74
|
+
version_requirements: !ruby/object:Gem::Requirement
|
75
|
+
none: false
|
76
|
+
requirements:
|
77
|
+
- - ! '>='
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: 1.4.0
|
80
|
+
- !ruby/object:Gem::Dependency
|
81
|
+
name: notify
|
82
|
+
requirement: !ruby/object:Gem::Requirement
|
91
83
|
none: false
|
92
|
-
requirements:
|
93
|
-
- -
|
94
|
-
- !ruby/object:Gem::Version
|
95
|
-
hash: 21
|
96
|
-
segments:
|
97
|
-
- 0
|
98
|
-
- 2
|
99
|
-
- 1
|
84
|
+
requirements:
|
85
|
+
- - ! '>='
|
86
|
+
- !ruby/object:Gem::Version
|
100
87
|
version: 0.2.1
|
101
88
|
type: :runtime
|
102
|
-
|
89
|
+
prerelease: false
|
90
|
+
version_requirements: !ruby/object:Gem::Requirement
|
91
|
+
none: false
|
92
|
+
requirements:
|
93
|
+
- - ! '>='
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: 0.2.1
|
103
96
|
description: Termtter is a terminal based Twitter client.
|
104
97
|
email: jugyo.org@gmail.com
|
105
|
-
executables:
|
98
|
+
executables:
|
106
99
|
- termtter
|
107
100
|
extensions: []
|
108
|
-
|
109
|
-
extra_rdoc_files:
|
101
|
+
extra_rdoc_files:
|
110
102
|
- ChangeLog
|
111
103
|
- README.rdoc
|
112
|
-
files:
|
104
|
+
files:
|
113
105
|
- .gitignore
|
114
106
|
- ChangeLog
|
115
107
|
- Gemfile
|
@@ -344,6 +336,7 @@ files:
|
|
344
336
|
- spec/plugins/cool_spec.rb
|
345
337
|
- spec/plugins/curry_spec.rb
|
346
338
|
- spec/plugins/db_spec.rb
|
339
|
+
- spec/plugins/defaults/expand_tco_url_spec.rb
|
347
340
|
- spec/plugins/defaults/hashtag_spec.rb
|
348
341
|
- spec/plugins/defaults/list_spec.rb
|
349
342
|
- spec/plugins/defaults/plugin_spec.rb
|
@@ -389,48 +382,40 @@ files:
|
|
389
382
|
- spec/termtter/task_spec.rb
|
390
383
|
- spec/termtter_spec.rb
|
391
384
|
- termtter.gemspec
|
392
|
-
has_rdoc: true
|
393
385
|
homepage: http://termtter.github.com/
|
394
386
|
licenses: []
|
395
|
-
|
396
387
|
post_install_message:
|
397
|
-
rdoc_options:
|
388
|
+
rdoc_options:
|
398
389
|
- --main
|
399
390
|
- README.rdoc
|
400
391
|
- --exclude
|
401
392
|
- spec
|
402
|
-
require_paths:
|
393
|
+
require_paths:
|
403
394
|
- lib
|
404
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
395
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
405
396
|
none: false
|
406
|
-
requirements:
|
407
|
-
- -
|
408
|
-
- !ruby/object:Gem::Version
|
409
|
-
|
410
|
-
|
411
|
-
- 0
|
412
|
-
version: "0"
|
413
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
397
|
+
requirements:
|
398
|
+
- - ! '>='
|
399
|
+
- !ruby/object:Gem::Version
|
400
|
+
version: '0'
|
401
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
414
402
|
none: false
|
415
|
-
requirements:
|
416
|
-
- -
|
417
|
-
- !ruby/object:Gem::Version
|
418
|
-
|
419
|
-
segments:
|
420
|
-
- 0
|
421
|
-
version: "0"
|
403
|
+
requirements:
|
404
|
+
- - ! '>='
|
405
|
+
- !ruby/object:Gem::Version
|
406
|
+
version: '0'
|
422
407
|
requirements: []
|
423
|
-
|
424
408
|
rubyforge_project: termtter
|
425
|
-
rubygems_version: 1.
|
409
|
+
rubygems_version: 1.8.23
|
426
410
|
signing_key:
|
427
411
|
specification_version: 3
|
428
412
|
summary: Terminal based Twitter client.
|
429
|
-
test_files:
|
413
|
+
test_files:
|
430
414
|
- spec/plugins/capital_update_spec.rb
|
431
415
|
- spec/plugins/cool_spec.rb
|
432
416
|
- spec/plugins/curry_spec.rb
|
433
417
|
- spec/plugins/db_spec.rb
|
418
|
+
- spec/plugins/defaults/expand_tco_url_spec.rb
|
434
419
|
- spec/plugins/defaults/hashtag_spec.rb
|
435
420
|
- spec/plugins/defaults/list_spec.rb
|
436
421
|
- spec/plugins/defaults/plugin_spec.rb
|