Class: Rails::Command::Karst::VerifyCommand
- Inherits:
-
Base
- Object
- Base
- Rails::Command::Karst::VerifyCommand
- Includes:
- Boot
- Defined in:
- lib/rails/commands/karst/verify/verify_command.rb
Overview
Rails command entry point for the shared Access::Search adapter.
Instance Method Summary collapse
Instance Method Details
#perform(*arguments) ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lib/rails/commands/karst/verify/verify_command.rb', line 17 def perform(*arguments) method, path = parse(arguments) boot_karst_application! exit(::Karst::CLI::Verification.new(path: path, http_method: method, json: [:json]).call) rescue ArgumentError => e document = { schema_version: 1, error: { type: "input_error", message: e. } } puts([:json] ? JSON.generate(document) : "Karst cannot verify this route:\n#{e.}") exit(2) end |