Sha256: cec04a585af4bd6913386e820083222ab55705479a346ba3eb2ae4973473040f

Contents?: true

Size: 1.2 KB

Versions: 11

Compression:

Stored size: 1.2 KB

Contents

require 'fileutils'
require 'logger'
require 'sequel'
# require 'pg' # for postgres
require 'pact_broker'

ENV['RACK_ENV'] ||= 'production'

# Create a real database, and set the credentials for it here
# It is highly recommended to set the encoding to utf8
DATABASE_CREDENTIALS = {adapter: "sqlite", database: "pact_broker_database.sqlite3", :encoding => 'utf8'}

# For postgres:
#
# $ psql postgres -c "CREATE DATABASE pact_broker;"
# $ psql postgres -c "CREATE ROLE pact_broker WITH LOGIN PASSWORD 'CHANGE_ME';"
# $ psql postgres -c "GRANT ALL PRIVILEGES ON DATABASE pact_broker TO pact_broker;"
#
# DATABASE_CREDENTIALS = {adapter: "postgres", database: "pact_broker", username: 'pact_broker', password: 'CHANGE_ME', :encoding => 'utf8'}

# Have a look at the Sequel documentation to make decisions about things like connection pooling
# and connection validation.

ENV['TZ'] = 'Australia/Melbourne' # Set the timezone you want your dates to appear in

app = PactBroker::App.new do | config |
  # change these from their default values if desired
  # config.log_dir = "./log"
  # config.auto_migrate_db = true
  config.database_connection = Sequel.connect(DATABASE_CREDENTIALS.merge(:logger => config.logger))
end

run app

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
pact_broker-2.27.2 example/config.ru
pact_broker-2.27.0 example/config.ru
pact_broker-2.26.1 example/config.ru
pact_broker-2.26.0 example/config.ru
pact_broker-2.25.0 example/config.ru
pact_broker-2.24.0 example/config.ru
pact_broker-2.23.4 example/config.ru
pact_broker-2.23.3 example/config.ru
pact_broker-2.23.2 example/config.ru
pact_broker-2.23.1 example/config.ru
pact_broker-2.23.0 example/config.ru