PageRankr 4.2.0 → 4.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -1
- data/PageRankr.gemspec +2 -1
- data/README.md +2 -0
- data/lib/page_rankr/backlinks/yahoo.rb +5 -5
- data/lib/page_rankr/indexes/yahoo.rb +5 -5
- data/lib/page_rankr/version.rb +2 -2
- data/spec/fixtures/vcr_cassettes/alexa_ranks_edge_case_1.yml +178 -178
- data/spec/fixtures/vcr_cassettes/failure_backlinks.yml +1597 -5302
- data/spec/fixtures/vcr_cassettes/failure_indexes.yml +1573 -5329
- data/spec/fixtures/vcr_cassettes/failure_ranks.yml +164 -171
- data/spec/fixtures/vcr_cassettes/success_backlinks.yml +7503 -6213
- data/spec/fixtures/vcr_cassettes/success_indexes.yml +7190 -5907
- data/spec/fixtures/vcr_cassettes/success_ranks.yml +302 -388
- data/spec/page_rankr_spec.rb +21 -21
- data/spec/spec_helper.rb +1 -1
- metadata +35 -34
data/spec/page_rankr_spec.rb
CHANGED
@@ -4,7 +4,7 @@ RSpec::Matchers.define :be_in do |expected|
|
|
4
4
|
match do |actual|
|
5
5
|
expected === actual
|
6
6
|
end
|
7
|
-
|
7
|
+
|
8
8
|
failure_message_for_should do |actual|
|
9
9
|
"expected that #{actual} would be in #{expected}"
|
10
10
|
end
|
@@ -19,7 +19,7 @@ RSpec::Matchers.define :be_number do
|
|
19
19
|
@symbol = :>=
|
20
20
|
@expected = expected
|
21
21
|
end
|
22
|
-
|
22
|
+
|
23
23
|
chain :> do |expected|
|
24
24
|
@symbol = :>
|
25
25
|
@expected = expected
|
@@ -43,7 +43,7 @@ end
|
|
43
43
|
describe PageRankr do
|
44
44
|
describe "#rank_trackers" do
|
45
45
|
subject{ PageRankr.rank_trackers }
|
46
|
-
|
46
|
+
|
47
47
|
it{ should include(:alexa_us) }
|
48
48
|
it{ should include(:alexa_global) }
|
49
49
|
it{ should include(:google) }
|
@@ -57,7 +57,7 @@ describe PageRankr do
|
|
57
57
|
PageRankr.ranks("http://www.google.com")
|
58
58
|
end
|
59
59
|
end
|
60
|
-
|
60
|
+
|
61
61
|
it{ should have_key(:alexa_us) }
|
62
62
|
it{ should have_key(:alexa_global) }
|
63
63
|
it{ should have_key(:alexa_country) }
|
@@ -72,14 +72,14 @@ describe PageRankr do
|
|
72
72
|
it{ subject[:moz_rank].should be_in(5..9) }
|
73
73
|
it{ subject[:page_authority].should be_in(90..99) }
|
74
74
|
end
|
75
|
-
|
75
|
+
|
76
76
|
describe "failure" do
|
77
77
|
subject do
|
78
78
|
VCR.use_cassette(:failure_ranks, :record => :new_episodes) do
|
79
79
|
PageRankr.ranks("http://please-dont-register-a-site-that-breaks-this-test.com")
|
80
80
|
end
|
81
81
|
end
|
82
|
-
|
82
|
+
|
83
83
|
it{ should have_key(:alexa_us) }
|
84
84
|
it{ should have_key(:alexa_global) }
|
85
85
|
it{ should have_key(:alexa_country) }
|
@@ -95,16 +95,16 @@ describe PageRankr do
|
|
95
95
|
it{ subject[:page_authority].should == 1 }
|
96
96
|
end
|
97
97
|
end
|
98
|
-
|
98
|
+
|
99
99
|
describe "#backlink_trackers" do
|
100
100
|
subject{ PageRankr.backlink_trackers }
|
101
|
-
|
101
|
+
|
102
102
|
it{ should include(:alexa) }
|
103
103
|
it{ should include(:bing) }
|
104
104
|
it{ should include(:google) }
|
105
105
|
it{ should include(:yahoo) }
|
106
106
|
end
|
107
|
-
|
107
|
+
|
108
108
|
describe "#backlinks" do
|
109
109
|
describe "success" do
|
110
110
|
subject do
|
@@ -112,7 +112,7 @@ describe PageRankr do
|
|
112
112
|
PageRankr.backlinks("http://www.google.com")
|
113
113
|
end
|
114
114
|
end
|
115
|
-
|
115
|
+
|
116
116
|
PageRankr.backlink_trackers.each do |tracker|
|
117
117
|
it{ should have_key(tracker) }
|
118
118
|
|
@@ -121,14 +121,14 @@ describe PageRankr do
|
|
121
121
|
end
|
122
122
|
end
|
123
123
|
end
|
124
|
-
|
124
|
+
|
125
125
|
describe "failure" do
|
126
126
|
subject do
|
127
127
|
VCR.use_cassette(:failure_backlinks, :record => :new_episodes) do
|
128
128
|
PageRankr.backlinks("http://please-dont-register-a-site-that-breaks-this-test.com")
|
129
129
|
end
|
130
130
|
end
|
131
|
-
|
131
|
+
|
132
132
|
PageRankr.backlink_trackers.each do |tracker|
|
133
133
|
it{ should have_key(tracker) }
|
134
134
|
|
@@ -138,14 +138,14 @@ describe PageRankr do
|
|
138
138
|
end
|
139
139
|
end
|
140
140
|
end
|
141
|
-
|
141
|
+
|
142
142
|
describe "#index_trackers" do
|
143
143
|
subject{ PageRankr.index_trackers }
|
144
|
-
|
144
|
+
|
145
145
|
it{ should include(:google) }
|
146
146
|
it{ should include(:bing) }
|
147
147
|
end
|
148
|
-
|
148
|
+
|
149
149
|
describe "#indexes" do
|
150
150
|
describe "success" do
|
151
151
|
subject do
|
@@ -153,26 +153,26 @@ describe PageRankr do
|
|
153
153
|
PageRankr.indexes("http://www.google.com")
|
154
154
|
end
|
155
155
|
end
|
156
|
-
|
156
|
+
|
157
157
|
PageRankr.index_trackers.each do |tracker|
|
158
158
|
it{ should have_key(tracker) }
|
159
|
-
|
159
|
+
|
160
160
|
it "#{tracker} should have a value greater than zero" do
|
161
161
|
subject[tracker].should be_number > 0
|
162
162
|
end
|
163
163
|
end
|
164
164
|
end
|
165
|
-
|
165
|
+
|
166
166
|
describe "failure" do
|
167
167
|
subject do
|
168
168
|
VCR.use_cassette(:failure_indexes, :record => :new_episodes) do
|
169
169
|
PageRankr.indexes("http://please-dont-register-a-site-that-breaks-this-test.com")
|
170
170
|
end
|
171
171
|
end
|
172
|
-
|
172
|
+
|
173
173
|
PageRankr.index_trackers.each do |tracker|
|
174
174
|
it{ should have_key(tracker) }
|
175
|
-
|
175
|
+
|
176
176
|
it "#{tracker} should have a nil value" do
|
177
177
|
subject[tracker].should be_nil
|
178
178
|
end
|
@@ -187,4 +187,4 @@ describe PageRankr do
|
|
187
187
|
end
|
188
188
|
end
|
189
189
|
end
|
190
|
-
end
|
190
|
+
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,167 +1,167 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: PageRankr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.2.
|
4
|
+
version: 4.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Allen Madsen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-07-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rspec
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 2.6.0
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 2.6.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: 1.0.0
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 1.0.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: fuubar
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: 0.0.1
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 0.0.1
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: vcr
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: fakeweb
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: nokogiri
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: 1.4.1
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: 1.4.1
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: json
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- -
|
115
|
+
- - ">="
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: 1.4.6
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- -
|
122
|
+
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: 1.4.6
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: public_suffix
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
|
-
- -
|
129
|
+
- - ">="
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version:
|
131
|
+
version: 1.4.4
|
132
132
|
type: :runtime
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
|
-
- -
|
136
|
+
- - ">="
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version:
|
138
|
+
version: 1.4.4
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: httparty
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
|
-
- -
|
143
|
+
- - ">="
|
144
144
|
- !ruby/object:Gem::Version
|
145
145
|
version: 0.9.0
|
146
146
|
type: :runtime
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
|
-
- -
|
150
|
+
- - ">="
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: 0.9.0
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: jsonpath
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
156
156
|
requirements:
|
157
|
-
- -
|
157
|
+
- - ">="
|
158
158
|
- !ruby/object:Gem::Version
|
159
159
|
version: 0.4.2
|
160
160
|
type: :runtime
|
161
161
|
prerelease: false
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
|
-
- -
|
164
|
+
- - ">="
|
165
165
|
- !ruby/object:Gem::Version
|
166
166
|
version: 0.4.2
|
167
167
|
description: Easy way to retrieve Google Page Rank, Alexa Rank, backlink counts, and
|
@@ -172,10 +172,10 @@ executables: []
|
|
172
172
|
extensions: []
|
173
173
|
extra_rdoc_files: []
|
174
174
|
files:
|
175
|
-
- .gitignore
|
176
|
-
- .ruby-gemset
|
177
|
-
- .ruby-version
|
178
|
-
- .travis.yml
|
175
|
+
- ".gitignore"
|
176
|
+
- ".ruby-gemset"
|
177
|
+
- ".ruby-version"
|
178
|
+
- ".travis.yml"
|
179
179
|
- CHANGELOG.md
|
180
180
|
- Gemfile
|
181
181
|
- LICENSE.md
|
@@ -228,7 +228,8 @@ files:
|
|
228
228
|
- spec/site_spec.rb
|
229
229
|
- spec/spec_helper.rb
|
230
230
|
homepage: http://github.com/blatyo/page_rankr
|
231
|
-
licenses:
|
231
|
+
licenses:
|
232
|
+
- MIT
|
232
233
|
metadata: {}
|
233
234
|
post_install_message:
|
234
235
|
rdoc_options: []
|
@@ -236,17 +237,17 @@ require_paths:
|
|
236
237
|
- lib
|
237
238
|
required_ruby_version: !ruby/object:Gem::Requirement
|
238
239
|
requirements:
|
239
|
-
- -
|
240
|
+
- - ">="
|
240
241
|
- !ruby/object:Gem::Version
|
241
242
|
version: '0'
|
242
243
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
243
244
|
requirements:
|
244
|
-
- -
|
245
|
+
- - ">="
|
245
246
|
- !ruby/object:Gem::Version
|
246
247
|
version: 1.3.6
|
247
248
|
requirements: []
|
248
249
|
rubyforge_project:
|
249
|
-
rubygems_version: 2.
|
250
|
+
rubygems_version: 2.2.2
|
250
251
|
signing_key:
|
251
252
|
specification_version: 4
|
252
253
|
summary: Easy way to retrieve Google Page Rank, Alexa Rank, backlink counts, and index
|