Sha256: ba38ea4f333ea9fb98ae0c39644ad2b7ea128c1d3ebfbcde50aed1372df65244

Contents?: true

Size: 514 Bytes

Versions: 13

Compression:

Stored size: 514 Bytes

Contents

configs = YAML.load_file(File.join(File.dirname(__FILE__), 'databases.yml'))
ActiveRecord::Base.configurations = configs

db_name = ENV['DB'] || 'sqlite'
ActiveRecord::Base.establish_connection(db_name)
ActiveRecord::Base.default_timezone = :utc

load_schema = lambda {
  # load File.join(File.dirname(__FILE__), "../dummy/db/schema.rb") # use db agnostic schema by default
  ActiveRecord::Migrator.up(File.join(File.dirname(__FILE__), '../../db/migrate')) # use migrations
}
silence_stream(STDOUT, &load_schema)

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
socialite-0.2.0 spec/support/database_loader.rb
socialite-0.1.2 spec/support/database_loader.rb
socialite-0.1.1 spec/support/database_loader.rb
socialite-0.1.0.pre.7 spec/support/database_loader.rb
socialite-0.1.0.pre.6 spec/support/database_loader.rb
socialite-0.1.0.pre.5 spec/support/database_loader.rb
socialite-0.1.0.pre.4 spec/support/database_loader.rb
socialite-0.1.0.pre.3 spec/support/database_loader.rb
socialite-0.1.0.pre.2 spec/support/database_loader.rb
socialite-0.1.0.pre spec/support/database_loader.rb
socialite-0.0.1.beta4 spec/support/database_loader.rb
socialite-0.0.1.beta2 spec/support/database_loader.rb
socialite-0.0.1.beta spec/support/database_loader.rb