codetocustomer-twitter 0.6.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. data/History +215 -0
  2. data/License +20 -0
  3. data/Notes +33 -0
  4. data/README.rdoc +19 -0
  5. data/Rakefile +103 -0
  6. data/VERSION.yml +4 -0
  7. data/examples/connect.rb +30 -0
  8. data/examples/friendship_existance.rb +13 -0
  9. data/examples/helpers/config_store.rb +38 -0
  10. data/examples/httpauth.rb +11 -0
  11. data/examples/ids.rb +13 -0
  12. data/examples/search.rb +15 -0
  13. data/examples/timeline.rb +19 -0
  14. data/examples/unauthorized.rb +16 -0
  15. data/examples/update.rb +11 -0
  16. data/examples/user.rb +5 -0
  17. data/lib/twitter.rb +63 -0
  18. data/lib/twitter/base.rb +165 -0
  19. data/lib/twitter/httpauth.rb +27 -0
  20. data/lib/twitter/oauth.rb +41 -0
  21. data/lib/twitter/request.rb +102 -0
  22. data/lib/twitter/search.rb +111 -0
  23. data/lib/twitter/trends.rb +29 -0
  24. data/test/fixtures/firehose.json +1 -0
  25. data/test/fixtures/follower_ids.json +1 -0
  26. data/test/fixtures/friend_ids.json +1 -0
  27. data/test/fixtures/friends_timeline.json +1 -0
  28. data/test/fixtures/rate_limit_exceeded.json +1 -0
  29. data/test/fixtures/replies.json +1 -0
  30. data/test/fixtures/search.json +1 -0
  31. data/test/fixtures/search_from_jnunemaker.json +1 -0
  32. data/test/fixtures/status.json +1 -0
  33. data/test/fixtures/status_show.json +1 -0
  34. data/test/fixtures/trends_current.json +1 -0
  35. data/test/fixtures/trends_current_exclude.json +1 -0
  36. data/test/fixtures/trends_daily.json +1 -0
  37. data/test/fixtures/trends_daily_date.json +1 -0
  38. data/test/fixtures/trends_daily_exclude.json +1 -0
  39. data/test/fixtures/trends_weekly.json +1 -0
  40. data/test/fixtures/trends_weekly_date.json +1 -0
  41. data/test/fixtures/trends_weekly_exclude.json +1 -0
  42. data/test/fixtures/user.json +1 -0
  43. data/test/fixtures/user_timeline.json +1 -0
  44. data/test/test_helper.rb +36 -0
  45. data/test/twitter/base_test.rb +95 -0
  46. data/test/twitter/httpauth_test.rb +76 -0
  47. data/test/twitter/oauth_test.rb +105 -0
  48. data/test/twitter/request_test.rb +217 -0
  49. data/test/twitter/search_test.rb +159 -0
  50. data/test/twitter/trends_test.rb +95 -0
  51. data/test/twitter_test.rb +38 -0
  52. metadata +200 -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,200 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: codetocustomer-twitter
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.6.14
5
+ platform: ruby
6
+ authors:
7
+ - John Nunemaker
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-07-27 00:00:00 -07:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: oauth
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 0.3.5
24
+ version:
25
+ - !ruby/object:Gem::Dependency
26
+ name: mash
27
+ type: :runtime
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "="
32
+ - !ruby/object:Gem::Version
33
+ version: 0.0.3
34
+ version:
35
+ - !ruby/object:Gem::Dependency
36
+ name: httparty
37
+ type: :runtime
38
+ version_requirement:
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - "="
42
+ - !ruby/object:Gem::Version
43
+ version: 0.4.3
44
+ version:
45
+ - !ruby/object:Gem::Dependency
46
+ name: thoughtbot-shoulda
47
+ type: :development
48
+ version_requirement:
49
+ version_requirements: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: "0"
54
+ version:
55
+ - !ruby/object:Gem::Dependency
56
+ name: jeremymcanally-matchy
57
+ type: :development
58
+ version_requirement:
59
+ version_requirements: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - ">="
62
+ - !ruby/object:Gem::Version
63
+ version: "0"
64
+ version:
65
+ - !ruby/object:Gem::Dependency
66
+ name: mocha
67
+ type: :development
68
+ version_requirement:
69
+ version_requirements: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - ">="
72
+ - !ruby/object:Gem::Version
73
+ version: "0"
74
+ version:
75
+ - !ruby/object:Gem::Dependency
76
+ name: fakeweb
77
+ type: :development
78
+ version_requirement:
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: "0"
84
+ version:
85
+ - !ruby/object:Gem::Dependency
86
+ name: mash
87
+ type: :development
88
+ version_requirement:
89
+ version_requirements: !ruby/object:Gem::Requirement
90
+ requirements:
91
+ - - ">="
92
+ - !ruby/object:Gem::Version
93
+ version: "0"
94
+ version:
95
+ description:
96
+ email: nunemaker@gmail.com
97
+ executables: []
98
+
99
+ extensions: []
100
+
101
+ extra_rdoc_files:
102
+ - README.rdoc
103
+ files:
104
+ - History
105
+ - License
106
+ - Notes
107
+ - README.rdoc
108
+ - Rakefile
109
+ - VERSION.yml
110
+ - examples/connect.rb
111
+ - examples/friendship_existance.rb
112
+ - examples/helpers/config_store.rb
113
+ - examples/httpauth.rb
114
+ - examples/ids.rb
115
+ - examples/search.rb
116
+ - examples/timeline.rb
117
+ - examples/unauthorized.rb
118
+ - examples/update.rb
119
+ - examples/user.rb
120
+ - lib/twitter.rb
121
+ - lib/twitter/base.rb
122
+ - lib/twitter/httpauth.rb
123
+ - lib/twitter/oauth.rb
124
+ - lib/twitter/request.rb
125
+ - lib/twitter/search.rb
126
+ - lib/twitter/trends.rb
127
+ - test/fixtures/firehose.json
128
+ - test/fixtures/follower_ids.json
129
+ - test/fixtures/friend_ids.json
130
+ - test/fixtures/friends_timeline.json
131
+ - test/fixtures/rate_limit_exceeded.json
132
+ - test/fixtures/replies.json
133
+ - test/fixtures/search.json
134
+ - test/fixtures/search_from_jnunemaker.json
135
+ - test/fixtures/status.json
136
+ - test/fixtures/status_show.json
137
+ - test/fixtures/trends_current.json
138
+ - test/fixtures/trends_current_exclude.json
139
+ - test/fixtures/trends_daily.json
140
+ - test/fixtures/trends_daily_date.json
141
+ - test/fixtures/trends_daily_exclude.json
142
+ - test/fixtures/trends_weekly.json
143
+ - test/fixtures/trends_weekly_date.json
144
+ - test/fixtures/trends_weekly_exclude.json
145
+ - test/fixtures/user.json
146
+ - test/fixtures/user_timeline.json
147
+ - test/test_helper.rb
148
+ - test/twitter/base_test.rb
149
+ - test/twitter/httpauth_test.rb
150
+ - test/twitter/oauth_test.rb
151
+ - test/twitter/request_test.rb
152
+ - test/twitter/search_test.rb
153
+ - test/twitter/trends_test.rb
154
+ - test/twitter_test.rb
155
+ has_rdoc: true
156
+ homepage: http://github.com/jnunemaker/twitter
157
+ licenses:
158
+ post_install_message:
159
+ rdoc_options:
160
+ - --charset=UTF-8
161
+ require_paths:
162
+ - lib
163
+ required_ruby_version: !ruby/object:Gem::Requirement
164
+ requirements:
165
+ - - ">="
166
+ - !ruby/object:Gem::Version
167
+ version: "0"
168
+ version:
169
+ required_rubygems_version: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - ">="
172
+ - !ruby/object:Gem::Version
173
+ version: "0"
174
+ version:
175
+ requirements: []
176
+
177
+ rubyforge_project: twitter
178
+ rubygems_version: 1.3.5
179
+ signing_key:
180
+ specification_version: 2
181
+ summary: wrapper for the twitter api (oauth only)
182
+ test_files:
183
+ - test/test_helper.rb
184
+ - test/twitter/base_test.rb
185
+ - test/twitter/httpauth_test.rb
186
+ - test/twitter/oauth_test.rb
187
+ - test/twitter/request_test.rb
188
+ - test/twitter/search_test.rb
189
+ - test/twitter/trends_test.rb
190
+ - test/twitter_test.rb
191
+ - examples/connect.rb
192
+ - examples/friendship_existance.rb
193
+ - examples/helpers/config_store.rb
194
+ - examples/httpauth.rb
195
+ - examples/ids.rb
196
+ - examples/search.rb
197
+ - examples/timeline.rb
198
+ - examples/unauthorized.rb
199
+ - examples/update.rb
200
+ - examples/user.rb