salesforce-deploy-tool 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/sfd +35 -4
- data/lib/salesforcedeploytool/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9c8516c5f2cd2eca3a085af746d8cfcc39d5b4cb
|
|
4
|
+
data.tar.gz: 0a5a30f5d91e770bf04152faa97fd62b77789ad0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cf258ecc8a93e0f74d1c2d6f001865b96093ab18afba4917721b97bc57b8b00b999f8ef56f6a997d74052deff974acd52c3005b098342e5b9f05c113875be4a0
|
|
7
|
+
data.tar.gz: c4cf79930204d112d269cf0ca841d0815beb11ae83178e5970db38fc2fb477a9b94e2267544fa1afbac42131fff5db889f25cfffb9d50a451627a29dd98693fb
|
data/bin/sfd
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
require 'yaml'
|
|
3
3
|
|
|
4
4
|
CONFIG_FILE = ['/etc/salesforce.yaml','~/.salesforce.yaml']
|
|
5
|
+
SANDBOX_CONFIG_FILE = '~/.salesforce.sbox'
|
|
5
6
|
|
|
6
7
|
config = nil
|
|
7
8
|
CONFIG_FILE.each do |cf|
|
|
@@ -17,6 +18,12 @@ if config.nil?
|
|
|
17
18
|
exit 1
|
|
18
19
|
end
|
|
19
20
|
|
|
21
|
+
begin
|
|
22
|
+
sandbox = File.open(File.expand_path(SANDBOX_CONFIG_FILE)).read
|
|
23
|
+
rescue
|
|
24
|
+
sandbox = nil
|
|
25
|
+
end
|
|
26
|
+
|
|
20
27
|
require 'salesforcedeploytool'
|
|
21
28
|
|
|
22
29
|
program :version, SalesforceDeployTool::VERSION
|
|
@@ -50,11 +57,11 @@ command :pull do |c|
|
|
|
50
57
|
c.action do |args, options|
|
|
51
58
|
|
|
52
59
|
# Parameter validation:
|
|
53
|
-
if options.env.nil?
|
|
60
|
+
if options.env.nil? or sandbox.nil?
|
|
54
61
|
puts "error: please specify the environment to pull from using --env"
|
|
55
62
|
exit 1
|
|
56
63
|
end
|
|
57
|
-
config[:env] = options.env
|
|
64
|
+
config[:env] = options.env || sandbox
|
|
58
65
|
config[:debug] = options.debug.nil? ? false : true
|
|
59
66
|
|
|
60
67
|
# Initialize
|
|
@@ -84,11 +91,11 @@ command :push do |c|
|
|
|
84
91
|
c.action do |args, options|
|
|
85
92
|
|
|
86
93
|
# Parameter validation:
|
|
87
|
-
if options.env.nil?
|
|
94
|
+
if options.env.nil? or sandbox.nil?
|
|
88
95
|
puts "error: please specify the environment to pull from using --env"
|
|
89
96
|
exit 1
|
|
90
97
|
end
|
|
91
|
-
config[:env] = options.env
|
|
98
|
+
config[:env] = options.env || sandbox
|
|
92
99
|
config[:debug] = options.debug.nil? ? false : true
|
|
93
100
|
config[:test] = options.test.nil? ? false : true
|
|
94
101
|
|
|
@@ -127,6 +134,30 @@ command :push do |c|
|
|
|
127
134
|
end
|
|
128
135
|
end
|
|
129
136
|
|
|
137
|
+
command :sandbox do |c|
|
|
138
|
+
c.syntax = 'sf sandbox SANDBOX_NAME'
|
|
139
|
+
c.summary = 'Set sandbox to work on, this will override --env '
|
|
140
|
+
c.description = 'Set the sandbox to work with pull and push. If no parameter defined, it will print the current sandbox selected.'
|
|
141
|
+
c.action do |args, options|
|
|
142
|
+
|
|
143
|
+
if args.size > 1
|
|
144
|
+
puts "error: Wrong number of arguments"
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
if args.size == 0
|
|
148
|
+
if ! sandbox.nil?
|
|
149
|
+
puts "sandbox: " + sandbox
|
|
150
|
+
exit 0
|
|
151
|
+
else
|
|
152
|
+
puts "WARN: Sandbox has not been set yet"
|
|
153
|
+
exit 1
|
|
154
|
+
end
|
|
155
|
+
end
|
|
156
|
+
File.open(File.expand_path(SANDBOX_CONFIG_FILE),'w').write args.first
|
|
157
|
+
|
|
158
|
+
end
|
|
159
|
+
end
|
|
160
|
+
|
|
130
161
|
default_command :help
|
|
131
162
|
|
|
132
163
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: salesforce-deploy-tool
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Juan Breinlinger
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-11-
|
|
11
|
+
date: 2014-11-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|