Class: Taps::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/taps/config.rb

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.chunksizeObject

Returns the value of attribute chunksize.



34
35
36
# File 'lib/taps/config.rb', line 34

def chunksize
  @chunksize
end

.database_urlObject

Returns the value of attribute database_url.



33
34
35
# File 'lib/taps/config.rb', line 33

def database_url
  @database_url
end

.loginObject

Returns the value of attribute login.



33
34
35
# File 'lib/taps/config.rb', line 33

def 
  @login
end

.passwordObject

Returns the value of attribute password.



33
34
35
# File 'lib/taps/config.rb', line 33

def password
  @password
end

.remote_urlObject

Returns the value of attribute remote_url.



33
34
35
# File 'lib/taps/config.rb', line 33

def remote_url
  @remote_url
end

.taps_database_urlObject

Returns the value of attribute taps_database_url.



32
33
34
# File 'lib/taps/config.rb', line 32

def taps_database_url
  @taps_database_url
end

Class Method Details

.verify_database_url(db_url = nil) ⇒ Object



36
37
38
39
40
41
42
43
44
# File 'lib/taps/config.rb', line 36

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