Class: ExtJS::XTheme::Command::Config

Inherits:
Base
  • Object
show all
Defined in:
lib/extjs-xtheme/commands/conifg.rb

Instance Attribute Summary

Attributes inherited from Base

#args, #config

Instance Method Summary collapse

Methods inherited from Base

#ask, #display, #error, #escape, #extract_app, #extract_app_in_dir, #extract_option, #heroku, #initialize, #shell

Constructor Details

This class inherits a constructor from ExtJS::XTheme::Command::Base

Instance Method Details

#addObject



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/extjs-xtheme/commands/conifg.rb', line 10

def add
	unless args.size > 0 and args.all? { |a| a.include?('=') }
		raise CommandFailed, "Usage: xtheme config:add <key>=<value> [<key2>=<value2> ...]"
	end

	#vars = args.inject({}) do |vars, arg|
	#	key, value = arg.split('=', 2)
	#	vars[key] = value
	#	vars
	#end

	display "Adding config vars:"
	#display_vars(vars, :indent => 2)

	#display "Restarting app...", false
	#heroku.add_config_vars(app, vars)
	#display "done."
end

#clearObject



36
37
38
39
40
# File 'lib/extjs-xtheme/commands/conifg.rb', line 36

def clear
	display "Clearing all config vars and restarting app...", false
	#heroku.clear_config_vars(app)
	display "done."
end

#indexObject



3
4
5
6
7
8
# File 'lib/extjs-xtheme/commands/conifg.rb', line 3

def index
	#long = args.delete('--long')
	#vars = heroku.config_vars(app)
	#display_vars(vars, :long => long)
	display "index"
end

#removeObject Also known as: rm



29
30
31
32
33
# File 'lib/extjs-xtheme/commands/conifg.rb', line 29

def remove
	display "Removing #{args.first} and restarting app...", false
	#heroku.remove_config_var(app, args.first)
	display "done."
end