Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

add yandex as search engine #35

Merged
merged 3 commits into from about 1 year ago

3 participants

solutus Alex Rabarts Wesley Gorman
solutus

Hi Alex,
can you please add yandex as search engine to your gem? Yandex is most popular search in Russia and CIS.

Wesley Gorman

Since the standard behavior for all the other search engines bar Google is to default to false, it would be more consistent to set:

 :ping_yandex => false
Wesley Gorman

Other than setting ping_yandex to default to false, looks good. :+1:

Alex Rabarts alexrabarts merged commit 512e221 into from February 06, 2013
Alex Rabarts alexrabarts closed this February 06, 2013
Alex Rabarts
Owner

Thanks. This is now available in v1.1.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
1  README.rdoc
Source Rendered
@@ -64,6 +64,7 @@ Via gem:
64 64
 * <code>:ping_yahoo</code> -- <code>false</code>, needs <code>:yahoo_app_id</code>
65 65
 * <code>:ping_bing</code> -- <code>false</code>
66 66
 * <code>:ping_ask</code> -- <code>false</code>
  67
+* <code>:ping_yandex</code> -- <code>false</code>
67 68
 * <code>:partial_update</code> -- <code>false</code>
68 69
 
69 70
 === Change Frequency, Priority and Last Modified
7  lib/big_sitemap.rb
@@ -14,7 +14,8 @@ class BigSitemap
14 14
     :ping_google => true,
15 15
     :ping_yahoo  => false, # needs :yahoo_app_id
16 16
     :ping_bing   => false,
17  
-    :ping_ask    => false
  17
+    :ping_ask    => false, 
  18
+    :ping_yandex => false
18 19
   }
19 20
 
20 21
   # TODO: Deprecate
@@ -229,6 +230,10 @@ def ping_search_engines
229 230
     if @options[:ping_ask]
230 231
       Net::HTTP.get('submissions.ask.com', "/ping?sitemap=#{sitemap_uri}")
231 232
     end
  233
+
  234
+    if @options[:ping_yandex]
  235
+      Net::HTTP.get('webmaster.yandex.ru', "/wmconsole/sitemap_list.xml?host=#{sitemap_uri}")
  236
+    end
232 237
   end
233 238
 
234 239
   # TODO: Deprecate
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.