Sha256: 6094e89d8265d0bdf09a94b69535a8b175e721a54658845d7f16a8b2e6ede0d2

Contents?: true

Size: 1.12 KB

Versions: 27

Compression:

Stored size: 1.12 KB

Contents

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

# 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 "GRANT ALL PRIVILEGES ON DATABASE pact_broker TO pact_broker;"
#
# DATABASE_CREDENTIALS = {adapter: "postgres", database: "pact_broker", username: 'pact_broker', password: 'pact_broker', :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.use_hal_browser = true
  config.database_connection = Sequel.connect(DATABASE_CREDENTIALS.merge(:logger => config.logger))
end

run app

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
pact_broker-2.12.0 example/config.ru
pact_broker-2.11.0 example/config.ru
pact_broker-2.10.0 example/config.ru
pact_broker-2.9.0 example/config.ru
pact_broker-2.9.0.beta.5 example/config.ru
pact_broker-2.8.0.beta.5 example/config.ru
pact_broker-2.8.0.beta.4 example/config.ru
pact_broker-2.7.0.beta.3 example/config.ru
pact_broker-2.7.0.beta.2 example/config.ru
pact_broker-2.7.0.beta.1 example/config.ru
pact_broker-2.6.0 example/config.ru
pact_broker-2.5.1 example/config.ru
pact_broker-2.5.0 example/config.ru
pact_broker-2.4.2 example/config.ru
pact_broker-2.4.1 example/config.ru
pact_broker-2.4.0 example/config.ru
pact_broker-2.3.0 example/config.ru
pact_broker-2.2.0 example/config.ru
pact_broker-2.1.1 example/config.ru
pact_broker-2.1.0 example/config.ru