Class: DBRocket::Command::App
- Inherits:
-
Base
- Object
- Base
- DBRocket::Command::App
show all
- Defined in:
- lib/db_rockets/cli/commands/app.rb
Instance Attribute Summary
Attributes inherited from Base
#args
Instance Method Summary
collapse
Methods inherited from Base
#ask, #ask_for_config_file, #conf_to_uri_hash, #config_file, #confirm, #display, #error, #extract_option, #home_directory, #initialize, #load_taps, #make_config_file, #make_url_from_config, #parse_database_yml, #parse_taps_opts, #running_on_windows?, #shell, #taps_client, #uri_hash_to_url, #userinfo_from_uri
Instance Method Details
#create ⇒ Object
6
7
8
9
10
11
|
# File 'lib/db_rockets/cli/commands/app.rb', line 6
def create
name = args.shift.downcase.strip rescue nil
if make_config_file == "y"
display "You can configurate db_rocket on config/db_rocket.yml"
end
end
|
#pull ⇒ Object
24
25
26
27
28
29
30
31
32
33
|
# File 'lib/db_rockets/cli/commands/app.rb', line 24
def pull
load_taps
opts = parse_taps_opts
display("Warning: Data in the database '#{opts[:database_url]}' will be overwritten and will not be recoverable.")
if ("--force") || confirm
taps_client(:pull, opts)
end
end
|
#push ⇒ Object
13
14
15
16
17
18
19
20
21
22
|
# File 'lib/db_rockets/cli/commands/app.rb', line 13
def push
load_taps
opts = parse_taps_opts
display("Warning: Data in the app will be overwritten and will not be recoverable.")
if ("--force") || confirm
taps_client(:push, opts)
end
end
|