Sha256: 5e99adbde22b80a69912a4fce1ec5887ee3e09c6bda2a0ab6f9d3734e76520a7
Contents?: true
Size: 902 Bytes
Versions: 12
Compression:
Stored size: 902 Bytes
Contents
#!/usr/bin/env ruby # raise "Please supply database path" unless ARGV[0] $LOAD_PATH.unshift "./lib" $LOAD_PATH.unshift "./spec" $LOAD_PATH.unshift "./tasks" ENV["RACK_ENV"] = "development" require "sequel" require "logger" #DATABASE_CREDENTIALS = {logger: Logger.new($stdout), adapter: "sqlite", database: ARGV[0], :encoding => 'utf8'}.tap { |it| puts it } DATABASE_CREDENTIALS = { adapter: "postgres", database: ENV["DATABASE"] || "postgres", username: ENV["DATABASE_USERNAME"] || "postgres", password: ENV["DATABASE_PASSWORD"] || "postgres", host: "localhost", :encoding => "utf8" } connection = Sequel.connect(DATABASE_CREDENTIALS) connection.timezone = :utc # Uncomment these lines to open a pry session for inspecting the database require "pact_broker/db" require "pact_broker" require "support/test_data_builder" puts "about to pry" require "pry"; pry(binding); puts "after pry"
Version data entries
12 entries across 12 versions & 1 rubygems