Sha256: a9a4124ae07d27e36d7c80da9c336d37da4ddcde4da7c2a74df87048213e63df

Contents?: true

Size: 743 Bytes

Versions: 4

Compression:

Stored size: 743 Bytes

Contents

require "integration/band_representer"
require 'sinatra/runner'

class ServerRunner < Sinatra::Runner
  def app_file
    File.expand_path("../server.rb", __FILE__)
  end

  def command
    "bundle exec ruby #{app_file} -p #{port} -e production"
  end

  def ping_path # to be overwritten
    '/ping'
  end
end

class SslServerRunner < ServerRunner
  def command
    "bundle exec ruby #{File.expand_path("../ssl_server.rb", __FILE__)}"
  end

  def port
    8443
  end

  def protocol
    "https"
  end
end

begin
  runner = ServerRunner.new
  runner.run

  ssl_runner = SslServerRunner.new
  ssl_runner.run

  Minitest.after_run do
    runner.kill
    ssl_runner.kill
  end
rescue Exception => e
  runner.kill
  ssl_runner.kill

  raise e
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/roar-1.2.0/test/integration/runner.rb
roar-1.2.0 test/integration/runner.rb
roar-1.1.1 test/integration/runner.rb
roar-1.1.0 test/integration/runner.rb