Sha256: 813584b7fe9c348f945dbceaa9a62fa8b83ef234826feaf7efa683e90f73e6b9

Contents?: true

Size: 987 Bytes

Versions: 2

Compression:

Stored size: 987 Bytes

Contents

#!/usr/bin/env ruby
if ENV['VOOM_ENV'] == 'integration_testing'
  require 'simplecov'
  if ENV['CIRCLE_ARTIFACTS']
    dir = File.join(ENV['CIRCLE_ARTIFACTS'], "coverage")
    SimpleCov.coverage_dir(dir)
  end
  SimpleCov.start
end

ENV['VOOM_ROOT'] = File.expand_path(__dir__)
ENV['GOOGLE_API_KEY'] = 'AIzaSyDhSgj9XSBLY5E9Rx5pP2ILQ7IXnD4uX2Q'
require 'coprl'

require 'rack/cors'
use Rack::Cors do
  allow do
    origins '*'
    resource '*', headers: :any, methods: [:get, :post, :options]
  end
end

Coprl::Presenters::Settings.configure do |config|
  config.presenters.root = File.join(ENV['VOOM_ROOT'], 'app')
  config.presenters.web_client.prepare_context << ->(context, session, _env) {
    context.merge(session: session)
  }
end

use Coprl::Presenters::Demo::Search
use Coprl::Presenters::Demo::Echo
use Coprl::Presenters::Demo::Slow
use Coprl::Presenters::Demo::DragonDrop

use Coprl::Presenters::WebClient::App
run Coprl::Presenters::Api::App


Coprl::Presenters::App.boot!


Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
coprl-3.0.0.beta.2 config.ru
coprl-3.0.0.beta.1 config.ru