PageRankr 2.0.1 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -22,7 +22,11 @@ describe PageRankr do
22
22
 
23
23
  describe "#ranks" do
24
24
  describe "success" do
25
- subject{ PageRankr.ranks("www.google.com") }
25
+ subject do
26
+ VCR.use_cassette(:success_ranks) do
27
+ PageRankr.ranks("www.google.com")
28
+ end
29
+ end
26
30
 
27
31
  it{ should have_key(:alexa_us) }
28
32
  it{ should have_key(:alexa_global) }
@@ -36,7 +40,11 @@ describe PageRankr do
36
40
  end
37
41
 
38
42
  describe "failure" do
39
- subject{ PageRankr.ranks("please-dont-register-a-site-that-breaks-this-test.com") }
43
+ subject do
44
+ VCR.use_cassette(:failure_ranks) do
45
+ PageRankr.ranks("please-dont-register-a-site-that-breaks-this-test.com")
46
+ end
47
+ end
40
48
 
41
49
  it{ should have_key(:alexa_us) }
42
50
  it{ should have_key(:alexa_global) }
@@ -61,7 +69,11 @@ describe PageRankr do
61
69
 
62
70
  describe "#backlinks" do
63
71
  describe "success" do
64
- subject{ PageRankr.backlinks("www.google.com") }
72
+ subject do
73
+ VCR.use_cassette(:success_backlinks) do
74
+ PageRankr.backlinks("www.google.com")
75
+ end
76
+ end
65
77
 
66
78
  PageRankr.backlink_trackers.each do |tracker|
67
79
  it{ should have_key(tracker) }
@@ -70,7 +82,11 @@ describe PageRankr do
70
82
  end
71
83
 
72
84
  describe "failure" do
73
- subject{ PageRankr.backlinks("please-dont-register-a-site-that-breaks-this-test.com") }
85
+ subject do
86
+ VCR.use_cassette(:failure_backlinks) do
87
+ PageRankr.backlinks("please-dont-register-a-site-that-breaks-this-test.com")
88
+ end
89
+ end
74
90
 
75
91
  PageRankr.backlink_trackers.each do |tracker|
76
92
  it{ should have_key(tracker) }
@@ -88,7 +104,11 @@ describe PageRankr do
88
104
 
89
105
  describe "#indexes" do
90
106
  describe "success" do
91
- subject{ PageRankr.indexes("www.google.com") }
107
+ subject do
108
+ VCR.use_cassette(:success_indexes) do
109
+ PageRankr.indexes("www.google.com")
110
+ end
111
+ end
92
112
 
93
113
  PageRankr.index_trackers.each do |tracker|
94
114
  it{ should have_key(tracker) }
@@ -97,7 +117,11 @@ describe PageRankr do
97
117
  end
98
118
 
99
119
  describe "failure" do
100
- subject{ PageRankr.indexes("please-dont-register-a-site-that-breaks-this-test.com") }
120
+ subject do
121
+ VCR.use_cassette(:failure_indexes) do
122
+ PageRankr.indexes("please-dont-register-a-site-that-breaks-this-test.com")
123
+ end
124
+ end
101
125
 
102
126
  PageRankr.index_trackers.each do |tracker|
103
127
  it{ should have_key(tracker) }
@@ -1,6 +1,12 @@
1
1
  require File.join(File.dirname(__FILE__), '..', 'lib', 'page_rankr')
2
2
  require 'rspec'
3
3
  require 'fuubar'
4
+ require 'vcr'
5
+
6
+ VCR.config do |c|
7
+ c.cassette_library_dir = 'fixtures/vcr_cassettes'
8
+ c.stub_with :typhoeus
9
+ end
4
10
 
5
11
  Rspec.configure do |c|
6
12
  c.formatter = Fuubar
metadata CHANGED
@@ -1,110 +1,127 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: PageRankr
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.0.2
4
5
  prerelease:
5
- version: 2.0.1
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Allen Madsen
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2011-02-23 00:00:00 -05:00
14
- default_executable:
15
- dependencies:
16
- - !ruby/object:Gem::Dependency
17
- name: rspec
12
+ date: 2011-08-16 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rake
16
+ requirement: &70353683918020 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :development
18
23
  prerelease: false
19
- requirement: &id001 !ruby/object:Gem::Requirement
24
+ version_requirements: *70353683918020
25
+ - !ruby/object:Gem::Dependency
26
+ name: rspec
27
+ requirement: &70353683917480 !ruby/object:Gem::Requirement
20
28
  none: false
21
- requirements:
29
+ requirements:
22
30
  - - ~>
23
- - !ruby/object:Gem::Version
31
+ - !ruby/object:Gem::Version
24
32
  version: 2.1.0
25
33
  type: :development
26
- version_requirements: *id001
27
- - !ruby/object:Gem::Dependency
28
- name: bundler
29
34
  prerelease: false
