PageRankr 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/.document CHANGED
File without changes
data/.gitignore CHANGED
File without changes
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ # Change Log
2
+
3
+ # Version 1.1.0
4
+
5
+ * Fixed google xpath for backlinks
data/LICENSE.md CHANGED
File without changes
data/PageRankr.gemspec ADDED
@@ -0,0 +1,56 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{PageRankr}
8
+ s.version = "1.1.0"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Allen Madsen"]
12
+ s.date = %q{2010-07-04}
13
+ s.description = %q{Easy way to retrieve Google Page Rank, Alexa Rank, and backlink counts}
14
+ s.email = %q{blatyo@gmail.com}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE.md",
17
+ "README.md"
18
+ ]
19
+ s.files = [
20
+ ".document",
21
+ ".gitignore",
22
+ "CHANGELOG.md",
23
+ "LICENSE.md",
24
+ "PageRankr.gemspec",
25
+ "README.md",
26
+ "Rakefile",
27
+ "VERSION",
28
+ "lib/page_rankr.rb",
29
+ "lib/page_rankr/alexa.rb",
30
+ "lib/page_rankr/backlinks.rb",
31
+ "lib/page_rankr/google.rb",
32
+ "lib/page_rankr/google/checksum.rb"
33
+ ]
34
+ s.homepage = %q{http://github.com/blatyo/page_rankr}
35
+ s.rdoc_options = ["--charset=UTF-8"]
36
+ s.require_paths = ["lib"]
37
+ s.rubygems_version = %q{1.3.7}
38
+ s.summary = %q{Easy way to retrieve Google Page Rank, Alexa Rank, and backlink counts}
39
+
40
+ if s.respond_to? :specification_version then
41
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
42
+ s.specification_version = 3
43
+
44
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
45
+ s.add_runtime_dependency(%q<nokogiri>, [">= 1.4.1"])
46
+ s.add_development_dependency(%q<yard>, [">= 0"])
47
+ else
48
+ s.add_dependency(%q<nokogiri>, [">= 1.4.1"])
49
+ s.add_dependency(%q<yard>, [">= 0"])
50
+ end
51
+ else
52
+ s.add_dependency(%q<nokogiri>, [">= 1.4.1"])
53
+ s.add_dependency(%q<yard>, [">= 0"])
54
+ end
55
+ end
56
+
data/README.md CHANGED
@@ -2,19 +2,26 @@
2
2
 
3
3
  Provides an easy way to retrieve Google Page Rank, Alexa Rank, and backlink counts.
4
4
 
5
- ## Exampes
5
+ ## Get it!
6
+
7
+ gem install PageRankr
8
+
9
+ ## Use it!
10
+
11
+ require 'page_rankr'
6
12
 
7
13
  ### Backlinks
8
- Backlinks are the result of doing a search with a query like "link:www.google.com". The number of returned results indicates how many sites point to that url.
9
14
 
10
- `PageRankr.backlinks('www.google.com', :google, :bing) #=> {:google=>161000, :bing=>208000000}`
15
+ Backlinks are the result of doing a search with a query like "link:www.google.com". The number of returned results indicates how many sites point to that url.
11
16
 
12
- `PageRankr.backlinks('www.google.com', :yahoo) #=> {:yahoo=>256300062}`
17
+ PageRankr.backlinks('www.google.com', :google, :bing) #=> {:google=>161000, :bing=>208000000}
18
+ PageRankr.backlinks('www.google.com', :yahoo) #=> {:yahoo=>256300062}
13
19
 
14
20
  Valid search engines are: `:google, :bing, :yahoo, :altavista, :alltheweb, :alexa`.
15
21
 
16
22
  ### Ranks
17
- `PageRankr.ranks('www.google.com', :alexa, :google) #=> {:alexa=>1, :google=>10}`
23
+
24
+ PageRankr.ranks('www.google.com', :alexa, :google) #=> {:alexa=>1, :google=>10}
18
25
 
19
26
  There are two valid rank trackers supported: `:alexa, :google`.
20
27
  Alexa ranks are descending where 1 is the most popular. If a site has an alexa rank of 0 then the site is unranked.
@@ -42,9 +49,12 @@ Google page ranks are in the range 0-10 where 10 is the most popular. If a site
42
49
  * <del>Get Google Page Rank</del>
43
50
  * <del>Implement Hashing Algorithm</del>
44
51
  * <del>Get Alexa ranking</del>
52
+ * docs
53
+ * tests (need to find way around counts changing)
45
54
 
46
55
  ## Shout Out
47
56
  Gotta give credit where credits due!
57
+
48
58
  * http://github.com/alexmipego/PageRankSharp
49
59
  * http://snipplr.com/view/18329/google-page-range-lookup/
50
60
  * http://www.sitetoolcenter.com/free-website-scripts/ajax-pr-checker.php
data/Rakefile CHANGED
@@ -11,7 +11,6 @@ begin
11
11
  gem.homepage = "http://github.com/blatyo/page_rankr"
12
12
  gem.authors = ["Allen Madsen"]
13
13
  gem.add_dependency "nokogiri", ">= 1.4.1"
14
- gem.add_development_dependency "rspec", ">= 1.2.9"
15
14
  gem.add_development_dependency "yard", ">= 0"
16
15
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
17
16
  end
@@ -20,21 +19,7 @@ rescue LoadError
20
19
  puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
21
20
  end
22
21
 
23
- require 'spec/rake/spectask'
24
- Spec::Rake::SpecTask.new(:spec) do |spec|
25
- spec.libs << 'lib' << 'spec'
26
- spec.spec_files = FileList['spec/**/*_spec.rb']
27
- end
28
-
29
- Spec::Rake::SpecTask.new(:rcov) do |spec|
30
- spec.libs << 'lib' << 'spec'
31
- spec.pattern = 'spec/**/*_spec.rb'
32
- spec.rcov = true
33
- end
34
-
35
- task :spec => :check_dependencies
36
-
37
- task :default => :spec
22
+ task :default => :yardoc
38
23
 
39
24
  begin
40
25
  require 'yard'
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0
1
+ 1.1.0
data/lib/page_rankr.rb CHANGED
File without changes
File without changes
@@ -14,7 +14,7 @@ module PageRankr
14
14
  }
