twitterland 0.4.5 → 0.4.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,6 +3,7 @@ require 'test/unit'
3
3
  require 'shoulda'
4
4
  require 'mocha'
5
5
  require 'fakeweb'
6
+ require 'redgreen'
6
7
 
7
8
  gem 'jnunemaker-matchy', '0.4.0'
8
9
  require 'matchy'
@@ -0,0 +1,15 @@
1
+ require File.dirname(__FILE__) + '/../test_helper'
2
+
3
+ class CadmusTest < Test::Unit::TestCase
4
+
5
+ context "Hitting the Cadmus API" do
6
+ should "return the stream for an authenticated user" do
7
+ stub_get 'http://thecadmus.com/api/posts?key=OU812&count=5&timespan=3&page=2', 'cadmus.json'
8
+ posts = Twitterland::Cadmus.posts(:key => 'OU812', :count => 5, :timespan => 3, :page => 2)
9
+ posts.first['type'].should == 'twitter'
10
+ posts.first.user.screen_name.should == 'chrisbrogan'
11
+ posts.first.comments.size.should == 13
12
+ posts.first.related.should be_empty
13
+ end
14
+ end
15
+ end
@@ -8,9 +8,8 @@ class FollerMeTest < Test::Unit::TestCase
8
8
  should "should display all terms for a user" do
9
9
  stub_get('http://api.foller.me/pengwynn/all.json', 'foller_me_all.json')
10
10
  result = Twitterland::FollerMe.terms('pengwynn')
11
- result.topics.keys.size.should == 51
12
- result.topics.keys.first.should == 'saints'
13
- result.topics.values.first.popularity.should == 2
11
+ result.topics.keys.size.should == 818
12
+ result.topics.firefox.popularity.should == 2
14
13
  end
15
14
 
16
15
  should "should allow options" do
@@ -22,9 +21,8 @@ class FollerMeTest < Test::Unit::TestCase
22
21
  should "should display topics for a user" do
23
22
  stub_get('http://api.foller.me/pengwynn/topics.json', 'foller_me_topics.json')
24
23
  result = Twitterland::FollerMe.topics('pengwynn')
25
- result.topics.keys.size.should == 51
26
- result.topics.keys.first.should == 'saints'
27
- result.topics.values.first.popularity.should == 2
24
+ result.topics.keys.size.should == 818
25
+ result.topics.firefox.popularity.should == 2
28
26
  end
29
27
 
30
28
  should "should display mentions for a user" do
@@ -39,8 +37,7 @@ class FollerMeTest < Test::Unit::TestCase
39
37
  stub_get('http://api.foller.me/pengwynn/hashtags.json', 'foller_me_hashtags.json')
40
38
  result = Twitterland::FollerMe.hashtags('pengwynn')
41
39
  result.hashtags.keys.size.should == 25
42
- result.hashtags.keys.first.should == '#typos'
43
- result.hashtags.values.first.popularity.should == 1
40
+ result.hashtags['#typos'].popularity.should == 1
44
41
  end
45
42
  end
46
43
 
@@ -0,0 +1,19 @@
1
+ require File.dirname(__FILE__) + '/../test_helper'
2
+
3
+ class One40ProofTest < Test::Unit::TestCase
4
+ include Twitterland
5
+
6
+ context "One40Proof gem" do
7
+ should "give access to test API call" do
8
+ assert defined?(One40Proof::Test)
9
+ end
10
+
11
+ should "give access to the User API call" do
12
+ assert defined?(One40Proof::User)
13
+ end
14
+
15
+ should "give access to the Search API call" do
16
+ assert defined?(One40Proof::Search)
17
+ end
18
+ end
19
+ end
@@ -1,6 +1,5 @@
1
1
  class TweetMemeTest < Test::Unit::TestCase
2
- include Twitterland
3
-
2
+
4
3
  context "When hitting the Core API" do
5
4
 
6
5
  should "display details for a url" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twitterland
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.5
4
+ version: 0.4.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wynn Netherland
@@ -11,18 +11,18 @@ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
13
 
14
- date: 2010-03-03 00:00:00 -06:00
14
+ date: 2010-04-04 00:00:00 -05:00
15
15
  default_executable:
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
- name: mash
18
+ name: hashie
19
19
  type: :runtime
