topsy 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,9 +7,6 @@ Hash.send :include, Hashie::HashExtensions
7
7
 
8
8
 
9
9
  module Topsy
10
-
11
- VERSION = "0.3.1"
12
-
13
10
  class TopsyError < StandardError
14
11
  attr_reader :data
15
12
 
@@ -206,9 +206,9 @@ module Topsy
206
206
 
207
207
  def get_rate_limit_status(response)
208
208
  headers = {
209
- 'limit' => response.headers['x-ratelimit-limit'].first.to_i,
210
- 'remaining' => response.headers['x-ratelimit-remaining'].first.to_i,
211
- 'reset' => response.headers['x-ratelimit-reset'].first.to_i
209
+ 'limit' => response.headers['x-ratelimit-limit'].to_i,
210
+ 'remaining' => response.headers['x-ratelimit-remaining'].to_i,
211
+ 'reset' => response.headers['x-ratelimit-reset'].to_i
212
212
  }
213
213
  Topsy.rate_limit = Topsy::RateLimitInfo.new(headers)
214
214
  end
@@ -6,6 +6,7 @@
6
6
  # "list" : Array of Author instances
7
7
  # "window" : Optional symbol
8
8
  # "topsy_trackback_url" : String, optional
9
+ # "trackback_total": 165, optional
9
10
  #
10
11
  # According to the official Topsy doc: http://code.google.com/p/otterapi/wiki/Resources?tm=6#/authorsearch
11
12
  #
@@ -13,6 +14,7 @@ module Topsy
13
14
 
14
15
  class Page < Hashie::Dash
15
16
  property :total
17
+ property :trackback_total
16
18
  property :list
17
19
  property :page
18
20
  property :perpage
@@ -1,3 +1,3 @@
1
1
  module Topsy
2
- VERSION = '0.3.2'
2
+ VERSION = '0.3.3'
3
3
  end
@@ -1,19 +1,14 @@
1
1
  require 'test/unit'
2
2
  require 'pathname'
3
3
  require 'rubygems'
4
+ require 'bundler/setup'
4
5
 
5
- gem 'thoughtbot-shoulda', '>= 2.10.1'
6
- gem 'jnunemaker-matchy', '0.4.0'
7
- gem 'mocha', '0.9.4'
8
- gem 'fakeweb', '>= 1.2.5'
9
-
6
+ require 'fakeweb'
10
7
  require 'shoulda'
11
- require 'matchy'
12
8
  require 'mocha'
13
- require 'fakeweb'
9
+ require 'matchy'
14
10
  require 'redgreen'
15
11
 
16
-
17
12
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
18
13
  $LOAD_PATH.unshift(File.dirname(__FILE__))
19
14
  require 'topsy'
@@ -182,6 +182,7 @@ class TestTopsy < Test::Unit::TestCase
182
182
  results = Topsy.trackbacks("http://orrka.com")
183
183
  results.class.should == Topsy::Page
184
184
  results.total.should == 3
185
+ results.trackback_total.should == 3
185
186
  results.list.first.date.year.should == 2009
186
187
  results.list.first.permalink_url.should == "http://twitter.com/orrka/status/6435248067"
187
188
  results.list.first.date.should == Time.at(1260204073)
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: topsy
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 21
4
5
  prerelease: false
5
6
  segments:
6
7
  - 0
7
8
  - 3
8
- - 2
9
- version: 0.3.2
9
+ - 3
10
+ version: 0.3.3
10
11
  platform: ruby
11
12
  authors:
12
13
  - Wynn Netherland
@@ -15,16 +16,18 @@ autorequire:
15
16
  bindir: bin
16
17
  cert_chain: []
17
18
 
18
- date: 2010-09-28 00:00:00 -05:00
19
+ date: 2010-09-28 00:00:00 -04:00
19
20
  default_executable:
20
21
  dependencies:
21
22
  - !ruby/object:Gem::Dependency
22
23
  name: hashie
23
24
  prerelease: false
24
25
  requirement: &id001 !ruby/object:Gem::Requirement
26
+ none: false
25
27
  requirements:
26
28
  - - ">="
27
29
  - !ruby/object:Gem::Version
30
+ hash: 29
28
31
  segments:
29
32
  - 0
30
33
  - 1
@@ -36,9 +39,11 @@ dependencies:
36
39
  name: httparty
37
40
  prerelease: false
38
41
  requirement: &id002 !ruby/object:Gem::Requirement
