File tree 3 files changed +5
-13
lines changed
3 files changed +5
-13
lines changed Original file line number Diff line number Diff line change @@ -204,10 +204,10 @@ SitemapGenerator.verbose = false
204
204
205
205
### Pinging Search Engines
206
206
207
- Using ` rake sitemap:refresh ` will notify Google to let them know that a new sitemap
207
+ Using ` rake sitemap:refresh ` will notify configured search engines to let them know that a new sitemap
208
208
is available. To generate new sitemaps without notifying search engines, use ` rake sitemap:refresh:no_ping ` .
209
209
210
- If you want to customize the hash of search engines you can access it at:
210
+ By default no search engines are configured. If you want to customize the hash of search engines you can access it at:
211
211
212
212
``` ruby
213
213
SitemapGenerator ::Sitemap .search_engines
Original file line number Diff line number Diff line change @@ -126,9 +126,7 @@ def initialize(options={})
126
126
:include_root => true ,
127
127
:include_index => false ,
128
128
:filename => :sitemap ,
129
- :search_engines => {
130
- :google => "http://www.google.com/webmasters/tools/ping?sitemap=%s"
131
- } ,
129
+ :search_engines => { } ,
132
130
:create_index => :auto ,
133
131
:compress => true ,
134
132
:max_sitemap_links => SitemapGenerator ::MAX_SITEMAP_LINKS
Original file line number Diff line number Diff line change 130
130
describe 'search_engines' do
131
131
it 'should have search engines by default' do
132
132
expect ( ls . search_engines ) . to be_a ( Hash )
133
- expect ( ls . search_engines . size ) . to eq ( 1 )
133
+ expect ( ls . search_engines . size ) . to eq ( 0 )
134
134
end
135
135
136
136
it 'should support being modified' do
137
137
ls . search_engines [ :newengine ] = 'abc'
138
- expect ( ls . search_engines . size ) . to eq ( 2 )
138
+ expect ( ls . search_engines . size ) . to eq ( 1 )
139
139
end
140
140
141
141
it 'should support being set to nil' do
149
149
end
150
150
151
151
describe 'ping search engines' do
152
- it 'should not fail' do
153
- request = stub_request ( :get , // )
154
- expect { ls . ping_search_engines } . not_to raise_error
155
- expect ( request ) . to have_been_requested . at_least_once
156
- end
157
-
158
152
it 'should raise if no host is set' do
159
153
expect { SitemapGenerator ::LinkSet . new . ping_search_engines } . to raise_error ( SitemapGenerator ::SitemapError , 'No value set for host' )
160
154
end
You can’t perform that action at this time.
0 commit comments