Clean up target print method output

Closes #3
This commit is contained in:
ViViDboarder 2013-05-01 13:23:04 -07:00
parent df81c1dde8
commit 7ce992db3a
2 changed files with 4 additions and 2 deletions

View File

@ -296,7 +296,8 @@ module AbuseTheForce
end end
def print def print
puts "#{@name}\t#{@username}\t#{@host}\t#{(@active && 'Active') || ''}" #puts "#{@name}\t#{@username}\t#{@host}\t#{(@active && 'Active') || ''}"
puts "#{(@active ? '*' : ' ')} #{@name}\t\t#{@username}\t#{(@host.starts_with?('test') ? 'sandbox' : '')}\t"
end end
end end

View File

@ -112,7 +112,7 @@ module AbuseTheForce
desc "list", "Lists all targets" desc "list", "Lists all targets"
def list() def list()
puts "Name\tUsername\tHost" puts "Name\t\tUsername"
Atf_Config.targets.values.each do |target| Atf_Config.targets.values.each do |target|
target.print target.print
@ -165,6 +165,7 @@ module AbuseTheForce
zip_path = File.join(Atf_Config.get_project_path, 'staticresources', resource_name + '.resource') zip_path = File.join(Atf_Config.get_project_path, 'staticresources', resource_name + '.resource')
# TODO: Find a better place to stare XML templates
static_resource_xml = <<-eos static_resource_xml = <<-eos
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<StaticResource xmlns="http://soap.sforce.com/2006/04/metadata"> <StaticResource xmlns="http://soap.sforce.com/2006/04/metadata">