Sha256: 683bab8ccaf1171e8ef66848937a2d6ab0f736be1720efb74d63275fbee40ab7

Contents?: true

Size: 735 Bytes

Versions: 31

Compression:

Stored size: 735 Bytes

Contents

module Inferno
  module Web
    module Controllers
      module TestRuns
        class Show < Controller
          def call(params)
            test_run = repo.find(params[:id])
            halt 404 if test_run.nil?

            if params[:include_results] == 'true'
              results_repo = Inferno::Repositories::Results.new
              test_run.results =
                if params[:after].present?
                  results_repo.test_run_results_after(test_run_id: test_run.id, after: Time.parse(params[:after]))
                else
                  repo.results_for_test_run(test_run.id)
                end
            end

            self.body = serialize(test_run)
          end
        end
      end
    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
inferno_core-0.1.1 lib/inferno/apps/web/controllers/test_runs/show.rb
inferno_core-0.1.1.pre lib/inferno/apps/web/controllers/test_runs/show.rb
inferno_core-0.1.0 lib/inferno/apps/web/controllers/test_runs/show.rb
inferno_core-0.1.0.pre lib/inferno/apps/web/controllers/test_runs/show.rb
inferno_core-0.0.8 lib/inferno/apps/web/controllers/test_runs/show.rb
inferno_core-0.0.8.pre2 lib/inferno/apps/web/controllers/test_runs/show.rb
inferno_core-0.0.8.pre lib/inferno/apps/web/controllers/test_runs/show.rb
inferno_core-0.0.7 lib/inferno/apps/web/controllers/test_runs/show.rb
inferno_core-0.0.6 lib/inferno/apps/web/controllers/test_runs/show.rb
inferno_core-0.0.5 lib/inferno/apps/web/controllers/test_runs/show.rb
inferno_core-0.0.4 lib/inferno/apps/web/controllers/test_runs/show.rb