Sha256: 689f8ae462d8c5bf18ef02d1905e2f6c764101f8e2d1797d979bc0f75e41a045
Contents?: true
Size: 1.1 KB
Versions: 26
Compression:
Stored size: 1.1 KB
Contents
module Inferno module Web module Controllers module TestSessions class ClientShow < Controller config.default_response_format = :html CLIENT_PAGE = ERB.new( File.read( File.join( Inferno::Application.root, 'lib', 'inferno', 'apps', 'web', 'index.html.erb' ) ) ).result.freeze def handle(req, res) test_session_id = req.params[:id] test_suite_id = req.params[:test_suite_id] test_session = repo.find(test_session_id) halt 404 if test_session.nil? if test_suite_id.blank? || test_suite_id != test_session.test_suite_id test_suite_id = test_session.test_suite_id res.redirect_to "#{Inferno::Application['base_url']}/#{test_suite_id}/#{test_session_id}" end test_suite = Inferno::Repositories::TestSuites.new.find(test_suite_id) halt 404 if test_suite.nil? res.body = CLIENT_PAGE end end end end end end
Version data entries
26 entries across 26 versions & 1 rubygems