t 1.6.0 → 1.7.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CONTRIBUTING.md +48 -0
- data/README.md +17 -0
- data/Rakefile +3 -0
- data/bin/t +13 -4
- data/lib/t/cli.rb +34 -31
- data/lib/t/delete.rb +2 -2
- data/lib/t/list.rb +3 -3
- data/lib/t/printable.rb +9 -3
- data/lib/t/requestable.rb +1 -1
- data/lib/t/search.rb +11 -15
- data/lib/t/version.rb +1 -1
- data/spec/cli_spec.rb +175 -142
- data/spec/delete_spec.rb +14 -14
- data/spec/list_spec.rb +273 -20
- data/spec/search_spec.rb +152 -124
- data/spec/set_spec.rb +7 -7
- data/t.gemspec +3 -6
- metadata +41 -86
data/spec/set_spec.rb
CHANGED
@@ -49,7 +49,7 @@ describe T::Set do
|
|
49
49
|
describe "#bio" do
|
50
50
|
before do
|
51
51
|
@set.options = @set.options.merge("profile" => fixture_path + "/.trc")
|
52
|
-
stub_post("/1.1/account/update_profile.json").with(:body => {:description => "Vagabond."}).to_return(:body => fixture("sferik.json")
|
52
|
+
stub_post("/1.1/account/update_profile.json").with(:body => {:description => "Vagabond."}).to_return(:body => fixture("sferik.json"))
|
53
53
|
end
|
54
54
|
it "requests the correct resource" do
|
55
55
|
@set.bio("Vagabond.")
|
@@ -64,7 +64,7 @@ describe T::Set do
|
|
64
64
|
describe "#language" do
|
65
65
|
before do
|
66
66
|
@set.options = @set.options.merge("profile" => fixture_path + "/.trc")
|
67
|
-
stub_post("/1.1/account/settings.json").with(:body => {:lang => "en"}).to_return(:body => fixture("settings.json")
|
67
|
+
stub_post("/1.1/account/settings.json").with(:body => {:lang => "en"}).to_return(:body => fixture("settings.json"))
|
68
68
|
end
|
69
69
|
it "requests the correct resource" do
|
70
70
|
@set.language("en")
|
@@ -79,7 +79,7 @@ describe T::Set do
|
|
79
79
|
describe "#location" do
|
80
80
|
before do
|
81
81
|
@set.options = @set.options.merge("profile" => fixture_path + "/.trc")
|
82
|
-
stub_post("/1.1/account/update_profile.json").with(:body => {:location => "San Francisco"}).to_return(:body => fixture("sferik.json")
|
82
|
+
stub_post("/1.1/account/update_profile.json").with(:body => {:location => "San Francisco"}).to_return(:body => fixture("sferik.json"))
|
83
83
|
end
|
84
84
|
it "requests the correct resource" do
|
85
85
|
@set.location("San Francisco")
|
@@ -94,7 +94,7 @@ describe T::Set do
|
|
94
94
|
describe "#name" do
|
95
95
|
before do
|
96
96
|
@set.options = @set.options.merge("profile" => fixture_path + "/.trc")
|
97
|
-
stub_post("/1.1/account/update_profile.json").with(:body => {:name => "Erik Michaels-Ober"}).to_return(:body => fixture("sferik.json")
|
97
|
+
stub_post("/1.1/account/update_profile.json").with(:body => {:name => "Erik Michaels-Ober"}).to_return(:body => fixture("sferik.json"))
|
98
98
|
end
|
99
99
|
it "requests the correct resource" do
|
100
100
|
@set.name("Erik Michaels-Ober")
|
@@ -109,7 +109,7 @@ describe T::Set do
|
|
109
109
|
describe "#profile_background_image" do
|
110
110
|
before do
|
111
111
|
@set.options = @set.options.merge("profile" => fixture_path + "/.trc")
|
112
|
-
stub_post("/1.1/account/update_profile_background_image.json").to_return(:body => fixture("sferik.json")
|
112
|
+
stub_post("/1.1/account/update_profile_background_image.json").to_return(:body => fixture("sferik.json"))
|
113
113
|
end
|
114
114
|
it "requests the correct resource" do
|
115
115
|
@set.profile_background_image(fixture_path + "/we_concept_bg2.png")
|
@@ -124,7 +124,7 @@ describe T::Set do
|
|
124
124
|
describe "#profile_image" do
|
125
125
|
before do
|
126
126
|
@set.options = @set.options.merge("profile" => fixture_path + "/.trc")
|
127
|
-
stub_post("/1.1/account/update_profile_image.json").to_return(:body => fixture("sferik.json")
|
127
|
+
stub_post("/1.1/account/update_profile_image.json").to_return(:body => fixture("sferik.json"))
|
128
128
|
end
|
129
129
|
it "requests the correct resource" do
|
130
130
|
@set.profile_image(fixture_path + "/me.jpg")
|
@@ -139,7 +139,7 @@ describe T::Set do
|
|
139
139
|
describe "#url" do
|
140
140
|
before do
|
141
141
|
@set.options = @set.options.merge("profile" => fixture_path + "/.trc")
|
142
|
-
stub_post("/1.1/account/update_profile.json").with(:body => {:url => "https://github.com/sferik"}).to_return(:body => fixture("sferik.json")
|
142
|
+
stub_post("/1.1/account/update_profile.json").with(:body => {:url => "https://github.com/sferik"}).to_return(:body => fixture("sferik.json"))
|
143
143
|
end
|
144
144
|
it "requests the correct resource" do
|
145
145
|
@set.url("https://github.com/sferik")
|
data/t.gemspec
CHANGED
@@ -7,20 +7,17 @@ Gem::Specification.new do |spec|
|
|
7
7
|
spec.add_dependency 'geokit', '~> 1.6'
|
8
8
|
spec.add_dependency 'htmlentities', '~> 4.3'
|
9
9
|
spec.add_dependency 'oauth', '~> 0.4'
|
10
|
-
spec.add_dependency 'oj', '~>
|
10
|
+
spec.add_dependency 'oj', '~> 2.0'
|
11
11
|
spec.add_dependency 'retryable', '~> 1.2'
|
12
12
|
spec.add_dependency 'thor', ['>= 0.16', '< 2']
|
13
13
|
spec.add_dependency 'tweetstream', '~> 2.3'
|
14
14
|
spec.add_dependency 'twitter', '~> 4.4'
|
15
|
-
spec.add_development_dependency 'pry'
|
16
|
-
spec.add_development_dependency 'pry-debugger'
|
17
|
-
spec.add_development_dependency 'simplecov'
|
18
15
|
spec.author = "Erik Michaels-Ober"
|
19
16
|
spec.bindir = 'bin'
|
20
17
|
spec.description = %q{A command-line power tool for Twitter.}
|
21
18
|
spec.email = 'sferik@gmail.com'
|
22
19
|
spec.executables = %w(t)
|
23
|
-
spec.files = %w(LICENSE.md README.md Rakefile t.gemspec)
|
20
|
+
spec.files = %w(CONTRIBUTING.md LICENSE.md README.md Rakefile t.gemspec)
|
24
21
|
spec.files += Dir.glob("lib/**/*.rb")
|
25
22
|
spec.files += Dir.glob("bin/**/*")
|
26
23
|
spec.files += Dir.glob("spec/**/*")
|
@@ -31,5 +28,5 @@ Gem::Specification.new do |spec|
|
|
31
28
|
spec.required_rubygems_version = Gem::Requirement.new(">= 1.3.6")
|
32
29
|
spec.summary = %q{CLI for Twitter}
|
33
30
|
spec.test_files = Dir.glob("spec/**/*")
|
34
|
-
spec.version = T::Version
|
31
|
+
spec.version = T::Version
|
35
32
|
end
|
metadata
CHANGED
@@ -2,129 +2,131 @@
|
|
2
2
|
name: t
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 1.
|
5
|
+
version: 1.7.0
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Erik Michaels-Ober
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-02-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
|
+
type: :runtime
|
15
16
|
version_requirements: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
16
18
|
requirements:
|
17
19
|
- - ~>
|
18
20
|
- !ruby/object:Gem::Version
|
19
21
|
version: '2.0'
|
20
|
-
none: false
|
21
22
|
name: launchy
|
22
|
-
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
requirement: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
25
26
|
requirements:
|
26
27
|
- - ~>
|
27
28
|
- !ruby/object:Gem::Version
|
28
29
|
version: '2.0'
|
29
|
-
none: false
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
|
+
type: :runtime
|
31
32
|
version_requirements: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
32
34
|
requirements:
|
33
35
|
- - ~>
|
34
36
|
- !ruby/object:Gem::Version
|
35
37
|
version: '1.5'
|
36
|
-
none: false
|
37
38
|
name: fastercsv
|
38
|
-
type: :runtime
|
39
39
|
prerelease: false
|
40
40
|
requirement: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
41
42
|
requirements:
|
42
43
|
- - ~>
|
43
44
|
- !ruby/object:Gem::Version
|
44
45
|
version: '1.5'
|
45
|
-
none: false
|
46
46
|
- !ruby/object:Gem::Dependency
|
47
|
+
type: :runtime
|
47
48
|
version_requirements: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
48
50
|
requirements:
|
49
51
|
- - ~>
|
50
52
|
- !ruby/object:Gem::Version
|
51
53
|
version: '1.6'
|
52
|
-
none: false
|
53
54
|
name: geokit
|
54
|
-
type: :runtime
|
55
55
|
prerelease: false
|
56
56
|
requirement: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
57
58
|
requirements:
|
58
59
|
- - ~>
|
59
60
|
- !ruby/object:Gem::Version
|
60
61
|
version: '1.6'
|
61
|
-
none: false
|
62
62
|
- !ruby/object:Gem::Dependency
|
63
|
+
type: :runtime
|
63
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
64
66
|
requirements:
|
65
67
|
- - ~>
|
66
68
|
- !ruby/object:Gem::Version
|
67
69
|
version: '4.3'
|
68
|
-
none: false
|
69
70
|
name: htmlentities
|
70
|
-
type: :runtime
|
71
71
|
prerelease: false
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
73
74
|
requirements:
|
74
75
|
- - ~>
|
75
76
|
- !ruby/object:Gem::Version
|
76
77
|
version: '4.3'
|
77
|
-
none: false
|
78
78
|
- !ruby/object:Gem::Dependency
|
79
|
+
type: :runtime
|
79
80
|
version_requirements: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
80
82
|
requirements:
|
81
83
|
- - ~>
|
82
84
|
- !ruby/object:Gem::Version
|
83
85
|
version: '0.4'
|
84
|
-
none: false
|
85
86
|
name: oauth
|
86
|
-
type: :runtime
|
87
87
|
prerelease: false
|
88
88
|
requirement: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
89
90
|
requirements:
|
90
91
|
- - ~>
|
91
92
|
- !ruby/object:Gem::Version
|
92
93
|
version: '0.4'
|
93
|
-
none: false
|
94
94
|
- !ruby/object:Gem::Dependency
|
95
|
+
type: :runtime
|
95
96
|
version_requirements: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
96
98
|
requirements:
|
97
99
|
- - ~>
|
98
100
|
- !ruby/object:Gem::Version
|
99
|
-
version: '
|
100
|
-
none: false
|
101
|
+
version: '2.0'
|
101
102
|
name: oj
|
102
|
-
type: :runtime
|
103
103
|
prerelease: false
|
104
104
|
requirement: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
105
106
|
requirements:
|
106
107
|
- - ~>
|
107
108
|
- !ruby/object:Gem::Version
|
108
|
-
version: '
|
109
|
-
none: false
|
109
|
+
version: '2.0'
|
110
110
|
- !ruby/object:Gem::Dependency
|
111
|
+
type: :runtime
|
111
112
|
version_requirements: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
112
114
|
requirements:
|
113
115
|
- - ~>
|
114
116
|
- !ruby/object:Gem::Version
|
115
117
|
version: '1.2'
|
116
|
-
none: false
|
117
118
|
name: retryable
|
118
|
-
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
requirement: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
121
122
|
requirements:
|
122
123
|
- - ~>
|
123
124
|
- !ruby/object:Gem::Version
|
124
125
|
version: '1.2'
|
125
|
-
none: false
|
126
126
|
- !ruby/object:Gem::Dependency
|
127
|
+
type: :runtime
|
127
128
|
version_requirements: !ruby/object:Gem::Requirement
|
129
|
+
none: false
|
128
130
|
requirements:
|
129
131
|
- - ! '>='
|
130
132
|
- !ruby/object:Gem::Version
|
@@ -132,11 +134,10 @@ dependencies:
|
|
132
134
|
- - <
|
133
135
|
- !ruby/object:Gem::Version
|
134
136
|
version: '2'
|
135
|
-
none: false
|
136
137
|
name: thor
|
137
|
-
type: :runtime
|
138
138
|
prerelease: false
|
139
139
|
requirement: !ruby/object:Gem::Requirement
|
140
|
+
none: false
|
140
141
|
requirements:
|
141
142
|
- - ! '>='
|
142
143
|
- !ruby/object:Gem::Version
|
@@ -144,87 +145,38 @@ dependencies:
|
|
144
145
|
- - <
|
145
146
|
- !ruby/object:Gem::Version
|
146
147
|
version: '2'
|
147
|
-
none: false
|
148
148
|
- !ruby/object:Gem::Dependency
|
149
|
+
type: :runtime
|
149
150
|
version_requirements: !ruby/object:Gem::Requirement
|
151
|
+
none: false
|
150
152
|
requirements:
|
151
153
|
- - ~>
|
152
154
|
- !ruby/object:Gem::Version
|
153
155
|
version: '2.3'
|
154
|
-
none: false
|
155
156
|
name: tweetstream
|
156
|
-
type: :runtime
|
157
157
|
prerelease: false
|
158
158
|
requirement: !ruby/object:Gem::Requirement
|
159
|
+
none: false
|
159
160
|
requirements:
|
160
161
|
- - ~>
|
161
162
|
- !ruby/object:Gem::Version
|
162
163
|
version: '2.3'
|
163
|
-
none: false
|
164
164
|
- !ruby/object:Gem::Dependency
|
165
|
+
type: :runtime
|
165
166
|
version_requirements: !ruby/object:Gem::Requirement
|
167
|
+
none: false
|
166
168
|
requirements:
|
167
169
|
- - ~>
|
168
170
|
- !ruby/object:Gem::Version
|
169
171
|
version: '4.4'
|
170
|
-
none: false
|
171
172
|
name: twitter
|
172
|
-
type: :runtime
|
173
173
|
prerelease: false
|
174
174
|
requirement: !ruby/object:Gem::Requirement
|
175
|
+
none: false
|
175
176
|
requirements:
|
176
177
|
- - ~>
|
177
178
|
- !ruby/object:Gem::Version
|
178
179
|
version: '4.4'
|
179
|
-
none: false
|
180
|
-
- !ruby/object:Gem::Dependency
|
181
|
-
version_requirements: !ruby/object:Gem::Requirement
|
182
|
-
requirements:
|
183
|
-
- - ! '>='
|
184
|
-
- !ruby/object:Gem::Version
|
185
|
-
version: '0'
|
186
|
-
none: false
|
187
|
-
name: pry
|
188
|
-
type: :development
|
189
|
-
prerelease: false
|
190
|
-
requirement: !ruby/object:Gem::Requirement
|
191
|
-
requirements:
|
192
|
-
- - ! '>='
|
193
|
-
- !ruby/object:Gem::Version
|
194
|
-
version: '0'
|
195
|
-
none: false
|
196
|
-
- !ruby/object:Gem::Dependency
|
197
|
-
version_requirements: !ruby/object:Gem::Requirement
|
198
|
-
requirements:
|
199
|
-
- - ! '>='
|
200
|
-
- !ruby/object:Gem::Version
|
201
|
-
version: '0'
|
202
|
-
none: false
|
203
|
-
name: pry-debugger
|
204
|
-
type: :development
|
205
|
-
prerelease: false
|
206
|
-
requirement: !ruby/object:Gem::Requirement
|
207
|
-
requirements:
|
208
|
-
- - ! '>='
|
209
|
-
- !ruby/object:Gem::Version
|
210
|
-
version: '0'
|
211
|
-
none: false
|
212
|
-
- !ruby/object:Gem::Dependency
|
213
|
-
version_requirements: !ruby/object:Gem::Requirement
|
214
|
-
requirements:
|
215
|
-
- - ! '>='
|
216
|
-
- !ruby/object:Gem::Version
|
217
|
-
version: '0'
|
218
|
-
none: false
|
219
|
-
name: simplecov
|
220
|
-
type: :development
|
221
|
-
prerelease: false
|
222
|
-
requirement: !ruby/object:Gem::Requirement
|
223
|
-
requirements:
|
224
|
-
- - ! '>='
|
225
|
-
- !ruby/object:Gem::Version
|
226
|
-
version: '0'
|
227
|
-
none: false
|
228
180
|
description: A command-line power tool for Twitter.
|
229
181
|
email: sferik@gmail.com
|
230
182
|
executables:
|
@@ -232,6 +184,7 @@ executables:
|
|
232
184
|
extensions: []
|
233
185
|
extra_rdoc_files: []
|
234
186
|
files:
|
187
|
+
- CONTRIBUTING.md
|
235
188
|
- LICENSE.md
|
236
189
|
- README.md
|
237
190
|
- Rakefile
|
@@ -319,20 +272,23 @@ rdoc_options: []
|
|
319
272
|
require_paths:
|
320
273
|
- lib
|
321
274
|
required_ruby_version: !ruby/object:Gem::Requirement
|
275
|
+
none: false
|
322
276
|
requirements:
|
323
277
|
- - ! '>='
|
324
278
|
- !ruby/object:Gem::Version
|
279
|
+
segments:
|
280
|
+
- 0
|
281
|
+
hash: 3408290980749693215
|
325
282
|
version: '0'
|
326
|
-
none: false
|
327
283
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
284
|
+
none: false
|
328
285
|
requirements:
|
329
286
|
- - ! '>='
|
330
287
|
- !ruby/object:Gem::Version
|
331
288
|
version: 1.3.6
|
332
|
-
none: false
|
333
289
|
requirements: []
|
334
290
|
rubyforge_project:
|
335
|
-
rubygems_version: 1.8.
|
291
|
+
rubygems_version: 1.8.25
|
336
292
|
signing_key:
|
337
293
|
specification_version: 3
|
338
294
|
summary: CLI for Twitter
|
@@ -396,4 +352,3 @@ test_files:
|
|
396
352
|
- spec/set_spec.rb
|
397
353
|
- spec/stream_spec.rb
|
398
354
|
- spec/utils_spec.rb
|
399
|
-
has_rdoc:
|