Create a gist now

Instantly share code, notes, and snippets.

@symm /Rakefile
Created Nov 16, 2012

What would you like to do?
Pingomatic task for Octopress blogging
desc 'Ping pingomatic'
task :pingomatic do
begin
require 'xmlrpc/client'
cfg = YAML.load_file("_config.yml")
puts '* Pinging ping-o-matic'
XMLRPC::Client.new('rpc.pingomatic.com', '/').call('weblogUpdates.extendedPing', "#{cfg['title']}" , "#{cfg['url']}", "#{cfg['subscribe_rss']}")
rescue LoadError
puts '! Could not ping ping-o-matic, because XMLRPC::Client could not be found.'
end
end
Owner

symm commented Nov 16, 2012

Caution: Your "subscribe_rss" var should be a full http url to the atom.xml feed.

What about "#{cfg['url']}#{cfg['subscribe_rss']}" instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment