Sha256: 0845d113373f20fd807a2ca4f915d746b9685c9aba152a86962ef62377bc4921

Contents?: true

Size: 420 Bytes

Versions: 11

Compression:

Stored size: 420 Bytes

Contents

require 'rack'
require 'multi_json'

Oj.default_options = { mode: :compat } if defined?(Oj)

module Heartcheck
  module Controllers
    class Base
      def index
        fail NotImplementError
      end

      protected

      def check(who)
        MultiJson.dump(executor.dispatch(Heartcheck.send("#{who}_checks")))
      end

      private

      def executor
        Heartcheck.executor
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
heartcheck-2.0.0 lib/heartcheck/controllers/base.rb
heartcheck-1.6.0 lib/heartcheck/controllers/base.rb
heartcheck-1.5.1 lib/heartcheck/controllers/base.rb
heartcheck-1.5.0 lib/heartcheck/controllers/base.rb
heartcheck-1.4.0 lib/heartcheck/controllers/base.rb
heartcheck-1.3.0 lib/heartcheck/controllers/base.rb
heartcheck-1.2.2 lib/heartcheck/controllers/base.rb
heartcheck-1.2.1 lib/heartcheck/controllers/base.rb
heartcheck-1.2.0 lib/heartcheck/controllers/base.rb
heartcheck-1.1.1 lib/heartcheck/controllers/base.rb
heartcheck-1.1.0 lib/heartcheck/controllers/base.rb