20
20
  version_requirement:
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
- - - "="
23
+ - - ">="
24
24
  - !ruby/object:Gem::Version
25
- version: 0.0.3
25
+ version: 0.2.0
26
26
  version:
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: httparty
@@ -34,6 +34,16 @@ dependencies:
34
34
  - !ruby/object:Gem::Version
35
35
  version: 0.4.3
36
36
  version:
37
+ - !ruby/object:Gem::Dependency
38
+ name: one40_proof
39
+ type: :runtime
40
+ version_requirement:
41
+ version_requirements: !ruby/object:Gem::Requirement
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ version: 0.0.3
46
+ version:
37
47
  - !ruby/object:Gem::Dependency
38
48
  name: thoughtbot-shoulda
39
49
  type: :development
@@ -75,7 +85,7 @@ dependencies:
75
85
  version: "0"
76
86
  version:
77
87
  - !ruby/object:Gem::Dependency
78
- name: mash
88
+ name: hashie
79
89
  type: :development
80
90
  version_requirement:
81
91
  version_requirements: !ruby/object:Gem::Requirement
@@ -85,7 +95,7 @@ dependencies:
85
95
  version: "0"
86
96
  version:
87
97
  description:
88
- email: info@squeejee.com
98
+ email: wynn.netherland@gmail.com
89
99
  executables: []
90
100
 
91
101
  extensions: []
@@ -101,9 +111,11 @@ files:
101
111
  - lib/twitterland.rb
102
112
  - lib/twitterland/autoff.rb
103
113
  - lib/twitterland/back_tweets.rb
114
+ - lib/twitterland/cadmus.rb
104
115
  - lib/twitterland/foller_me.rb
105
116
  - lib/twitterland/follow_cost.rb
106
117
  - lib/twitterland/mrtweet.rb
118
+ - lib/twitterland/one40_proof.rb
107
119
  - lib/twitterland/thumbfight.rb
108
120
  - lib/twitterland/tweet_blocker.rb
109
121
  - lib/twitterland/tweet_meme/analytics.rb
@@ -116,6 +128,7 @@ files:
116
128
  - test/fixtures/autoff.json
117
129
  - test/fixtures/backtweets.json
118
130
  - test/fixtures/backtweets_unauthenticated.json
131
+ - test/fixtures/cadmus.json
119
132
  - test/fixtures/foller_me_all.json
120
133
  - test/fixtures/foller_me_hashtags.json
121
134
  - test/fixtures/foller_me_mentions.json
@@ -146,9 +159,11 @@ files:
146
159
  - test/test_helper.rb
147
160
  - test/twitterland/autoff_test.rb
148
161
  - test/twitterland/back_tweets_test.rb
162
+ - test/twitterland/cadmus_test.rb
149
163
  - test/twitterland/foller_me_test.rb
150
164
  - test/twitterland/follow_cost_test.rb
151
165
  - test/twitterland/mrtweet_test.rb
166
+ - test/twitterland/one40_proof_test.rb
152
167
  - test/twitterland/thumbfight_test.rb
153
168
  - test/twitterland/tweet_blocker_test.rb
154
169
  - test/twitterland/tweet_meme_test.rb
@@ -156,7 +171,7 @@ files:
156
171
  - test/twitterland/twitter_grader_test.rb
157
172
  - test/twitterland/zutual_test.rb
158
173
  has_rdoc: true
159
- homepage: http://github.com/squeejee/twitterland
174
+ homepage: http://github.com/pengwynn/twitterland
160
175
  licenses: []
161
176
 
162
177
  post_install_message:
@@ -187,9 +202,11 @@ test_files:
187
202
  - test/test_helper.rb
188
203
  - test/twitterland/autoff_test.rb
189
204
  - test/twitterland/back_tweets_test.rb
205
+ - test/twitterland/cadmus_test.rb
190
206
  - test/twitterland/foller_me_test.rb
191
207
  - test/twitterland/follow_cost_test.rb
192
208
  - test/twitterland/mrtweet_test.rb
209
+ - test/twitterland/one40_proof_test.rb
193
210
  - test/twitterland/thumbfight_test.rb
194
211
  - test/twitterland/tweet_blocker_test.rb
195
212
  - test/twitterland/tweet_meme_test.rb