Sha256: b9c6a28cd717a7be2982720652e9ae3b8ccd0f7f77a93052155fdb08609b29d3
Contents?: true
Size: 571 Bytes
Versions: 10
Compression:
Stored size: 571 Bytes
Contents
require 'uri' require 'murlsh' module Murlsh # Notify PubSubHubbub hubs that feed has been updated. class AddPost60NotifyHubs < Plugin @hook = 'add_post' def self.run(url, config) hubs = config.fetch('pubsubhubbub_hubs', []) unless hubs.empty? require 'push-notify' feed_url = URI.join(config.fetch('root_url'), config.fetch('feed_file')) begin PushNotify::Content.new(feed_url).tell( *hubs.map { |h| h.fetch('publish_url') }) rescue Exception end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems