Sha256: 55a877304e7ff0d84f7a111bd0f2b5341c9be42b2647d2475a791ecd1b17a2bf
Contents?: true
Size: 796 Bytes
Versions: 1
Compression:
Stored size: 796 Bytes
Contents
require 'sequel' require 'taps/version' Sequel.datetime_class = DateTime Sequel.extension :core_extensions Sequel.extension :schema_dumper YAML::ENGINE.yamler = ENV['TAPS_YAML_ENGINE'] if ENV['TAPS_YAML_ENGINE'] module Taps def self.exiting=(val) @@exiting = val end def exiting? (@@exiting ||= false) == true end class Config class << self attr_accessor :taps_database_url attr_accessor :login, :password, :database_url, :remote_url attr_accessor :chunksize def verify_database_url(db_url=nil) db_url ||= self.database_url db = Sequel.connect(db_url) db.tables db.disconnect rescue Object => e puts "Failed to connect to database:\n #{e.class} -> #{e}" exit 1 end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
taps2-0.5.5 | lib/taps/config.rb |