Sha256: cfca459b73ffec556612c795909c49df94eaf91cb74ddc1d333409df0494fb13

Contents?: true

Size: 543 Bytes

Versions: 23

Compression:

Stored size: 543 Bytes

Contents

module Health
  module Actions
    # The show action.
    class Show < <%= configuration.project_namespaced_class %>::Action
      using <%= configuration.project_namespaced_class %>::Refines::Actions::Response

      handle_exception Exception => :down

      def handle(*, response) = response.with body: body(:green), status: 200

      private

      def down(*, response, _exception) = response.with body: body(:red), status: 503

      def body(color) = %(<html><body style="background-color: #{color}"></body></html>)
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
hanamismith-0.27.0 lib/hanamismith/templates/%project_name%/slices/health/actions/show.rb.erb
hanamismith-0.26.0 lib/hanamismith/templates/%project_name%/slices/health/actions/show.rb.erb
hanamismith-0.25.0 lib/hanamismith/templates/%project_name%/slices/health/actions/show.rb.erb
hanamismith-0.24.0 lib/hanamismith/templates/%project_name%/slices/health/actions/show.rb.erb
hanamismith-0.23.0 lib/hanamismith/templates/%project_name%/slices/health/actions/show.rb.erb
hanamismith-0.22.1 lib/hanamismith/templates/%project_name%/slices/health/actions/show.rb.erb
hanamismith-0.22.0 lib/hanamismith/templates/%project_name%/slices/health/actions/show.rb.erb
hanamismith-0.21.0 lib/hanamismith/templates/%project_name%/slices/health/actions/show.rb.erb
hanamismith-0.20.0 lib/hanamismith/templates/%project_name%/slices/health/actions/show.rb.erb
hanamismith-0.19.0 lib/hanamismith/templates/%project_name%/slices/health/actions/show.rb.erb
hanamismith-0.18.0 lib/hanamismith/templates/%project_name%/slices/health/actions/show.rb.erb
hanamismith-0.17.1 lib/hanamismith/templates/%project_name%/slices/health/actions/show.rb.erb
hanamismith-0.17.0 lib/hanamismith/templates/%project_name%/slices/health/actions/show.rb.erb
hanamismith-0.16.0 lib/hanamismith/templates/%project_name%/slices/health/actions/show.rb.erb
hanamismith-0.15.0 lib/hanamismith/templates/%project_name%/slices/health/actions/show.rb.erb
hanamismith-0.14.1 lib/hanamismith/templates/%project_name%/slices/health/actions/show.rb.erb
hanamismith-0.14.0 lib/hanamismith/templates/%project_name%/slices/health/actions/show.rb.erb
hanamismith-0.13.0 lib/hanamismith/templates/%project_name%/slices/health/actions/show.rb.erb
hanamismith-0.12.0 lib/hanamismith/templates/%project_name%/slices/health/actions/show.rb.erb
hanamismith-0.11.0 lib/hanamismith/templates/%project_name%/slices/health/actions/show.rb.erb