Mephisto Post Pinging Improvement
So, the post pinger plugin was pretty awesome, but it was pinging RubyCorner and Rubylicious when it shouldn’t have. I made it tag-based so it checks a category of feed URL and decides whether the tag matches the category. Right now, I’ve only implemented it for the ruby tag since that’s all I should need for these two services.
ArticlePingObserver::SERVICES = [
{ :url => "http://rpc.pingomatic.com/", :type => :xmlrpc },
{ :url => "http://rpc.weblogs.com/pingSiteForm", :type => :rest },
{ :url => "http://pingomatic.com/ping/", :type => :weblogs_get, :extras => [ "chk_weblogscom=on&chk_blogs=on&chk_technorati=on&chk_feedburner=on&chk_syndic8=on&chk_newsgator=on&chk_feedster=on&chk_myyahoo=on&chk_pubsubcom=on&chk_blogdigger=on&chk_blogrolling=on&chk_blogstreet=on&chk_moreover=on&chk_weblogalot=on&chk_icerocket=on&chk_newsisfree=on&chk_topicexchange=on" ] },
{ :url => "http://rpc.technorati.com/rpc/ping", :type => :xmlrpc },
{ :url => "http://ping.syndic8.com/xmlrpc.php", :type => :xmlrpc },
{ :url => "http://rubycorner.com/ping/xmlrpc/e49ac4608c88606f75486e6da3da34de6527622a", :type => :xmlrpc, :category => 'ruby' },
{ :url => "http://rubylicio.us/ping/xmlrpc", :type => :xmlrpc, :category => 'ruby' }
}
There’s the array of services. Now the magic:
SERVICES.each do |sinfo|
if sinfo[:category] == "ruby"
next unless article.tags(true).collect{|t|t[:name]}.join(" ") =~ /\bruby\b/
end
Very simple. It should work on the basis of the service categories and the tags. We’ll see. Hopefully this post will end up on RubyCorner.

Great! We have been trying to make the bloggers registered at RubyCorner.com to register with ruby specific feeds to help keep the directory centered in the topic, wish everybody had this care.
Nice! I think I’ll add this to the plugin.