teejayvanslyke-twitter 0.6.11
Sign up to get free protection for your applications and to get access to all the features.
- data/History +206 -0
- data/License +20 -0
- data/Notes +33 -0
- data/README.rdoc +19 -0
- data/Rakefile +103 -0
- data/VERSION.yml +4 -0
- data/examples/connect.rb +30 -0
- data/examples/friendship_existance.rb +13 -0
- data/examples/helpers/config_store.rb +38 -0
- data/examples/httpauth.rb +11 -0
- data/examples/ids.rb +13 -0
- data/examples/search.rb +15 -0
- data/examples/timeline.rb +19 -0
- data/examples/unauthorized.rb +16 -0
- data/examples/update.rb +11 -0
- data/examples/user.rb +5 -0
- data/lib/twitter.rb +63 -0
- data/lib/twitter/base.rb +216 -0
- data/lib/twitter/httpauth.rb +27 -0
- data/lib/twitter/oauth.rb +41 -0
- data/lib/twitter/request.rb +102 -0
- data/lib/twitter/search.rb +106 -0
- data/lib/twitter/trends.rb +29 -0
- data/test/fixtures/firehose.json +1 -0
- data/test/fixtures/follower_ids.json +1 -0
- data/test/fixtures/friend_ids.json +1 -0
- data/test/fixtures/friends_timeline.json +1 -0
- data/test/fixtures/rate_limit_exceeded.json +1 -0
- data/test/fixtures/replies.json +1 -0
- data/test/fixtures/search.json +1 -0
- data/test/fixtures/search_from_jnunemaker.json +1 -0
- data/test/fixtures/status.json +1 -0
- data/test/fixtures/status_show.json +1 -0
- data/test/fixtures/trends_current.json +1 -0
- data/test/fixtures/trends_current_exclude.json +1 -0
- data/test/fixtures/trends_daily.json +1 -0
- data/test/fixtures/trends_daily_date.json +1 -0
- data/test/fixtures/trends_daily_exclude.json +1 -0
- data/test/fixtures/trends_weekly.json +1 -0
- data/test/fixtures/trends_weekly_date.json +1 -0
- data/test/fixtures/trends_weekly_exclude.json +1 -0
- data/test/fixtures/user.json +1 -0
- data/test/fixtures/user_timeline.json +1 -0
- data/test/test_helper.rb +36 -0
- data/test/twitter/base_test.rb +95 -0
- data/test/twitter/httpauth_test.rb +76 -0
- data/test/twitter/oauth_test.rb +81 -0
- data/test/twitter/request_test.rb +217 -0
- data/test/twitter/search_test.rb +144 -0
- data/test/twitter/trends_test.rb +95 -0
- data/test/twitter_test.rb +38 -0
- metadata +202 -0
@@ -0,0 +1,38 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class TwitterTest < Test::Unit::TestCase
|
4
|
+
should "have firehose method for public timeline" do
|
5
|
+
stub_get('http://twitter.com:80/statuses/public_timeline.json', 'firehose.json')
|
6
|
+
hose = Twitter.firehose
|
7
|
+
hose.size.should == 20
|
8
|
+
first = hose.first
|
9
|
+
first.text.should == '#torrents Ultimativer Flirt Guide - In 10 Minuten jede Frau erobern: Ultimativer Flirt Guide - In 10 Mi.. http://tinyurl.com/d3okh4'
|
10
|
+
first.user.name.should == 'P2P Torrents'
|
11
|
+
end
|
12
|
+
|
13
|
+
should "have user method for unauthenticated calls to get a user's information" do
|
14
|
+
stub_get('http://twitter.com:80/users/show/jnunemaker.json', 'user.json')
|
15
|
+
user = Twitter.user('jnunemaker')
|
16
|
+
user.name.should == 'John Nunemaker'
|
17
|
+
user.description.should == 'Loves his wife, ruby, notre dame football and iu basketball'
|
18
|
+
end
|
19
|
+
|
20
|
+
should "have status method for unauthenticated calls to get a status" do
|
21
|
+
stub_get('http://twitter.com:80/statuses/show/1533815199.json', 'status_show.json')
|
22
|
+
status = Twitter.status(1533815199)
|
23
|
+
status.id.should == 1533815199
|
24
|
+
status.text.should == 'Eating some oatmeal and butterscotch cookies with a cold glass of milk for breakfast. Tasty!'
|
25
|
+
end
|
26
|
+
|
27
|
+
should "have friend_ids method" do
|
28
|
+
stub_get('http://twitter.com:80/friends/ids/jnunemaker.json', 'friend_ids.json')
|
29
|
+
ids = Twitter.friend_ids('jnunemaker')
|
30
|
+
ids.size.should == 161
|
31
|
+
end
|
32
|
+
|
33
|
+
should "have follower_ids method" do
|
34
|
+
stub_get('http://twitter.com:80/followers/ids/jnunemaker.json', 'follower_ids.json')
|
35
|
+
ids = Twitter.follower_ids('jnunemaker')
|
36
|
+
ids.size.should == 1252
|
37
|
+
end
|
38
|
+
end
|
metadata
ADDED
@@ -0,0 +1,202 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: teejayvanslyke-twitter
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.6.11
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- John Nunemaker
|
8
|
+
- T.J. VanSlyke
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
|
13
|
+
date: 2009-11-02 00:00:00 -08:00
|
14
|
+
default_executable:
|
15
|
+
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
17
|
+
name: oauth
|
18
|
+
type: :runtime
|
19
|
+
version_requirement:
|
20
|
+
version_requirements: !ruby/object:Gem::Requirement
|
21
|
+
requirements:
|
22
|
+
- - "="
|
23
|
+
- !ruby/object:Gem::Version
|
24
|
+
version: 0.3.4
|
25
|
+
version:
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: mash
|
28
|
+
type: :runtime
|
29
|
+
version_requirement:
|
30
|
+
version_requirements: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - "="
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: 0.0.3
|
35
|
+
version:
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: httparty
|
38
|
+
type: :runtime
|
39
|
+
version_requirement:
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
requirements:
|
42
|
+
- - "="
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: 0.4.3
|
45
|
+
version:
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: thoughtbot-shoulda
|
48
|
+
type: :development
|
49
|
+
version_requirement:
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: "0"
|
55
|
+
version:
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: jeremymcanally-matchy
|
58
|
+
type: :development
|
59
|
+
version_requirement:
|
60
|
+
version_requirements: !ruby/object:Gem::Requirement
|
61
|
+
requirements:
|
62
|
+
- - ">="
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
version: "0"
|
65
|
+
version:
|
66
|
+
- !ruby/object:Gem::Dependency
|
67
|
+
name: mocha
|
68
|
+
type: :development
|
69
|
+
version_requirement:
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: "0"
|
75
|
+
version:
|
76
|
+
- !ruby/object:Gem::Dependency
|
77
|
+
name: fakeweb
|
78
|
+
type: :development
|
79
|
+
version_requirement:
|
80
|
+
version_requirements: !ruby/object:Gem::Requirement
|
81
|
+
requirements:
|
82
|
+
- - ">="
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: "0"
|
85
|
+
version:
|
86
|
+
- !ruby/object:Gem::Dependency
|
87
|
+
name: mash
|
88
|
+
type: :development
|
89
|
+
version_requirement:
|
90
|
+
version_requirements: !ruby/object:Gem::Requirement
|
91
|
+
requirements:
|
92
|
+
- - ">="
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
version: "0"
|
95
|
+
version:
|
96
|
+
description:
|
97
|
+
email: teejay.vanslyke@gmail.com
|
98
|
+
executables: []
|
99
|
+
|
100
|
+
extensions: []
|
101
|
+
|
102
|
+
extra_rdoc_files:
|
103
|
+
- README.rdoc
|
104
|
+
files:
|
105
|
+
- History
|
106
|
+
- License
|
107
|
+
- Notes
|
108
|
+
- README.rdoc
|
109
|
+
- Rakefile
|
110
|
+
- VERSION.yml
|
111
|
+
- examples/connect.rb
|
112
|
+
- examples/friendship_existance.rb
|
113
|
+
- examples/helpers/config_store.rb
|
114
|
+
- examples/httpauth.rb
|
115
|
+
- examples/ids.rb
|
116
|
+
- examples/search.rb
|
117
|
+
- examples/timeline.rb
|
118
|
+
- examples/unauthorized.rb
|
119
|
+
- examples/update.rb
|
120
|
+
- examples/user.rb
|
121
|
+
- lib/twitter.rb
|
122
|
+
- lib/twitter/base.rb
|
123
|
+
- lib/twitter/httpauth.rb
|
124
|
+
- lib/twitter/oauth.rb
|
125
|
+
- lib/twitter/request.rb
|
126
|
+
- lib/twitter/search.rb
|
127
|
+
- lib/twitter/trends.rb
|
128
|
+
- test/fixtures/firehose.json
|
129
|
+
- test/fixtures/follower_ids.json
|
130
|
+
- test/fixtures/friend_ids.json
|
131
|
+
- test/fixtures/friends_timeline.json
|
132
|
+
- test/fixtures/rate_limit_exceeded.json
|
133
|
+
- test/fixtures/replies.json
|
134
|
+
- test/fixtures/search.json
|
135
|
+
- test/fixtures/search_from_jnunemaker.json
|
136
|
+
- test/fixtures/status.json
|
137
|
+
- test/fixtures/status_show.json
|
138
|
+
- test/fixtures/trends_current.json
|
139
|
+
- test/fixtures/trends_current_exclude.json
|
140
|
+
- test/fixtures/trends_daily.json
|
141
|
+
- test/fixtures/trends_daily_date.json
|
142
|
+
- test/fixtures/trends_daily_exclude.json
|
143
|
+
- test/fixtures/trends_weekly.json
|
144
|
+
- test/fixtures/trends_weekly_date.json
|
145
|
+
- test/fixtures/trends_weekly_exclude.json
|
146
|
+
- test/fixtures/user.json
|
147
|
+
- test/fixtures/user_timeline.json
|
148
|
+
- test/test_helper.rb
|
149
|
+
- test/twitter/base_test.rb
|
150
|
+
- test/twitter/httpauth_test.rb
|
151
|
+
- test/twitter/oauth_test.rb
|
152
|
+
- test/twitter/request_test.rb
|
153
|
+
- test/twitter/search_test.rb
|
154
|
+
- test/twitter/trends_test.rb
|
155
|
+
- test/twitter_test.rb
|
156
|
+
has_rdoc: true
|
157
|
+
homepage: http://github.com/teejayvanslyke/twitter
|
158
|
+
licenses: []
|
159
|
+
|
160
|
+
post_install_message:
|
161
|
+
rdoc_options:
|
162
|
+
- --charset=UTF-8
|
163
|
+
require_paths:
|
164
|
+
- lib
|
165
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
166
|
+
requirements:
|
167
|
+
- - ">="
|
168
|
+
- !ruby/object:Gem::Version
|
169
|
+
version: "0"
|
170
|
+
version:
|
171
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
172
|
+
requirements:
|
173
|
+
- - ">="
|
174
|
+
- !ruby/object:Gem::Version
|
175
|
+
version: "0"
|
176
|
+
version:
|
177
|
+
requirements: []
|
178
|
+
|
179
|
+
rubyforge_project: twitter
|
180
|
+
rubygems_version: 1.3.5
|
181
|
+
signing_key:
|
182
|
+
specification_version: 3
|
183
|
+
summary: wrapper for the twitter api (oauth only), with some modifications
|
184
|
+
test_files:
|
185
|
+
- test/test_helper.rb
|
186
|
+
- test/twitter/base_test.rb
|
187
|
+
- test/twitter/httpauth_test.rb
|
188
|
+
- test/twitter/oauth_test.rb
|
189
|
+
- test/twitter/request_test.rb
|
190
|
+
- test/twitter/search_test.rb
|
191
|
+
- test/twitter/trends_test.rb
|
192
|
+
- test/twitter_test.rb
|
193
|
+
- examples/connect.rb
|
194
|
+
- examples/friendship_existance.rb
|
195
|
+
- examples/helpers/config_store.rb
|
196
|
+
- examples/httpauth.rb
|
197
|
+
- examples/ids.rb
|
198
|
+
- examples/search.rb
|
199
|
+
- examples/timeline.rb
|
200
|
+
- examples/unauthorized.rb
|
201
|
+
- examples/update.rb
|
202
|
+
- examples/user.rb
|