lib/salesforcedeploytool/app.rb in salesforce-deploy-tool-0.1.0 vs lib/salesforcedeploytool/app.rb in salesforce-deploy-tool-0.2.0

- old
+ new

@@ -5,11 +5,11 @@ def initialize config @git_repo = config[:git_repo] @git_dir = config[:git_dir] @env = config[:env] - @username = config[:username] + @username = @env == prod ? config[:username] : config[:username] + '.' + @env @password = config[:password] @debug = config[:debug] @server_url = @env == 'prod' ? 'https://login.salesforce.com' : 'https://test.salesforce.com' @@ -44,11 +44,11 @@ end def pull message = nil env_vars = "" - env_vars += " SF_USERNAME=" + @username + "." + @env + env_vars += " SF_USERNAME=" + @username env_vars += " SF_PASSWORD=" + @password env_vars += " SF_SERVERURL=" + @server_url cmd = " ant retrieveCode" full_cmd = env_vars + cmd @@ -78,10 +78,10 @@ def push # Set env variables to run ant env_vars = "" - env_vars += " SF_USERNAME=" + @username + "." + @env + env_vars += " SF_USERNAME=" + @username env_vars += " SF_PASSWORD=" + @password env_vars += " SF_SERVERURL=" + @server_url # myexec options exec_options = {