diff --git a/lib/abusetheforce.rb b/lib/abusetheforce.rb index 240a365..559d7ff 100644 --- a/lib/abusetheforce.rb +++ b/lib/abusetheforce.rb @@ -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 diff --git a/lib/abusetheforce/cli.rb b/lib/abusetheforce/cli.rb index e502d59..3289eb2 100644 --- a/lib/abusetheforce/cli.rb +++ b/lib/abusetheforce/cli.rb @@ -1,5 +1,6 @@ require 'thor' require 'highline/import' +require 'abusetheforce/version' module AbuseTheForce @@ -54,7 +55,7 @@ module AbuseTheForce --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 => "" @@ -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 diff --git a/lib/abusetheforce/version.rb b/lib/abusetheforce/version.rb index 9568790..f180972 100644 --- a/lib/abusetheforce/version.rb +++ b/lib/abusetheforce/version.rb @@ -1,3 +1,3 @@ module AbuseTheForce - VERSION = '0.0.1' + VERSION = '0.0.2' end