lib/salesforcedeploytool/app.rb in salesforce-deploy-tool-0.2.2 vs lib/salesforcedeploytool/app.rb in salesforce-deploy-tool-0.3.0
- old
+ new
@@ -4,17 +4,17 @@
def initialize config
@git_repo = config[:git_repo]
@git_dir = config[:git_dir]
- @env = config[:env]
- @username = @env == 'prod' ? config[:username] : config[:username] + '.' + @env
+ @sandbox = config[:sandbox]
+ @username = @sandbox == 'prod' ? config[:username] : config[:username] + '.' + @sandbox
@password = config[:password]
@debug = config[:debug]
@test = config[:test]
- @server_url = @env == 'prod' ? 'https://login.salesforce.com' : 'https://test.salesforce.com'
+ @server_url = @sandbox == 'prod' ? 'https://login.salesforce.com' : 'https://test.salesforce.com'
self.clone if ! Dir.exists? File.join(@git_dir,'.git')
end
@@ -98,10 +98,10 @@
exec_options[:okmsg] = nil
exec_options[:failmsg] = nil
end
# Deploy code
- exec_options[:message] = @test ? "INFO: Deploying and Testing code to #{@env}: " : "INFO: Deploying code to #{@env}: "
+ exec_options[:message] = @test ? "INFO: Deploying and Testing code to #{@sandbox}: " : "INFO: Deploying code to #{@sandbox}: "
exec_options[:message] += "\n\n" if @debug
cmd = @test ? " ant deployAndTestCode" : " ant deployCode"
full_cmd = env_vars + cmd