15
15
 
16
16
  SEARCH_EGNINE_PATHS = {
17
- :google => "//p[@id='resultStats']/b[3]/text()",
17
+ :google => "//div[@id='resultStats']/text()",
18
18
  :bing => "//span[@class='sb_count']/text()",
19
19
  :yahoo => "//ol[@id='results-tab']/li[2]/a/text()",
20
20
  :altavista => "//a[@class='lbl']/text()",
File without changes
File without changes
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 1
7
+ - 1
7
8
  - 0
8
- - 0
9
- version: 1.0.0
9
+ version: 1.1.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Allen Madsen
@@ -14,13 +14,14 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-04-18 00:00:00 -04:00
17
+ date: 2010-07-04 00:00:00 -04:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: nokogiri
22
22
  prerelease: false
23
23
  requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
24
25
  requirements:
25
26
  - - ">="
26
27
  - !ruby/object:Gem::Version
@@ -31,24 +32,11 @@ dependencies:
31
32
  version: 1.4.1
32
33
  type: :runtime
33
34
  version_requirements: *id001
34
- - !ruby/object:Gem::Dependency
35
- name: rspec
36
- prerelease: false
37
- requirement: &id002 !ruby/object:Gem::Requirement
38
- requirements:
39
- - - ">="
40
- - !ruby/object:Gem::Version
41
- segments:
42
- - 1
43
- - 2
44
- - 9
45
- version: 1.2.9
46
- type: :development
47
- version_requirements: *id002
48
35
  - !ruby/object:Gem::Dependency
49
36
  name: yard
50
37
  prerelease: false
51
- requirement: &id003 !ruby/object:Gem::Requirement
38
+ requirement: &id002 !ruby/object:Gem::Requirement
39
+ none: false
52
40
  requirements:
53
41
  - - ">="
54
42
  - !ruby/object:Gem::Version
@@ -56,7 +44,7 @@ dependencies:
56
44
  - 0
57
45
  version: "0"
58
46
  type: :development
59
- version_requirements: *id003
47
+ version_requirements: *id002
60
48
  description: Easy way to retrieve Google Page Rank, Alexa Rank, and backlink counts
61
49
  email: blatyo@gmail.com
62
50
  executables: []
@@ -69,7 +57,9 @@ extra_rdoc_files:
69
57
  files:
70
58
  - .document
71
59
  - .gitignore
60
+ - CHANGELOG.md
72
61
  - LICENSE.md
62
+ - PageRankr.gemspec
73
63
  - README.md
74
64
  - Rakefile
75
65
  - VERSION
@@ -78,9 +68,6 @@ files:
78
68
  - lib/page_rankr/backlinks.rb
79
69
  - lib/page_rankr/google.rb
80
70
  - lib/page_rankr/google/checksum.rb
81
- - spec/page_rankr_spec.rb
82
- - spec/spec.opts
83
- - spec/spec_helper.rb
84
71
  has_rdoc: true
85
72
  homepage: http://github.com/blatyo/page_rankr
86
73
  licenses: []
@@ -91,6 +78,7 @@ rdoc_options:
91
78
  require_paths:
92
79
  - lib
93
80
  required_ruby_version: !ruby/object:Gem::Requirement
81
+ none: false
94
82
  requirements:
95
83
  - - ">="
96
84
  - !ruby/object:Gem::Version
@@ -98,6 +86,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
98
86
  - 0
99
87
  version: "0"
100
88
  required_rubygems_version: !ruby/object:Gem::Requirement
89
+ none: false
101
90
  requirements:
102
91
  - - ">="
103
92
  - !ruby/object:Gem::Version
@@ -107,10 +96,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
107
96
  requirements: []
108
97
 
109
98
  rubyforge_project:
110
- rubygems_version: 1.3.6
99
+ rubygems_version: 1.3.7
111
100
  signing_key:
112
101
  specification_version: 3
113
102
  summary: Easy way to retrieve Google Page Rank, Alexa Rank, and backlink counts
114
- test_files:
115
- - spec/page_rankr_spec.rb
116
- - spec/spec_helper.rb
103
+ test_files: []
104
+
@@ -1,7 +0,0 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
-
3
- describe "PageRankr" do
4
- it "fails" do
5
- fail "hey buddy, you should probably rename this file and start specing for real"
6
- end
7
- end
data/spec/spec.opts DELETED
@@ -1 +0,0 @@
1
- --color
data/spec/spec_helper.rb DELETED
@@ -1,9 +0,0 @@
1
- $LOAD_PATH.unshift(File.dirname(__FILE__))
2
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
3
- require 'page_rankr'
4
- require 'spec'
5
- require 'spec/autorun'
6
-
7
- Spec::Runner.configure do |config|
8
-
9
- end