imathis/octopress — Issue #260: A rake target to ping Ping-O-Matic &c. would be good
Author: ianp
Created: 2011-11-05 21:32:55+00:00
State: open

Like this:

```ruby
desc "Ping blog aggregators with the latest post"
task :ping do
require "yaml"
require "xmlrpc/client"
cfg = YAML.load_file("_config.yml")
puts "Pinging ping-o-matic..."
pom = XMLRPC::Client.new("rpc.pingomatic.com", "/")
begin
result = pom.call("weblogUpdates.extendedPing", "#{cfg['title']}", "#{cfg['url']}", "#{cfg['url']}#{cfg['subscribe_rss']}")
puts result['message']
rescue => e
puts "ping failed (#{e})."
end
end
```

although you may want to improve on the code as I'm not really a very good Rubyist.