Webseite als Jekyll-Projekt https://software-berater.net/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

22 lines
652 B

require 'cgi'
require 'open-uri'
SITEMAP = 'https://software-berater.net/sitemap.xml'
desc "Ping Google, Bing"
task :ping do
index_location = CGI.escape(SITEMAP)
{
google: "http://www.google.com/webmasters/sitemaps/ping?sitemap=#{index_location}",
bing: "http://www.bing.com/webmaster/ping.aspx?siteMap=#{index_location}",
sitemap_writer: "http://www.sitemapwriter.com/notify.php?crawler=all&url=#{index_location}"
}.each do |engine, link|
begin
URI.open(link)
puts "Successful ping of #{engine}"
rescue Timeout::Error, StandardError => e
puts "Ping failed for #{engine}: #{e.inspect}"
end
end
end