30
- requirement: &id002 !ruby/object:Gem::Requirement
35
+ version_requirements: *70353683917480
36
+ - !ruby/object:Gem::Dependency
37
+ name: bundler
38
+ requirement: &70353683916980 !ruby/object:Gem::Requirement
31
39
  none: false
32
- requirements:
33
- - - ">="
34
- - !ruby/object:Gem::Version
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
35
43
  version: 1.0.0
36
44
  type: :development
37
- version_requirements: *id002
38
- - !ruby/object:Gem::Dependency
39
- name: fuubar
40
45
  prerelease: false
41
- requirement: &id003 !ruby/object:Gem::Requirement
46
+ version_requirements: *70353683916980
47
+ - !ruby/object:Gem::Dependency
48
+ name: fuubar
49
+ requirement: &70353683916520 !ruby/object:Gem::Requirement
42
50
  none: false
43
- requirements:
44
- - - ">="
45
- - !ruby/object:Gem::Version
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
46
54
  version: 0.0.1
47
55
  type: :development
48
- version_requirements: *id003
49
- - !ruby/object:Gem::Dependency
50
- name: nokogiri
51
56
  prerelease: false
52
- requirement: &id004 !ruby/object:Gem::Requirement
57
+ version_requirements: *70353683916520
58
+ - !ruby/object:Gem::Dependency
59
+ name: vcr
60
+ requirement: &70353683916140 !ruby/object:Gem::Requirement
61
+ none: false
62
+ requirements:
63
+ - - ! '>='
64
+ - !ruby/object:Gem::Version
65
+ version: '0'
66
+ type: :development
67
+ prerelease: false
68
+ version_requirements: *70353683916140
69
+ - !ruby/object:Gem::Dependency
70
+ name: nokogiri
71
+ requirement: &70353683915600 !ruby/object:Gem::Requirement
53
72
  none: false
54
- requirements:
55
- - - ">="
56
- - !ruby/object:Gem::Version
73
+ requirements:
74
+ - - ! '>='
75
+ - !ruby/object:Gem::Version
57
76
  version: 1.4.1
58
77
  type: :runtime
59
- version_requirements: *id004
60
- - !ruby/object:Gem::Dependency
61
- name: json
62
78
  prerelease: false
63
- requirement: &id005 !ruby/object:Gem::Requirement
79
+ version_requirements: *70353683915600
80
+ - !ruby/object:Gem::Dependency
81
+ name: json
82
+ requirement: &70353683915100 !ruby/object:Gem::Requirement
64
83
  none: false
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
84
+ requirements:
85
+ - - ! '>='
86
+ - !ruby/object:Gem::Version
68
87
  version: 1.4.6
69
88
  type: :runtime
70
- version_requirements: *id005
71
- - !ruby/object:Gem::Dependency
72
- name: public_suffix_service
73
89
  prerelease: false
74
- requirement: &id006 !ruby/object:Gem::Requirement
90
+ version_requirements: *70353683915100
91
+ - !ruby/object:Gem::Dependency
92
+ name: public_suffix_service
93
+ requirement: &70353683914640 !ruby/object:Gem::Requirement
75
94
  none: false
76
- requirements:
95
+ requirements:
77
96
  - - ~>
78
- - !ruby/object:Gem::Version
79
- version: 0.8.1
97
+ - !ruby/object:Gem::Version
98
+ version: 0.9.0
80
99
  type: :runtime
81
- version_requirements: *id006
82
- - !ruby/object:Gem::Dependency
83
- name: typhoeus
84
100
  prerelease: false
85
- requirement: &id007 !ruby/object:Gem::Requirement
101
+ version_requirements: *70353683914640
102
+ - !ruby/object:Gem::Dependency
103
+ name: typhoeus
104
+ requirement: &70353683945660 !ruby/object:Gem::Requirement
86
105
  none: false
87
- requirements:
106
+ requirements:
88
107
  - - ~>
89
- - !ruby/object:Gem::Version
108
+ - !ruby/object:Gem::Version
90
109
  version: 0.2.1
91
110
  type: :runtime
92
- version_requirements: *id007
93
- description: Easy way to retrieve Google Page Rank, Alexa Rank, backlink counts, and index counts.
94
- email:
111
+ prerelease: false
112
+ version_requirements: *70353683945660
113
+ description: Easy way to retrieve Google Page Rank, Alexa Rank, backlink counts, and
114
+ index counts.
115
+ email:
95
116
  - blatyo@gmail.com
96
117
  executables: []
97
-
98
118
  extensions: []
99
-
100
119
  extra_rdoc_files: []
101
-
102
- files:
120
+ files:
103
121
  - .gitignore
104
122
  - .rvmrc
105
123
  - CHANGELOG.md
106
124
  - Gemfile
