Sha256: 92c3f61e3d3c61728a7df7755ea585951eb6ce5e43265600655ac94ea62e73a1

Contents?: true

Size: 683 Bytes

Versions: 2

Compression:

Stored size: 683 Bytes

Contents

require 'integrity'
require 'prowl'

module Integrity
  class Notifier
    class Prowl < Notifier::Base
      attr_reader :config

      def self.to_haml
        File.read(File.dirname(__FILE__) + '/config.haml')
      end

      def deliver!
        if api_keys = config[:api_keys]
          api_keys.split(',').each do |key|
            prowl_params = {}
            prowl_params[:application]  = 'Integrity'
            prowl_params[:event]        = short_message
            prowl_params[:description]  = full_message

            ::Prowl.add(key, prowl_params)
          end
        end
      end

      def to_s
        'Prowl'
      end
    end

    register Prowl
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bdotdub-integrity-prowl-0.2.0 lib/integrity/notifier/prowl.rb
bdotdub-integrity-prowl-0.2.1 lib/integrity/notifier/prowl.rb