Sha256: 4bb7a27089bebaebc0a58535639c6a7072f20968b838293661ae97b19035a6d9

Contents?: true

Size: 929 Bytes

Versions: 13

Compression:

Stored size: 929 Bytes

Contents

# frozen_string_literal: true

module RailsSpotlight
  module Middlewares
    module Handlers
      class VerifyActionHandler < BaseActionHandler
        def execute; end

        private

        def text_response_body
          "Rails Spotlight is working!\nRails version: #{Rails.version}\nRails environment: #{Rails.env}"
        end

        def skip_project_validation?
          true
        end

        def json_response_body
          {
            params: request.params,
            body: request.body.read,
            content_type: request.content_type,
            request_method: request.request_method,
            version: request_spotlight_version,
            for_projects: request_for_projects,
            current_gem_version: ::RailsSpotlight::VERSION,
            action_cable_path: defined?(ActionCable) ? ActionCable&.server&.config&.mount_path : nil
          }
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
rails_spotlight-0.4.2 lib/rails_spotlight/middlewares/handlers/verify_action_handler.rb
rails_spotlight-0.4.1 lib/rails_spotlight/middlewares/handlers/verify_action_handler.rb
rails_spotlight-0.4.0 lib/rails_spotlight/middlewares/handlers/verify_action_handler.rb
rails_spotlight-0.3.9 lib/rails_spotlight/middlewares/handlers/verify_action_handler.rb
rails_spotlight-0.3.8 lib/rails_spotlight/middlewares/handlers/verify_action_handler.rb
rails_spotlight-0.3.7 lib/rails_spotlight/middlewares/handlers/verify_action_handler.rb
rails_spotlight-0.3.6 lib/rails_spotlight/middlewares/handlers/verify_action_handler.rb
rails_spotlight-0.3.5 lib/rails_spotlight/middlewares/handlers/verify_action_handler.rb
rails_spotlight-0.3.4 lib/rails_spotlight/middlewares/handlers/verify_action_handler.rb
rails_spotlight-0.3.3 lib/rails_spotlight/middlewares/handlers/verify_action_handler.rb
rails_spotlight-0.3.2 lib/rails_spotlight/middlewares/handlers/verify_action_handler.rb
rails_spotlight-0.3.1 lib/rails_spotlight/middlewares/handlers/verify_action_handler.rb
rails_spotlight-0.3.0 lib/rails_spotlight/middlewares/handlers/verify_action_handler.rb