seo_info 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,4 @@
1
+ *.gem
2
+ .bundle
3
+ Gemfile.lock
4
+ pkg/*
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --colour --format doc
data/CHANGELOG.MD ADDED
@@ -0,0 +1,4 @@
1
+ v0.0.1
2
+ ======
3
+
4
+ * number of pages indexed by Google
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in seo_info.gemspec
4
+ gemspec
data/README.md ADDED
@@ -0,0 +1,29 @@
1
+ Description
2
+ ===========
3
+
4
+ seo_info gem gets different seo information for web-sites.
5
+
6
+ Features
7
+ ========
8
+
9
+ Things that you are able to do right now with this gem:
10
+
11
+ * Number of pages indexed by Google
12
+
13
+ Install
14
+ =======
15
+
16
+ `gem install seo_info`
17
+
18
+ OR
19
+
20
+ Put this line in your Gemfile:
21
+ `gem 'seo_info'`
22
+
23
+ Then bundle:
24
+ `$ bundle`
25
+
26
+ Contributing
27
+ ============
28
+
29
+ If you consider to contribute to seo_info gem, please try to cover your code with tests
data/Rakefile ADDED
@@ -0,0 +1,13 @@
1
+ require "bundler/gem_tasks"
2
+ require "open-uri"
3
+
4
+ namespace :test do
5
+ desc "Getting fresh page source data for specs"
6
+ task :prepare do
7
+ puts "Getting google search page..."
8
+ page = open("https://www.google.com/search?hl=en&safe=off&q=site%3Aruby-lang.org&btnG=Search").read
9
+ path = 'spec/data/google_search.html'
10
+ File.open(path, 'w') {|f| f.write page}
11
+ puts "Successfully saved google search result page into #{path}"
12
+ end
13
+ end
@@ -0,0 +1,23 @@
1
+ module SeoInfo
2
+ class Google
3
+ attr_accessor :site_url
4
+ attr_reader :results
5
+
6
+ def initialize(site_url)
7
+ @site_url = site_url
8
+ @results = {}
9
+ end
10
+
11
+ def indexed_pages
12
+ results[:indexed_pages] ||= begin
13
+ page = Nokogiri::HTML(get_page)
14
+ page.xpath('//div[@id="subform_ctrl"]/div/b/text()')[2].text.gsub(/[^\d]/,'').to_i
15
+ end
16
+ end
17
+
18
+ private
19
+ def get_page
20
+ open("https://www.google.com/search?hl=en&safe=off&q=site%3A#{site_url}&btnG=Search").read
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,3 @@
1
+ module SeoInfo
2
+ VERSION = "0.0.1"
3
+ end
data/lib/seo_info.rb ADDED
@@ -0,0 +1,7 @@
1
+ $:.push File.expand_path(File.dirname(__FILE__))
2
+
3
+ require 'nokogiri'
4
+ require 'open-uri'
5
+ require 'seo_info/version'
6
+
7
+ SeoInfo.autoload :Google, 'seo_info/google.rb'
data/seo_info.gemspec ADDED
@@ -0,0 +1,23 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "seo_info/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "seo_info"
7
+ s.version = SeoInfo::VERSION
8
+ s.authors = ["Sergey Parizhskiy", "Dina Zhyliaieva"]
9
+ s.email = ["parizhskiy@gmail.com", "dinaionenko@reevoo.com"]
10
+ s.homepage = ""
11
+ s.summary = %q{SEO information for web-sites}
12
+ s.description = %q{Gets different seo information such as Page Rank, Alexa Rank, number of indexed pages in different search engines and so on.}
13
+
14
+ s.rubyforge_project = "seo_info"
15
+
16
+ s.files = `git ls-files`.split("\n")
17
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
+ s.require_paths = ["lib"]
20
+
21
+ s.add_development_dependency "rspec"
22
+ s.add_runtime_dependency "nokogiri"
23
+ end
@@ -0,0 +1,407 @@
1
+ <!doctype html><html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>site:ruby-lang.org - Google Search</title><style>#gbar,#guser{font-size:13px;padding-top:1px !important}#gbar{height:22px}#guser{padding-bottom:7px !important;text-align:right}.gbh,.gbd{border-top:1px solid #c9d7f1;font-size:1px}.gbh{height:0;position:absolute;top:24px;width:100%}@media all{.gb1{height:22px;margin-right:.5em;vertical-align:top}#gbar{float:left}}a.gb1,a.gb4{text-decoration:underline !important}a.gb1,a.gb4{color:#00c !important}</style><style>
2
+ body,td,div,.p,a{
3
+ font-family:arial,sans-serif
4
+ }
5
+ body {
6
+ margin:0
7
+ }
8
+ #gbar{
9
+ float:left;
10
+ height:22px;padding-left:2px;
11
+ font-size:13px
12
+ }
13
+
14
+ .gssb_c table{
15
+ font-size:1em
16
+ }
17
+ .gsfi,.gsfs{
18
+ font-size:17px
19
+ }
20
+
21
+ .j{
22
+ width:34em
23
+ }
24
+
25
+ a:link,.w,.q:active,.q:visited,.tbotu{
26
+ color:#11c
27
+ }
28
+ a.fl,.flc a{
29
+ color:#4272db;text-decoration:none
30
+ }
31
+
32
+ a.gl{
33
+ text-decoration:none
34
+ }
35
+ cite, cite a:link{
36
+ color:#0E774A;
37
+ font-style:normal
38
+ }
39
+ #foot {
40
+ padding:0 8px;
41
+ }
42
+ #foot a{
43
+ white-space:nowrap
44
+ }
45
+ h3{
46
+ font-size:16px;
47
+ font-weight:normal;
48
+ margin:0;
49
+ padding:0
50
+ }
51
+ #res h3{
52
+ display:inline
53
+ }
54
+ .hd{
55
+ height:1px;
56
+ position:absolute;
57
+ top:-1000em
58
+ }
59
+ li.g,body,html,table,.std{
60
+ font-size:13px
61
+ }
62
+ li.g{
63
+ margin-bottom:14px;
64
+ margin-top:0;
65
+ zoom:1;
66
+ }
67
+ ol li,ul li{
68
+ list-style:none
69
+ }
70
+ h1,ol,ul,li{
71
+ margin:0;padding:0
72
+ }
73
+ #mbEnd li{
74
+ margin:1em 0
75
+ }
76
+ #mbEnd h2{
77
+ color:#676767;
78
+ font-family:arial,sans-serif;
79
+ font-size:11px;
80
+ font-weight:normal
81
+ }
82
+ #center_col{
83
+ border-left:1px solid #d3e1f9;
84
+ padding:0 8px
85
+ }
86
+
87
+ #fll a,#bfl a{
88
+ margin:0 10px
89
+ }
90
+
91
+ .f{
92
+ color:#767676
93
+ }
94
+ .grn{
95
+ color:#393
96
+ }
97
+ .ds{
98
+ border-right:1px solid #e7e7e7;
99
+ position:relative;
100
+ height:32px;
101
+
102
+ z-index:100
103
+ }
104
+ .e{
105
+ margin:2px 0px 0.75em
106
+ }
107
+ #leftnav a,.slk a{
108
+ text-decoration:none
109
+ }
110
+ #leftnav h2{
111
+ color: #767676;
112
+ font-weight: normal;
113
+ margin:0
114
+ }
115
+ #logo{
116
+ display:block;
117
+ height:49px;
118
+ margin-top:12px;
119
+ margin-left:12px;
120
+ overflow:hidden;
121
+ position:relative;
122
+ width:137px
123
+ }
124
+ #logo img{
125
+
126
+ left:0;
127
+ position:absolute;
128
+ top:-41px
129
+ }
130
+ .lnsec{
131
+ font-size:13px;
132
+ border-top:1px solid #c9d7f1;
133
+ margin-top:5px;
134
+ padding-top:8px
135
+ }
136
+ .lsb,.micon,.csb,.star,.star div{
137
+ background:url(/images/nav_logo_hp2.png) no-repeat;
138
+ overflow:hidden
139
+ }
140
+ .lst{
141
+ background:#fff;
142
+ border:1px solid #ccc;
143
+ border-bottom:none;
144
+ color:#000;
145
+ font:18px arial,sans-serif;
146
+
147
+ float:left;
148
+ height:26px;
149
+ margin:0;
150
+ padding:4px 0 0;
151
+ padding-left:6px;
152
+ padding-right:10px;
153
+ vertical-align:top;
154
+ width:100%;
155
+
156
+ word-break:break-all
157
+ }
158
+ .lst:focus{
159
+ outline:none
160
+ }
161
+ .lst-td{
162
+ border-bottom:1px solid #999;
163
+ padding:0
164
+ }
165
+ .lst-b{
166
+ border:1px solid #CCC;
167
+ border-bottom:none;
168
+ padding-right:0;
169
+ height:29px;
170
+ padding-top:1px
171
+ }
172
+ .tia input{
173
+ border-right:none;
174
+ padding-right:0
175
+ }
176
+ .tia{
177
+ padding-right:0
178
+ }
179
+ .lsbb{
180
+ background:#eee;
181
+ border:1px solid #999;
182
+ border-top-color:#ccc;
183
+ border-left-color:#ccc;
184
+ height:30px
185
+ }
186
+ .lsb{
187
+ background-position:bottom;
188
+ border:none;
189
+ color:#000;
190
+ cursor:pointer;
191
+ font:15px arial,sans-serif;
192
+ height:30px;
193
+ margin:0;
194
+ vertical-align:top
195
+ }
196
+ .lsb:active{
197
+ background:#ccc
198
+ }
199
+ .micon {
200
+ float:left;
201
+ height:19px;
202
+ margin-top:2px;
203
+ margin-right: 6px;
204
+ width:19px;
205
+ }
206
+ #nav{
207
+
208
+ border-collapse:collapse;
209
+ margin-top:17px;
210
+ text-align:left
211
+ }
212
+ #nav td{
213
+ text-align:center;
214
+ }
215
+ .nobr{
216
+ white-space:nowrap
217
+ }
218
+ #showmodes .micon{
219
+ background-position:-150px -114px;
220
+ height:17px;
221
+ margin-left:9px;
222
+ width:17px;
223
+ }
224
+ #subform_ctrl{
225
+ font-size:11px;
226
+ height:26px;
227
+ margin:5px 3px 0;
228
+ margin-left:17px
229
+ }
230
+ .ts{
231
+ border-collapse:collapse
232
+ }
233
+ #mn{
234
+ table-layout:fixed;width:996px
235
+ }
236
+ .mitem{
237
+ font-size:15px;
238
+ line-height:24px;
239
+ margin-bottom:2px;
240
+ padding-left:0
241
+ }
242
+ .msel{
243
+ font-weight:bold;
244
+ margin:-1px 0 0 0;
245
+ border:solid #fff;
246
+ border-width:1px 0
247
+ }
248
+ .r{
249
+ margin:0
250
+ }
251
+ #res{
252
+ padding:4px 8px 0
253
+ }
254
+ .s br{
255
+ display:none
256
+ }
257
+ .spon{
258
+ font-size:11px;
259
+ font-weight:normal;
260
+ color:#767676
261
+ }
262
+ .mitem,.lnsec{
263
+ padding-left:8px
264
+ }
265
+ #showmodes{
266
+ font-size:15px;
267
+ line-height:24px;
268
+ }
269
+ #swr{
270
+ margin-top:4px
271
+ }
272
+ #swr li{
273
+ line-height:1.2;
274
+ margin-bottom:4px
275
+ }
276
+ .csb{
277
+ display:block;
278
+ height:40px;
279
+ }
280
+ .images_table td{line-height:17px;padding-bottom:16px}
281
+ .images_table img{border:1px solid #ccc;padding:1px}
282
+ .taf{
283
+ padding:1px 0 0
284
+ }
285
+ .tam{
286
+ padding:14px 0 0
287
+ }
288
+ .tal{
289
+ padding:14px 0 1px
290
+ }
291
+ #tbd,#abd{
292
+ display:block;
293
+ min-height:1px;
294
+ padding-top:3px
295
+ }
296
+ #tbd li{
297
+
298
+ display:inline
299
+ }
300
+ .tbfo,.tbt,.tbpd{
301
+ margin-bottom:8px
302
+ }
303
+ #tbd .tbt li{
304
+ display:block;
305
+ font-size:13px;
306
+ line-height:1.2;
307
+ padding-bottom:3px;
308
+ padding-left:8px;
309
+ text-indent:-8px
310
+ }
311
+ .tbos,.b{
312
+ font-weight:bold;
313
+ }
314
+ a:hover{
315
+ text-decoration:underline
316
+ }
317
+ #leftnav a:hover {
318
+ text-decoration:underline;
319
+ }
320
+ em{
321
+ font-weight:bold;
322
+ font-style:normal
323
+ }
324
+
325
+ .gac_wd{
326
+ right:-2px !important;
327
+
328
+ overflow:hidden
329
+ }
330
+
331
+ .fmg{
332
+ display:inline-block;
333
+ margin-top:7px;
334
+ padding-right:8px;
335
+ text-align-left;
336
+ vertical-align:top;
337
+ width:90px;
338
+ zoom:1
339
+ }
340
+ .star{
341
+
342
+ background-position:0 -120px;
343
+
344
+ height:9px;
345
+ overflow-hidden;
346
+ width:50px
347
+ }
348
+ .star div{
349
+
350
+ background-position:0 -110px
351
+
352
+ }
353
+
354
+ .pslires{
355
+ padding-top:6px;
356
+ overflow:hidden;
357
+ width:99.5%
358
+ }
359
+ .psliimg{
360
+ float:left;
361
+ height:90px;
362
+ text-align:top;
363
+ width:90px
364
+ }
365
+ .pslimain{
366
+ margin-left:100px;
367
+ margin-right:9em
368
+ }
369
+ .psliprice{
370
+ float:right;
371
+ width:7em
372
+ }
373
+ .psliprice b{
374
+ font-size:medium;
375
+ font-weight:bold;
376
+ white-space:nowrap
377
+ }
378
+ .psliimg img{
379
+ border:none
380
+ }
381
+ </style><script type="text/javascript">
382
+ window['hlprwt'] = function(t, ct) {
383
+ try {
384
+ if (t === window) {
385
+ t = window.event.srcElement;
386
+ while (t) {
387
+ if (t.href) {
388
+ break;
389
+ }
390
+ t = t.parentNode;
391
+ }
392
+ }
393
+ t.href = ct;
394
+ t.onmousedown = '';
395
+ } catch (e) {
396
+ }
397
+ return true;
398
+ }
399
+ window.google = { y: {} };
400
+ </script><script type="text/javascript"></script></head>
401
+ <body bgcolor="#ffffff" topmargin="3" marginheight="3" marginwidth="0"
402
+ ><div id=gbar><nobr><b class=gb1>Web</b> <a class=gb1 href="https://www.google.com/search?hl=en&safe=off&q=site:ruby-lang.org&um=1&ie=UTF-8&tbm=isch&source=og&sa=N&tab=wi">Images</a> <a class=gb1 href="https://www.google.com/search?hl=en&safe=off&q=site:ruby-lang.org&um=1&ie=UTF-8&tbo=u&tbm=vid&source=og&sa=N&tab=wv">Videos</a> <a class=gb1 href="http://maps.google.com/maps?hl=en&safe=off&q=site:ruby-lang.org&um=1&ie=UTF-8&sa=N&tab=wl">Maps</a> <a class=gb1 href="http://news.google.com/nwshp?hl=en&tab=wn">News</a> <a class=gb1 href="https://www.google.com/search?hl=en&safe=off&q=site:ruby-lang.org&um=1&ie=UTF-8&tbo=u&tbm=shop&source=og&sa=N&tab=wf">Shopping</a> <a class=gb1 href="https://mail.google.com/mail/?tab=wm">Gmail</a> <a class=gb1 style="text-decoration:none" href="http://www.google.com/intl/en/options/"><u>More</u> &raquo;</a></nobr></div><div id=guser width=100%><nobr><span id=gbn class=gbi></span><span id=gbf class=gbf></span><span id=gbe></span><a href="http://www.google.com/history/optout?hl=en" class=gb4>Web History</a> | <a href="/preferences?hl=en" class=gb4>Settings</a> | <a id=gb_70 href="https://accounts.google.com/ServiceLogin?hl=en&continue=https://www.google.com/search%3Fhl%3Den%26safe%3Doff%26q%3Dsite:ruby-lang.org%26btnG%3DSearch" class=gb4>Sign in</a></nobr></div><div class=gbh style=left:0></div><div class=gbh style=right:0></div><br clear="all"><table border="0" cellpadding="0" cellspacing="0" id="mn" style="position:relative"><tr><td rowspan="2" valign="top" width="157"><h1><a href="/webhp?hl=en" id="logo" title="Go to Google Home"><img src="/images/nav_logo_hp2.png" alt="" height="222" style="border:0" width="167"></a></h1></td><td valign="top" style="padding-left:9px" width="559"><form name="gs" id="tsf" method="GET" action="/search" style="display:block;margin:0;background:none"><table border="0" cellpadding="0" cellspacing="0" id="sbhost" style="border-bottom:1px solid #e7e7e7;margin-top:18px;position:relative"><tr><td class="lst-td" width="100%" valign="bottom" style=""><div style="position:relative;zoom:1"><input autocomplete="off" class="lst" type="text" name="q" maxlength="2048" title="Search" value="site:ruby-lang.org"></div></td><td><div class="ds"><div class="lsbb"><input type="submit" name="btnG" class="lsb" value="Search"></div></div></td></tr></table><input type="hidden" name="hl" value="en"><input type="hidden" name="safe" value="off"></form></td><td style="padding-left:5px" width="259"><a href="/preferences?q=site:ruby-lang.org&amp;hl=en&amp;safe=off&amp;ie=UTF-8&amp;sa=F" class="fl" style="
403
+ font-size:11px;margin-left:8px
404
+ ">SafeSearch is off</a></td></tr><tr><td width="100%"><div id="subform_ctrl"><div style="float:right"><a class="fl" href="/advanced_search?q=site:ruby-lang.org&amp;hl=en&amp;safe=off&amp;ie=UTF-8">Advanced Search</a></div><div>Results <b>1</b> - <b>10</b> of about <b>155,000</b> from <b>ruby-lang.org</b>.</div></div></td><td></td></tr><tr><td valign="top" id="leftnav" style="padding:4px"><div id="modeselector" style="padding-bottom:4px"><ul><li class="mitem msel"><span class="micon" style="
405
+ background-position:-20px -132px
406
+ "></span>Everything</li></ul><a id="showmodes" class="q" href="/search?hl=en&amp;safe=off&amp;q=site%3Aruby-lang.org&amp;prmdo=1&amp;sa=X"><span class="micon"></span><span class="msm">More</span></a></div><div class="lnsec"><h2 class="hd">Search Options</h2><ul id="tbd" class="med"></ul><a href="/search?q=site:ruby-lang.org&amp;hl=en&amp;safe=off&amp;sa=G&amp;ie=UTF-8&amp;tbo=1" class="q" style="display:block;margin-bottom:16px">Show options...</a></div></td><td valign="top"><div id="center_col"><div id="tbbc" style="background:#ebeff9;padding:8px;margin-bottom:4px"><b>Web</b></div><div id="res"><div id="ires"><ol><li class="g"><h3 class="r"><a href="http://ruby-lang.org/" onmousedown="return hlprwt(this, 'http://ruby-lang.org/')">Ruby Programming Language</a></h3><div class="s">31 Oct 2011 <b>...</b> A dynamic, interpreted, open source programming language with a focus on <br> simplicity and productivity. Site includes news, downloads, <b>...</b><br><div><cite>ruby-lang.org/</cite><span class="flc"> - <a href="//webcache.googleusercontent.com/search?hl=en&amp;safe=off&amp;q=cache:yxzR5ojuzQ8J:http://ruby-lang.org/+site%3Aruby-lang.org&amp;ct=clnk">Cached</a> - <a href="/search?hl=en&amp;safe=off&amp;tbo=1&amp;q=related:http://ruby-lang.org/+site%3Aruby-lang.org&amp;sa=X">Similar</a></span></div></div></li><li class="g"><h3 class="r"><a href="http://www.ruby-lang.org/fr/" onmousedown="return hlprwt(this, 'http://www.ruby-lang.org/fr/')">Le langage Ruby</a></h3><div class="s">31 oct. 2011 <b>...</b> Sortie de Ruby 1.9.3-p0. Ruby 1.9.3-p0 est sorti. C&#39;est la version stable la plus <br> r�cente de la s�rie 1.9. Voyez les fichiers ChangeLog et NEWS <b>...</b><br><div><cite>www.ruby-lang.org/fr/</cite><span class="flc"> - <a href="//webcache.googleusercontent.com/search?hl=en&amp;safe=off&amp;q=cache:NltJcsh7PQQJ:http://www.ruby-lang.org/fr/+site%3Aruby-lang.org&amp;ct=clnk">Cached</a> - <a href="/search?hl=en&amp;safe=off&amp;tbo=1&amp;q=related:http://www.ruby-lang.org/fr/+site%3Aruby-lang.org&amp;sa=X">Similar</a></span></div></div></li><li class="g"><h3 class="r"><a href="http://www.ruby-lang.org/pl/" onmousedown="return hlprwt(this, 'http://www.ruby-lang.org/pl/')">J&#281;zyk programowania Ruby</a></h3><div class="s">17 Sie 2011 <b>...</b> RuPy 2011 ju&#380; za dwa miesi&#261;ce! RuPy 2011, to czwarta edycja wyj&#261;tkowej, <br> mi&#281;dzynarodowej konferencji, po&#347;wi&#281;conej g&#322;�wnie dynamicznych <b>...</b><br><div><cite>www.ruby-lang.org/pl/</cite><span class="flc"> - <a href="//webcache.googleusercontent.com/search?hl=en&amp;safe=off&amp;q=cache:l2ImNGN7bskJ:http://www.ruby-lang.org/pl/+site%3Aruby-lang.org&amp;ct=clnk">Cached</a> - <a href="/search?hl=en&amp;safe=off&amp;tbo=1&amp;q=related:http://www.ruby-lang.org/pl/+site%3Aruby-lang.org&amp;sa=X">Similar</a></span></div></div></li><li class="g"><h3 class="r"><a href="http://www.ruby-lang.org/ja/" onmousedown="return hlprwt(this, 'http://www.ruby-lang.org/ja/')">&#12458;&#12502;&#12472;&#12455;&#12463;&#12488;&#25351;&#21521;&#12473;&#12463;&#12522;&#12503;&#12488;&#35328;&#35486; Ruby</a></h3><div class="s">2011&#24180;12&#26376;3&#26085; <b>...</b> &#20844;&#24335;&#12469;&#12452;&#12488;&#12290;&#12491;&#12517;&#12540;&#12473;&#12289;&#12513;&#12540;&#12522;&#12531;&#12464;&#12522;&#12473;&#12488;&#12398;&#32057;&#20171;&#12289;&#12480;&#12454;&#12531;&#12525;&#12540;&#12489;&#12290;<br><div><cite>www.ruby-lang.org/ja/</cite><span class="flc"> - <a href="//webcache.googleusercontent.com/search?hl=en&amp;safe=off&amp;q=cache:j7GvXdh02YYJ:http://www.ruby-lang.org/ja/+site%3Aruby-lang.org&amp;ct=clnk">Cached</a> - <a href="/search?hl=en&amp;safe=off&amp;tbo=1&amp;q=related:http://www.ruby-lang.org/ja/+site%3Aruby-lang.org&amp;sa=X">Similar</a></span></div></div></li><li class="g"><h3 class="r"><a href="http://www.ruby-lang.org/zh_TW/" onmousedown="return hlprwt(this, 'http://www.ruby-lang.org/zh_TW/')">Ruby Programming Language &#20013;&#25991;&#23448;&#26041;&#32178;&#38913;</a></h3><div class="s">RubyConf Taiwan 2011 Call For Sponsors &middot; RubyConf Taiwan &#23559;&#26044;2011/8/26 (&#36913;<br> &#20116;) &#21644;8/27 (&#36913;&#20845;) &#22312;&#20013;&#22830;&#30740;&#31350;&#38498;&#20154;&#31185;&#25152;&#26371;&#35696;&#24307;&#33289;&#36774;&#65292;&#26159;&#21488;&#28771;&#21807;&#19968;&#21450;&#26368;&#22823;&#30340;Ruby <b>...</b><br><div><cite>www.ruby-lang.org/zh_TW/</cite><span class="flc"> - <a href="//webcache.googleusercontent.com/search?hl=en&amp;safe=off&amp;q=cache:H0I1vQgMg2cJ:http://www.ruby-lang.org/zh_TW/+site%3Aruby-lang.org&amp;ct=clnk">Cached</a> - <a href="/search?hl=en&amp;safe=off&amp;tbo=1&amp;q=related:http://www.ruby-lang.org/zh_TW/+site%3Aruby-lang.org&amp;sa=X">Similar</a></span></div></div></li><li class="g"><h3 class="r"><a href="http://www.ruby-lang.org/it" onmousedown="return hlprwt(this, 'http://www.ruby-lang.org/it')">Il linguaggio di programmazione Ruby</a></h3><div class="s">5 ago 2011 <b>...</b> Rilasciato Ruby 1.9.3 preview1. Ruby 1.9.3 preview1 � stato rilasciato. Questa � <br> una prima preview della prossima versione, e contiene ancora <b>...</b><br><div><cite>www.ruby-lang.org/it</cite><span class="flc"> - <a href="/search?hl=en&amp;safe=off&amp;tbo=1&amp;q=related:http://www.ruby-lang.org/it+site%3Aruby-lang.org&amp;sa=X">Similar</a></span></div></div></li><li class="g"><h3 class="r"><a href="http://www.ruby-lang.org/zh_cn" onmousedown="return hlprwt(this, 'http://www.ruby-lang.org/zh_cn')">Ruby &#31243;&#24207;&#35774;&#35745;&#35821;&#35328;&#23448;&#26041;&#32593;&#31449;</a></h3><div class="s">Ruby &#26159;... &#19968;&#31181;&#36328;&#24179;&#21488;&#12289;&#38754;&#21521;&#23545;&#35937;&#30340;&#21160;&#24577;&#31867;&#22411;&#32534;&#31243;&#35821;&#35328;&#12290;Ruby &#20307;&#29616;&#20102;&#34920;&#36798;&#30340;&#19968;&#33268;&#24615;&#21644;<br> &#31616;&#21333;&#24615;&#65292;&#23427;&#19981;&#20165;&#26159;&#19968;&#38376;&#32534;&#31243;&#35821;&#35328;&#65292;&#26356;&#26159;&#34920;&#36798;&#24819;&#27861;&#30340;&#19968;&#31181;&#31616;&#32451;&#26041;&#24335;&#12290; &#26356;&#22810;. <b>...</b><br><div><cite>www.ruby-lang.org/zh_cn</cite><span class="flc"> - <a href="//webcache.googleusercontent.com/search?hl=en&amp;safe=off&amp;q=cache:5TcPjRsnRYMJ:http://www.ruby-lang.org/zh_cn+site%3Aruby-lang.org&amp;ct=clnk">Cached</a> - <a href="/search?hl=en&amp;safe=off&amp;tbo=1&amp;q=related:http://www.ruby-lang.org/zh_cn+site%3Aruby-lang.org&amp;sa=X">Similar</a></span></div></div></li><li class="g"><h3 class="r"><a href="http://www.ruby-lang.org/id/" onmousedown="return hlprwt(this, 'http://www.ruby-lang.org/id/')">Bahasa Pemrograman Ruby</a></h3><div class="s">Ruby 1.9.1 rilis! Ruby 1.9.1 rilis. Ini adalah rilis stabil pertama dari Ruby Seri 1.9. <br> Ruby 1.9 modern, lebih cepat, dengan sintaks jelas, multilingualized, yang <b>...</b><br><div><cite>www.ruby-lang.org/id/</cite><span class="flc"> - <a href="//webcache.googleusercontent.com/search?hl=en&amp;safe=off&amp;q=cache:hHWN50mDHXcJ:http://www.ruby-lang.org/id/+site%3Aruby-lang.org&amp;ct=clnk">Cached</a> - <a href="/search?hl=en&amp;safe=off&amp;tbo=1&amp;q=related:http://www.ruby-lang.org/id/+site%3Aruby-lang.org&amp;sa=X">Similar</a></span></div></div></li><li class="g"><h3 class="r"><a href="http://www.ruby-lang.org/es/" onmousedown="return hlprwt(this, 'http://www.ruby-lang.org/es/')">Lenguaje de Programaci�n Ruby</a></h3><div class="s">4 Nov 2011 <b>...</b> Ruby es� Un lenguaje de programaci�n din�mico y de c�digo abierto enfocado <br> en la simplicidad y productividad. Su elegante sintaxis se <b>...</b><br><div><cite>www.ruby-lang.org/es/</cite><span class="flc"> - <a href="//webcache.googleusercontent.com/search?hl=en&amp;safe=off&amp;q=cache:UEjMjl6oGTgJ:http://www.ruby-lang.org/es/+site%3Aruby-lang.org&amp;ct=clnk">Cached</a> - <a href="/search?hl=en&amp;safe=off&amp;tbo=1&amp;q=related:http://www.ruby-lang.org/es/+site%3Aruby-lang.org&amp;sa=X">Similar</a></span></div></div></li><li class="g"><h3 class="r"><a href="http://www.ruby-lang.org/pt/" onmousedown="return hlprwt(this, 'http://www.ruby-lang.org/pt/')">Linguagem de Programa��o Ruby</a></h3><div class="s">2 ago. 2011 <b>...</b> Lan�ado o Ruby 1.9.3 preview1. O Ruby 1.9.3 preview1 foi lan�ado. Esta � a <br> primeira pre-release da pr�xima vers�o e ainda existem alguns <b>...</b><br><div><cite>www.ruby-lang.org/pt/</cite><span class="flc"> - <a href="//webcache.googleusercontent.com/search?hl=en&amp;safe=off&amp;q=cache:S0y6Ga9SmyEJ:http://www.ruby-lang.org/pt/+site%3Aruby-lang.org&amp;ct=clnk">Cached</a> - <a href="/search?hl=en&amp;safe=off&amp;tbo=1&amp;q=related:http://www.ruby-lang.org/pt/+site%3Aruby-lang.org&amp;sa=X">Similar</a></span></div></div></li></ol></div></div></div><div id="foot"><table align="center" border="0" cellpadding="0" cellspacing="0" id="nav"><tr valign="top"><td class="b" align="left"><span class="csb ch" style="background-position:-26px 0;width:18px"></span><b></b></td><td><span class="csb ch" style="background-position:-44px 0;width:16px"></span><b>1</b></td><td><a href="/search?hl=en&amp;safe=off&amp;ie=UTF-8&amp;ei=RE7zTr7dPJqPsAaV6tUW&amp;q=site:ruby-lang.org&amp;start=10&amp;sa=N" class="fl"><span class="csb ch" style="background-position:-60px 0;width:16px"></span>2</a></td><td><a href="/search?hl=en&amp;safe=off&amp;ie=UTF-8&amp;ei=RE7zTr7dPJqPsAaV6tUW&amp;q=site:ruby-lang.org&amp;start=20&amp;sa=N" class="fl"><span class="csb ch" style="background-position:-60px 0;width:16px"></span>3</a></td><td><a href="/search?hl=en&amp;safe=off&amp;ie=UTF-8&amp;ei=RE7zTr7dPJqPsAaV6tUW&amp;q=site:ruby-lang.org&amp;start=30&amp;sa=N" class="fl"><span class="csb ch" style="background-position:-60px 0;width:16px"></span>4</a></td><td><a href="/search?hl=en&amp;safe=off&amp;ie=UTF-8&amp;ei=RE7zTr7dPJqPsAaV6tUW&amp;q=site:ruby-lang.org&amp;start=40&amp;sa=N" class="fl"><span class="csb ch" style="background-position:-60px 0;width:16px"></span>5</a></td><td><a href="/search?hl=en&amp;safe=off&amp;ie=UTF-8&amp;ei=RE7zTr7dPJqPsAaV6tUW&amp;q=site:ruby-lang.org&amp;start=50&amp;sa=N" class="fl"><span class="csb ch" style="background-position:-60px 0;width:16px"></span>6</a></td><td><a href="/search?hl=en&amp;safe=off&amp;ie=UTF-8&amp;ei=RE7zTr7dPJqPsAaV6tUW&amp;q=site:ruby-lang.org&amp;start=60&amp;sa=N" class="fl"><span class="csb ch" style="background-position:-60px 0;width:16px"></span>7</a></td><td><a href="/search?hl=en&amp;safe=off&amp;ie=UTF-8&amp;ei=RE7zTr7dPJqPsAaV6tUW&amp;q=site:ruby-lang.org&amp;start=70&amp;sa=N" class="fl"><span class="csb ch" style="background-position:-60px 0;width:16px"></span>8</a></td><td><a href="/search?hl=en&amp;safe=off&amp;ie=UTF-8&amp;ei=RE7zTr7dPJqPsAaV6tUW&amp;q=site:ruby-lang.org&amp;start=80&amp;sa=N" class="fl"><span class="csb ch" style="background-position:-60px 0;width:16px"></span>9</a></td><td><a href="/search?hl=en&amp;safe=off&amp;ie=UTF-8&amp;ei=RE7zTr7dPJqPsAaV6tUW&amp;q=site:ruby-lang.org&amp;start=90&amp;sa=N" class="fl"><span class="csb ch" style="background-position:-60px 0;width:16px"></span>10</a></td><td class="b" style="text-align:left"><a href="/search?hl=en&amp;safe=off&amp;ie=UTF-8&amp;ei=RE7zTr7dPJqPsAaV6tUW&amp;q=site:ruby-lang.org&amp;start=10&amp;sa=N" style="text-align:left"><span class="csb ch" style="background-position:-76px 0;width:66px"></span><span style="display:block;margin-left:53px">Next</span></a></td></tr></table><div><div style="margin-top:22px"><form method="GET" action="/search"><table border="0" cellpadding="0" cellspacing="0" width="100%" style="border-bottom:1px solid #e7e7e7;padding:8px 0 0;position:relative"><tr><td class="lst-td" width="100%" valign="bottom"><div style="position:relative;zoom:1"><input autocomplete="off" class="lst" type="text" name="q" maxlength="2048" value="site:ruby-lang.org" title="Search"></div></td><td><div class="ds"><div class="lsbb"><input type="submit" name="btnG" class="lsb" value="Search"></div></div></td></tr></table><input type="hidden" name="hl" value="en"><input type="hidden" name="safe" value="off"></form></div><p id="bfl" class="flc" style="margin:6px 0 0;text-align:center"><a href="/support/websearch/bin/answer.py?answer=134479&amp;hl=en">Search Help</a></p></div><div id="fll" class="flc" style="margin:19px auto 19px auto;text-align:center"><a href="/">Google&#160;Home</a> <a href="
407
+ /intl/en/ads/">Advertising&#160;Programs</a> <a href="/services">Business Solutions</a> <a href="/intl/en/privacy.html">Privacy</a> <a href="/intl/en/about.html">About Google</a></div></div></td><td valign="top"></td></tr></table><script src="/extern_js/f/CgJlbiAAKzBaOAAsKzAOOAAsKzAKOACaAgJoZSwrMBg4ACyAAgSQAl0/V-eO8SDgTAw.js"></script><script type="text/javascript">google.ac.c({"client":"serp","dh":true,"ds":"","fl":true,"host":"google.com","jsonp":true,"msgs":{"lcky":"I\u0026#39;m Feeling Lucky","lml":"Learn more","psrc":"This search was removed from your \u003Ca href=\"/history\"\u003EWeb History\u003C/a\u003E","psrl":"Remove","srch":"Google Search"},"ovr":{"d":1,"hl":1,"l":1,"o":1,"p":1,"ps":1,"sw":1,"vc":-3},"pq":"site:ruby-lang.org","scd":10,"sce":5})</script></body></html>
@@ -0,0 +1,3 @@
1
+ $:.push File.expand_path("../lib", __FILE__)
2
+
3
+ require 'seo_info.rb'
@@ -0,0 +1,15 @@
1
+ require 'spec_helper.rb'
2
+
3
+ describe SeoInfo::Google do
4
+ let(:google) do
5
+ path = 'spec/data/google_search.html'
6
+ google = SeoInfo::Google.new('example.com')
7
+ google.stub(:get_page).and_return(File.read(path))
8
+ google
9
+ end
10
+
11
+ it "returns number greater than zero" do
12
+ google.indexed_pages.should > 0
13
+ end
14
+
15
+ end
metadata ADDED
@@ -0,0 +1,86 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: seo_info
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Sergey Parizhskiy
9
+ - Dina Zhyliaieva
10
+ autorequire:
11
+ bindir: bin
12
+ cert_chain: []
13
+ date: 2011-12-22 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: rspec
17
+ requirement: &2153233340 !ruby/object:Gem::Requirement
18
+ none: false
19
+ requirements:
20
+ - - ! '>='
21
+ - !ruby/object:Gem::Version
22
+ version: '0'
23
+ type: :development
24
+ prerelease: false
25
+ version_requirements: *2153233340
26
+ - !ruby/object:Gem::Dependency
27
+ name: nokogiri
28
+ requirement: &2153232920 !ruby/object:Gem::Requirement
29
+ none: false
30
+ requirements:
31
+ - - ! '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: *2153232920
37
+ description: Gets different seo information such as Page Rank, Alexa Rank, number
38
+ of indexed pages in different search engines and so on.
39
+ email:
40
+ - parizhskiy@gmail.com
41
+ - dinaionenko@reevoo.com
42
+ executables: []
43
+ extensions: []
44
+ extra_rdoc_files: []
45
+ files:
46
+ - .gitignore
47
+ - .rspec
48
+ - CHANGELOG.MD
49
+ - Gemfile
50
+ - README.md
51
+ - Rakefile
52
+ - lib/seo_info.rb
53
+ - lib/seo_info/google.rb
54
+ - lib/seo_info/version.rb
55
+ - seo_info.gemspec
56
+ - spec/data/google_search.html
57
+ - spec/spec_helper.rb
58
+ - spec/specs/google_spec.rb
59
+ homepage: ''
60
+ licenses: []
61
+ post_install_message:
62
+ rdoc_options: []
63
+ require_paths:
64
+ - lib
65
+ required_ruby_version: !ruby/object:Gem::Requirement
66
+ none: false
67
+ requirements:
68
+ - - ! '>='
69
+ - !ruby/object:Gem::Version
70
+ version: '0'
71
+ required_rubygems_version: !ruby/object:Gem::Requirement
72
+ none: false
73
+ requirements:
74
+ - - ! '>='
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ requirements: []
78
+ rubyforge_project: seo_info
79
+ rubygems_version: 1.8.10
80
+ signing_key:
81
+ specification_version: 3
82
+ summary: SEO information for web-sites
83
+ test_files:
84
+ - spec/data/google_search.html
85
+ - spec/spec_helper.rb
86
+ - spec/specs/google_spec.rb