42
+ none: false
39
43
  requirements:
40
44
  - - ">="
41
45
  - !ruby/object:Gem::Version
46
+ hash: 5
42
47
  segments:
43
48
  - 0
44
49
  - 4
@@ -50,30 +55,82 @@ dependencies:
50
55
  name: shoulda
51
56
  prerelease: false
52
57
  requirement: &id003 !ruby/object:Gem::Requirement
58
+ none: false
53
59
  requirements:
54
60
  - - ~>
55
61
  - !ruby/object:Gem::Version
62
+ hash: 37
56
63
  segments:
57
64
  - 2
65
+ - 11
66
+ - 3
67
+ version: 2.11.3
68
+ type: :development
69
+ version_requirements: *id003
70
+ - !ruby/object:Gem::Dependency
71
+ name: mocha
72
+ prerelease: false
73
+ requirement: &id004 !ruby/object:Gem::Requirement
74
+ none: false
75
+ requirements:
76
+ - - ~>
77
+ - !ruby/object:Gem::Version
78
+ hash: 47
79
+ segments:
80
+ - 0
81
+ - 9
58
82
  - 10
83
+ version: 0.9.10
84
+ type: :development
85
+ version_requirements: *id004
86
+ - !ruby/object:Gem::Dependency
87
+ name: fakeweb
88
+ prerelease: false
89
+ requirement: &id005 !ruby/object:Gem::Requirement
90
+ none: false
91
+ requirements:
92
+ - - ~>
93
+ - !ruby/object:Gem::Version
94
+ hash: 27
95
+ segments:
96
+ - 1
97
+ - 3
59
98
  - 0
60
- version: 2.10.0
99
+ version: 1.3.0
61
100
  type: :development
62
- version_requirements: *id003
101
+ version_requirements: *id005
63
102
  - !ruby/object:Gem::Dependency
64
103
  name: jnunemaker-matchy
65
104
  prerelease: false
66
- requirement: &id004 !ruby/object:Gem::Requirement
105
+ requirement: &id006 !ruby/object:Gem::Requirement
106
+ none: false
67
107
  requirements:
68
108
  - - ~>
69
109
  - !ruby/object:Gem::Version
110
+ hash: 15
70
111
  segments:
71
112
  - 0
72
113
  - 4
73
114
  - 0
74
115
  version: 0.4.0
75
116
  type: :development
76
- version_requirements: *id004
117
+ version_requirements: *id006
118
+ - !ruby/object:Gem::Dependency
119
+ name: redgreen
120
+ prerelease: false
121
+ requirement: &id007 !ruby/object:Gem::Requirement
122
+ none: false
123
+ requirements:
124
+ - - ~>
125
+ - !ruby/object:Gem::Version
126
+ hash: 27
127
+ segments:
128
+ - 1
129
+ - 2
130
+ - 2
131
+ version: 1.2.2
132
+ type: :development
133
+ version_requirements: *id007
77
134
  description: Wrapper for the Topsy API
78
135
  email: wynn.netherland@gmail.com
79
136
  executables: []
@@ -99,6 +156,8 @@ files:
99
156
  - lib/topsy/url_info.rb
100
157
  - lib/topsy/version.rb
101
158
  - lib/topsy.rb
159
+ - test/helper.rb
160
+ - test/test_topsy.rb
102
161
  has_rdoc: true
103
162
  homepage: http://wynnnetherland.com/projects/topsy/
104
163
  licenses: []
@@ -109,16 +168,20 @@ rdoc_options: []
109
168
  require_paths:
110
169
  - lib
111
170
  required_ruby_version: !ruby/object:Gem::Requirement
171
+ none: false
112
172
  requirements:
113
173
  - - ">="
114
174
  - !ruby/object:Gem::Version
175
+ hash: 3
115
176
  segments:
116
177
  - 0
117
178
  version: "0"
118
179
  required_rubygems_version: !ruby/object:Gem::Requirement
180
+ none: false
119
181
  requirements:
120
182
  - - ">="
121
183
  - !ruby/object:Gem::Version
184
+ hash: 23
122
185
  segments:
123
186
  - 1
124
187
  - 3
@@ -127,7 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
127
190
  requirements: []
128
191
 
129
192
  rubyforge_project:
130
- rubygems_version: 1.3.6
193
+ rubygems_version: 1.3.7
131
194
  signing_key:
132
195
  specification_version: 3
133
196
  summary: Ruby wrapper for the Topsy API