diff --git a/README.md b/README.md index 7e3076c0..ad33193f 100644 --- a/README.md +++ b/README.md @@ -204,10 +204,10 @@ SitemapGenerator.verbose = false ### Pinging Search Engines -Using `rake sitemap:refresh` will notify Google to let them know that a new sitemap +Using `rake sitemap:refresh` will notify configured search engines to let them know that a new sitemap is available. To generate new sitemaps without notifying search engines, use `rake sitemap:refresh:no_ping`. -If you want to customize the hash of search engines you can access it at: +By default no search engines are configured. If you want to customize the hash of search engines you can access it at: ```ruby SitemapGenerator::Sitemap.search_engines diff --git a/lib/sitemap_generator/link_set.rb b/lib/sitemap_generator/link_set.rb index d0254cd1..1dd3ad5b 100644 --- a/lib/sitemap_generator/link_set.rb +++ b/lib/sitemap_generator/link_set.rb @@ -126,9 +126,7 @@ def initialize(options={}) :include_root => true, :include_index => false, :filename => :sitemap, - :search_engines => { - :google => "http://www.google.com/webmasters/tools/ping?sitemap=%s" - }, + :search_engines => {}, :create_index => :auto, :compress => true, :max_sitemap_links => SitemapGenerator::MAX_SITEMAP_LINKS diff --git a/spec/sitemap_generator/link_set_spec.rb b/spec/sitemap_generator/link_set_spec.rb index f49d6388..14c2f5df 100644 --- a/spec/sitemap_generator/link_set_spec.rb +++ b/spec/sitemap_generator/link_set_spec.rb @@ -130,12 +130,12 @@ describe 'search_engines' do it 'should have search engines by default' do expect(ls.search_engines).to be_a(Hash) - expect(ls.search_engines.size).to eq(1) + expect(ls.search_engines.size).to eq(0) end it 'should support being modified' do ls.search_engines[:newengine] = 'abc' - expect(ls.search_engines.size).to eq(2) + expect(ls.search_engines.size).to eq(1) end it 'should support being set to nil' do @@ -149,12 +149,6 @@ end describe 'ping search engines' do - it 'should not fail' do - request = stub_request(:get, //) - expect { ls.ping_search_engines }.not_to raise_error - expect(request).to have_been_requested.at_least_once - end - it 'should raise if no host is set' do expect { SitemapGenerator::LinkSet.new.ping_search_engines }.to raise_error(SitemapGenerator::SitemapError, 'No value set for host') end