twitterland 0.4.1 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/History CHANGED
@@ -1,3 +1,4 @@
1
+ 0.4.2 - Added support for Zutual http://zutual.com
1
2
  0.4.1 - Added Auto Follow Friday support http://autoff.com
2
3
  0.4.0 - Added TweetMeme and Foller.me support
3
4
  0.3.0 - Added Thumbfight support http://thumbfight.com/ (thanks to Ron Evans) http://deadprogrammersociety.blogspot.com/
@@ -1,5 +1,5 @@
1
1
  ---
2
+ :patch: 2
2
3
  :major: 0
3
- :minor: 4
4
4
  :build:
5
- :patch: 1
5
+ :minor: 4
@@ -43,6 +43,7 @@ end
43
43
 
44
44
  directory = File.expand_path(File.dirname(__FILE__))
45
45
 
46
+ require File.join(directory, 'twitterland', 'zutual')
46
47
  require File.join(directory, 'twitterland', 'autoff')
47
48
  require File.join(directory, 'twitterland', 'foller_me')
48
49
  require File.join(directory, 'twitterland', 'follow_cost')
@@ -0,0 +1,11 @@
1
+ module Twitterland
2
+ class Zutual
3
+ include HTTParty
4
+ base_uri 'http://api.zutual.com/v/1'
5
+ format :json
6
+
7
+ def self.match(first_user, second_user)
8
+ Mash.new(get("/twitter/match/#{first_user}+#{second_user}.json")).matches
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,82 @@
1
+ {
2
+ "matches": [{
3
+ "topic": "google",
4
+ "strength": 87
5
+ },
6
+ {
7
+ "topic": "interview",
8
+ "strength": 87
9
+ },
10
+ {
11
+ "topic": "google chrome",
12
+ "strength": 67
13
+ },
14
+ {
15
+ "topic": "sass",
16
+ "strength": 60
17
+ },
18
+ {
19
+ "topic": "rsync",
20
+ "strength": 52
21
+ },
22
+ {
23
+ "topic": "rake",
24
+ "strength": 52
25
+ },
26
+ {
27
+ "topic": "gemcutter",
28
+ "strength": 47
29
+ },
30
+ {
31
+ "topic": "facebook",
32
+ "strength": 45
33
+ },
34
+ {
35
+ "topic": "wordpress deployment",
36
+ "strength": 42
37
+ },
38
+ {
39
+ "topic": "haml",
40
+ "strength": 42
41
+ },
42
+ {
43
+ "topic": "github",
44
+ "strength": 42
45
+ },
46
+ {
47
+ "topic": "dallas",
48
+ "strength": 35
49
+ },
50
+ {
51
+ "topic": "logo",
52
+ "strength": 32
53
+ },
54
+ {
55
+ "topic": "village church",
56
+ "strength": 32
57
+ },
58
+ {
59
+ "topic": "css",
60
+ "strength": 32
61
+ },
62
+ {
63
+ "topic": "mac",
64
+ "strength": 32
65
+ },
66
+ {
67
+ "topic": "tv",
68
+ "strength": 22
69
+ },
70
+ {
71
+ "topic": "fix-me",
72
+ "strength": 22
73
+ },
74
+ {
75
+ "topic": "dns",
76
+ "strength": 22
77
+ },
78
+ {
79
+ "topic": "lord",
80
+ "strength": 22
81
+ }]
82
+ }
@@ -0,0 +1,14 @@
1
+ require File.dirname(__FILE__) + '/../test_helper'
2
+
3
+ class AutoffTest < Test::Unit::TestCase
4
+ include Twitterland
5
+
6
+ context "Hitting the AutoFF API" do
7
+ should "return a list of most tweeted-to users" do
8
+ stub_get 'http://autoff.com/api/pengwynn', 'autoff.json'
9
+ results = Twitterland::Autoff.user('pengwynn')
10
+ results.should include('adamstac')
11
+
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,15 @@
1
+ require File.dirname(__FILE__) + '/../test_helper'
2
+
3
+ class ZutualTest < Test::Unit::TestCase
4
+ include Twitterland
5
+
6
+ context "Hitting the Zutual API" do
7
+ should "return a list of topic matches between users" do
8
+ stub_get 'http://api.zutual.com/v/1/twitter/match/pengwynn+adamstac.json', 'zutual.json'
9
+ matches = Twitterland::Zutual.match('pengwynn', 'adamstac')
10
+ matches.first.topic.should == 'google'
11
+ matches.first.strength.should == 87
12
+
13
+ end
14
+ end
15
+ end
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.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wynn Netherland
@@ -11,7 +11,7 @@ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
13
 
14
- date: 2009-11-29 00:00:00 -06:00
14
+ date: 2009-12-13 00:00:00 -06:00
15
15
  default_executable:
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
@@ -112,6 +112,7 @@ files:
112
112
  - lib/twitterland/twinfluence.rb
113
113
  - lib/twitterland/twitter_counter.rb
114
114
  - lib/twitterland/twitter_grader.rb
115
+ - lib/twitterland/zutual.rb
115
116
  - test/fixtures/autoff.json
116
117
  - test/fixtures/backtweets.json
117
118
  - test/fixtures/foller_me_all.json
@@ -140,6 +141,7 @@ files:
140
141
  - test/fixtures/tweet_meme_url_info.json
141
142
  - test/fixtures/twitter_counter.json
142
143
  - test/fixtures/twitter_grader.json
144
+ - test/fixtures/zutual.json
143
145
  - test/test_helper.rb
144
146
  - test/twitterland/autoff_test.rb
145
147
  - test/twitterland/back_tweets_test.rb
@@ -151,6 +153,7 @@ files:
151
153
  - test/twitterland/tweet_meme_test.rb
152
154
  - test/twitterland/twitter_counter_test.rb
153
155
  - test/twitterland/twitter_grader_test.rb
156
+ - test/twitterland/zutual_test.rb
154
157
  has_rdoc: true
155
158
  homepage: http://github.com/squeejee/twitterland
156
159
  licenses: []
@@ -191,3 +194,4 @@ test_files:
191
194
  - test/twitterland/tweet_meme_test.rb
192
195
  - test/twitterland/twitter_counter_test.rb
193
196
  - test/twitterland/twitter_grader_test.rb
197
+ - test/twitterland/zutual_test.rb