107
- - Gemfile.lock
108
125
  - LICENSE.md
109
126
  - PageRankr.gemspec
110
127
  - README.md
@@ -131,37 +148,48 @@ files:
131
148
  - lib/page_rankr/tracker.rb
132
149
  - lib/page_rankr/version.rb
133
150
  - spec/edge_cases_spec.rb
151
+ - spec/fixtures/vcr_cassettes/alexa_ranks_edge_case_1.yml
152
+ - spec/fixtures/vcr_cassettes/failure_backlinks.yml
153
+ - spec/fixtures/vcr_cassettes/failure_indexes.yml
154
+ - spec/fixtures/vcr_cassettes/failure_ranks.yml
155
+ - spec/fixtures/vcr_cassettes/success_backlinks.yml
156
+ - spec/fixtures/vcr_cassettes/success_indexes.yml
157
+ - spec/fixtures/vcr_cassettes/success_ranks.yml
134
158
  - spec/page_rankr_spec.rb
135
159
  - spec/spec_helper.rb
136
- has_rdoc: true
137
160
  homepage: http://github.com/blatyo/page_rankr
138
161
  licenses: []
139
-
140
162
  post_install_message:
141
163
  rdoc_options: []
142
-
143
- require_paths:
164
+ require_paths:
144
165
  - lib
145
- required_ruby_version: !ruby/object:Gem::Requirement
166
+ required_ruby_version: !ruby/object:Gem::Requirement
146
167
  none: false
147
- requirements:
148
- - - ">="
149
- - !ruby/object:Gem::Version
150
- version: "0"
151
- required_rubygems_version: !ruby/object:Gem::Requirement
168
+ requirements:
169
+ - - ! '>='
170
+ - !ruby/object:Gem::Version
171
+ version: '0'
172
+ required_rubygems_version: !ruby/object:Gem::Requirement
152
173
  none: false
153
- requirements:
154
- - - ">="
155
- - !ruby/object:Gem::Version
174
+ requirements:
175
+ - - ! '>='
176
+ - !ruby/object:Gem::Version
156
177
  version: 1.3.6
157
178
  requirements: []
158
-
159
179
  rubyforge_project:
160
- rubygems_version: 1.5.2
180
+ rubygems_version: 1.8.6
161
181
  signing_key:
162
182
  specification_version: 3
163
- summary: Easy way to retrieve Google Page Rank, Alexa Rank, backlink counts, and index counts.
164
- test_files:
183
+ summary: Easy way to retrieve Google Page Rank, Alexa Rank, backlink counts, and index
184
+ counts.
185
+ test_files:
165
186
  - spec/edge_cases_spec.rb
187
+ - spec/fixtures/vcr_cassettes/alexa_ranks_edge_case_1.yml
188
+ - spec/fixtures/vcr_cassettes/failure_backlinks.yml
189
+ - spec/fixtures/vcr_cassettes/failure_indexes.yml
190
+ - spec/fixtures/vcr_cassettes/failure_ranks.yml
191
+ - spec/fixtures/vcr_cassettes/success_backlinks.yml
192
+ - spec/fixtures/vcr_cassettes/success_indexes.yml
193
+ - spec/fixtures/vcr_cassettes/success_ranks.yml
166
194
  - spec/page_rankr_spec.rb
167
195
  - spec/spec_helper.rb
@@ -1,42 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- PageRankr (2.0.0)
5
- json (>= 1.4.6)
6
- nokogiri (>= 1.4.1)
7
- public_suffix_service (~> 0.8.1)
8
- typhoeus (~> 0.2.1)
9
-
10
- GEM
11
- remote: http://rubygems.org/
12
- specs:
13
- diff-lcs (1.1.2)
14
- fuubar (0.0.2)
15
- rspec (~> 2.0)
16
- rspec-instafail (~> 0.1.4)
17
- ruby-progressbar (~> 0.0.9)
18
- json (1.5.1)
19
- mime-types (1.16)
20
- nokogiri (1.4.4)
21
- public_suffix_service (0.8.1)
22
- rspec (2.1.0)
23
- rspec-core (~> 2.1.0)
24
- rspec-expectations (~> 2.1.0)
25
- rspec-mocks (~> 2.1.0)
26
- rspec-core (2.1.0)
27
- rspec-expectations (2.1.0)
28
- diff-lcs (~> 1.1.2)
29
- rspec-instafail (0.1.5)
30
- rspec-mocks (2.1.0)
31
- ruby-progressbar (0.0.9)
32
- typhoeus (0.2.1)
33
- mime-types
34
-
35
- PLATFORMS
36
- ruby
37
-
38
- DEPENDENCIES
39
- PageRankr!
40
- bundler (>= 1.0.0)
41
- fuubar (>= 0.0.1)
42
- rspec (~> 2.1.0)