Class: Taps::Config
- Inherits:
-
Object
- Object
- Taps::Config
- Defined in:
- lib/taps/config.rb
Class Attribute Summary collapse
-
.chunksize ⇒ Object
Returns the value of attribute chunksize.
-
.database_url ⇒ Object
Returns the value of attribute database_url.
-
.login ⇒ Object
Returns the value of attribute login.
-
.password ⇒ Object
Returns the value of attribute password.
-
.remote_url ⇒ Object
Returns the value of attribute remote_url.
-
.taps_database_url ⇒ Object
Returns the value of attribute taps_database_url.
Class Method Summary collapse
Class Attribute Details
.chunksize ⇒ Object
Returns the value of attribute chunksize.
19 20 21 |
# File 'lib/taps/config.rb', line 19 def chunksize @chunksize end |
.database_url ⇒ Object
Returns the value of attribute database_url.
18 19 20 |
# File 'lib/taps/config.rb', line 18 def database_url @database_url end |
.login ⇒ Object
Returns the value of attribute login.
18 19 20 |
# File 'lib/taps/config.rb', line 18 def login @login end |
.password ⇒ Object
Returns the value of attribute password.
18 19 20 |
# File 'lib/taps/config.rb', line 18 def password @password end |
.remote_url ⇒ Object
Returns the value of attribute remote_url.
18 19 20 |
# File 'lib/taps/config.rb', line 18 def remote_url @remote_url end |
.taps_database_url ⇒ Object
Returns the value of attribute taps_database_url.
17 18 19 |
# File 'lib/taps/config.rb', line 17 def taps_database_url @taps_database_url end |
Class Method Details
.verify_database_url(db_url = nil) ⇒ Object
21 22 23 24 25 26 27 28 29 |
# File 'lib/taps/config.rb', line 21 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 |