Class: Railsonfire::Config
- Inherits:
-
BASECLI
- Object
- Thor
- BASECLI
- Railsonfire::Config
show all
- Defined in:
- lib/railsonfire/subcommands/config.rb
Instance Method Summary
collapse
Methods included from Helper
#error, #heroku, #is_git_managed?, #notify, #post_json, #select, #send_signal, #shell, #success, #warning, #write_config_file
Instance Method Details
#add ⇒ Object
16
17
18
19
20
21
22
|
# File 'lib/railsonfire/subcommands/config.rb', line 16
def add
invoke "auth:login"
send_signal :add_config
key = ask "Key:"
value = ask "Value:"
Railsonfire.user.set_config key, value
end
|
#remove ⇒ Object
25
26
27
28
29
|
# File 'lib/railsonfire/subcommands/config.rb', line 25
def remove
invoke "auth:login"
send_signal :remove_config
Railsonfire.user.remove_config(ask "Key:")
end
|
#show ⇒ Object
6
7
8
9
10
11
12
13
|
# File 'lib/railsonfire/subcommands/config.rb', line 6
def show
invoke "auth:login"
send_signal :show_config
say "No configuration values set" and return if Railsonfire.user.config.empty?
Railsonfire.user.config.each do |cfg|
say "#{cfg[0]}=#{cfg[1]}"
end
end
|