Added version command as well as small cleanup

Cleaned up some of the output
This commit is contained in:
ViViDboarder 2013-04-18 17:56:22 -07:00
parent ec3578e2a2
commit 952e1dc201
3 changed files with 17 additions and 8 deletions

View File

@ -23,6 +23,8 @@ module AbuseTheForce
def self.build_client
target = Atf_Config.active_target
puts target.username
@client = Metaforce.new :username => target.username,
:password => target.get_password,
:security_token => target.security_token
@ -140,6 +142,8 @@ module AbuseTheForce
#write out the config
dump_settings
puts "Target Added"
target.print
end
# Selects one target as the active target for deployment
@ -158,9 +162,6 @@ module AbuseTheForce
target.active = true
# Make it default
@active_target = target
else
# Error since there are two defaults
AbuseTheForce.putw "Two defaults set. Using #{@active_target.print}"
end
else # name != name
# make not active
@ -171,9 +172,13 @@ module AbuseTheForce
if @active_target != nil
# Save to yaml
dump_settings
# Notify the user
puts "Active target changed"
@active_target.print
else
AbuseTheForce.pute "Target with alias #{name} was not found."
end
end
# Sets project path from default ./src
@ -186,7 +191,6 @@ module AbuseTheForce
end
end
end
end

View File

@ -1,5 +1,6 @@
require 'thor'
require 'highline/import'
require 'abusetheforce/version'
module AbuseTheForce
@ -54,7 +55,7 @@ module AbuseTheForce
--token=<security token> option, sets the security token to the value provided
The changes will then be written to the atf.yaml file
The changes will then be written to the .abusetheforce.yaml file
LONG_DESC
option :password, :type => :boolean, :aliases => :p, :default => false, :desc => "Prompt for password"
option :token, :banner => "<security token>"
@ -219,8 +220,6 @@ module AbuseTheForce
# Get the base name of the metadata
full_name = File.basename(full_name, extname)
puts full_name
puts extname
# Detect metadata type by file extension
case extname
when '.cls'
@ -280,6 +279,12 @@ module AbuseTheForce
desc "retrieve SUBCOMMAND ...ARGS", "Retrieve code from Salesforce.com"
subcommand "retrieve", RetrieveCLI
desc "version", "Version information"
def version
puts "version #{AbuseTheForce::VERSION}"
end
end
# Start the command line

View File

@ -1,3 +1,3 @@
module AbuseTheForce
VERSION = '0.0.1'
VERSION = '0.0.2'
end