Class: Testjour::CLI::MysqlDrop
- Inherits:
-
BaseCommand
- Object
- BaseCommand
- Testjour::CLI::MysqlDrop
- Defined in:
- lib/testjour/commands/mysql_drop.rb
Instance Attribute Summary
Attributes inherited from BaseCommand
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(*args) ⇒ MysqlDrop
constructor
A new instance of MysqlDrop.
- #run ⇒ Object
Methods inherited from BaseCommand
detailed_help, help, inherited, #option_parser, options, #testjour_bin_path
Constructor Details
#initialize(*args) ⇒ MysqlDrop
Returns a new instance of MysqlDrop.
13 14 15 16 17 18 19 |
# File 'lib/testjour/commands/mysql_drop.rb', line 13 def initialize(*args) super Testjour.logger.debug "Runner command #{self.class}..." ENV["RAILS_ENV"] ||= "test" require File.("./config/environment") end |
Class Method Details
.command ⇒ Object
9 10 11 |
# File 'lib/testjour/commands/mysql_drop.rb', line 9 def self.command "mysql:drop" end |
Instance Method Details
#run ⇒ Object
21 22 23 24 25 26 |
# File 'lib/testjour/commands/mysql_drop.rb', line 21 def run database_name = .shift mysql = MysqlDatabaseSetup.new(database_name) mysql.connect mysql.drop_database end |