Module: Inferno::Web

Defined in:
lib/inferno/apps/web/router.rb,
lib/inferno/apps/web/application.rb,
lib/inferno/apps/web/serializers/test.rb,
lib/inferno/apps/web/serializers/input.rb,
lib/inferno/apps/web/serializers/header.rb,
lib/inferno/apps/web/serializers/preset.rb,
lib/inferno/apps/web/serializers/result.rb,
lib/inferno/apps/web/serializers/message.rb,
lib/inferno/apps/web/serializers/request.rb,
lib/inferno/apps/web/serializers/test_run.rb,
lib/inferno/apps/web/controllers/controller.rb,
lib/inferno/apps/web/serializers/serializer.rb,
lib/inferno/apps/web/serializers/test_group.rb,
lib/inferno/apps/web/serializers/test_suite.rb,
lib/inferno/apps/web/serializers/session_data.rb,
lib/inferno/apps/web/serializers/suite_option.rb,
lib/inferno/apps/web/serializers/test_session.rb,
lib/inferno/apps/web/controllers/requests/show.rb,
lib/inferno/apps/web/controllers/test_runs/show.rb,
lib/inferno/apps/web/controllers/test_runs/create.rb,
lib/inferno/apps/web/controllers/test_suites/show.rb,
lib/inferno/apps/web/controllers/test_runs/destroy.rb,
lib/inferno/apps/web/controllers/test_suites/index.rb,
lib/inferno/apps/web/controllers/test_sessions/show.rb,
lib/inferno/apps/web/controllers/test_sessions/create.rb,
lib/inferno/apps/web/serializers/hash_value_extractor.rb,
lib/inferno/apps/web/controllers/test_runs/results/index.rb,
lib/inferno/apps/web/controllers/test_sessions/client_show.rb,
lib/inferno/apps/web/controllers/test_sessions/last_test_run.rb,
lib/inferno/apps/web/controllers/test_sessions/results/index.rb,
lib/inferno/apps/web/controllers/test_suites/check_configuration.rb,
lib/inferno/apps/web/controllers/test_sessions/session_data/index.rb,
lib/inferno/apps/web/controllers/test_session_form_post_controller.rb,
lib/inferno/apps/web/controllers/test_sessions/session_data/apply_preset.rb

Defined Under Namespace

Modules: Controllers, Serializers

Constant Summary collapse

Router =

rubocop:disable Naming/ConstantName

if base_path.present?
  Hanami::Router.new do
    scope("#{base_path}/") do
      get '/', to: ->(_env) { [200, { 'Content-Type' => 'text/html' }, [client_page]] }
    end
    scope(base_path, &route_block)
  end
else
  Hanami::Router.new(&route_block)
end

Class Method Summary collapse

Class Method Details

.appObject



6
7
8
9
10
11
# File 'lib/inferno/apps/web/application.rb', line 6

def self.app
  Rack::Builder.new do
    use Hanami::Middleware::BodyParser, :json
    run Inferno::Web::Router
  end
end