Sha256: 9c22be72e14cd26e0963fb67d31b21afa954e6aac428919378ba6708bfdab6ad

Contents?: true

Size: 750 Bytes

Versions: 54

Compression:

Stored size: 750 Bytes

Contents

module Resque
  module Failure
    module Thoughtbot
      def self.included(base)
        base.extend(ClassMethods)
      end

      module ClassMethods
        attr_accessor :klass

        def configure(&block)
          Resque::Failure.backend = self
          klass.configure(&block)
        end

        def count
          # We can't get the total # of errors from Hoptoad so we fake it
          # by asking Resque how many errors it has seen.
          Stat[:failed]
        end
      end

      def save
        self.class.klass.notify_or_ignore(exception,
          :parameters => {
            :payload_class => payload['class'].to_s,
            :payload_args => payload['args'].inspect
          }
        )
      end
    end
  end
end

Version data entries

54 entries across 54 versions & 5 rubygems

Version Path
classiccms-0.7.5 vendor/bundle/gems/resque-1.20.0/lib/resque/failure/thoughtbot.rb
classiccms-0.7.4 vendor/bundle/gems/resque-1.20.0/lib/resque/failure/thoughtbot.rb
classiccms-0.7.3 vendor/bundle/gems/resque-1.20.0/lib/resque/failure/thoughtbot.rb
classiccms-0.7.2 vendor/bundle/gems/resque-1.20.0/lib/resque/failure/thoughtbot.rb
classiccms-0.7.1 vendor/bundle/gems/resque-1.20.0/lib/resque/failure/thoughtbot.rb
classiccms-0.7.0 vendor/bundle/gems/resque-1.20.0/lib/resque/failure/thoughtbot.rb
classiccms-0.6.9 vendor/bundle/gems/resque-1.20.0/lib/resque/failure/thoughtbot.rb
classiccms-0.6.8 vendor/bundle/gems/resque-1.20.0/lib/resque/failure/thoughtbot.rb
classiccms-0.6.7 vendor/bundle/gems/resque-1.20.0/lib/resque/failure/thoughtbot.rb
classiccms-0.6.6 vendor/bundle/gems/resque-1.20.0/lib/resque/failure/thoughtbot.rb
classiccms-0.6.5 vendor/bundle/gems/resque-1.20.0/lib/resque/failure/thoughtbot.rb
classiccms-0.6.4 vendor/bundle/gems/resque-1.20.0/lib/resque/failure/thoughtbot.rb
classiccms-0.6.3 vendor/bundle/gems/resque-1.20.0/lib/resque/failure/thoughtbot.rb
classiccms-0.6.2 vendor/bundle/gems/resque-1.20.0/lib/resque/failure/thoughtbot.rb
classiccms-0.6.1 vendor/bundle/gems/resque-1.20.0/lib/resque/failure/thoughtbot.rb
classiccms-0.6.0 vendor/bundle/gems/resque-1.20.0/lib/resque/failure/thoughtbot.rb
resque-1.23.0 lib/resque/failure/thoughtbot.rb
classiccms-0.5.17 vendor/bundle/gems/resque-1.20.0/lib/resque/failure/thoughtbot.rb
classiccms-0.5.16 vendor/bundle/gems/resque-1.20.0/lib/resque/failure/thoughtbot.rb
classiccms-0.5.15 vendor/bundle/gems/resque-1.20.0/lib/resque/failure/thoughtbot.rb