salesforce-deploy-tool 0.3.3 → 0.4.0
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/sf +43 -11
- 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: 63faff9b77776b25bdad8fec770342693feb9eaf
|
4
|
+
data.tar.gz: cdf40bc24e1adc8efff9ea782d3dfec724fd3f47
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 789f9bca2a5d5db418ec4f382933b6388e3689bd40431c5cfbb88e382f4447f962a5abf916524c8034f276b47b390687deed118f7f758132348786b6b3a79b55
|
7
|
+
data.tar.gz: 70ef085f6d3d06b2a476f31d4fecc045d24769db11a96b371aa6274d59a4b1b8906435e449ffa50e71bc0620fd5c361c428161bf6ce12903f590c2a9719e72d4
|
data/bin/sf
CHANGED
@@ -1,20 +1,14 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
require 'yaml'
|
3
3
|
|
4
|
-
CONFIG_FILE =
|
4
|
+
CONFIG_FILE = '~/.salesforce.yaml'
|
5
5
|
SANDBOX_CONFIG_FILE = '~/.salesforce.sbox'
|
6
6
|
|
7
7
|
config = nil
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
break
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
if config.nil?
|
17
|
-
puts "error: /etc/salesforce.yaml or ~/.salesforce.yaml not found"
|
8
|
+
if File.exists? File.expand_path CONFIG_FILE
|
9
|
+
config = YAML::load File.open(File.expand_path CONFIG_FILE).read
|
10
|
+
else
|
11
|
+
puts "error: ~/.salesforce.yaml not found"
|
18
12
|
exit 1
|
19
13
|
end
|
20
14
|
|
@@ -170,6 +164,44 @@ command :sandbox do |c|
|
|
170
164
|
end
|
171
165
|
end
|
172
166
|
|
167
|
+
command :config do |c|
|
168
|
+
c.syntax = 'sf config'
|
169
|
+
c.summary = 'Go through the configuration wizard to config your environment'
|
170
|
+
c.action do |args, options|
|
171
|
+
|
172
|
+
if args.size != 0
|
173
|
+
puts "error: Wrong number of arguments"
|
174
|
+
end
|
175
|
+
|
176
|
+
config_new = {}
|
177
|
+
|
178
|
+
config_new[:username] = ask "Please enter your SalesForce production login user name" do |q|
|
179
|
+
q.validate = /^[\.@a-zA-Z\s]+$/
|
180
|
+
end
|
181
|
+
|
182
|
+
config_new[:password] = ask "Please enter your Salesforce production password" do |q|
|
183
|
+
q.echo = "x"
|
184
|
+
end
|
185
|
+
|
186
|
+
git_name = ask "Please enter your Full name to be used as commit owner on GIT" do |q|
|
187
|
+
q.validate = /^[a-zA-Z\s]+$/
|
188
|
+
end
|
189
|
+
|
190
|
+
git_email = ask "Please enter your email to be used as commit email on GIT" do |q|
|
191
|
+
q.validate = /^[a-z\.@A-Z\s]+$/
|
192
|
+
end
|
193
|
+
|
194
|
+
%x[git config --global user.email "#{git_email}"]
|
195
|
+
%x[git config --global user.name "#{git_name}"]
|
196
|
+
|
197
|
+
config[:username] = config_new[:username].to_s
|
198
|
+
config[:password] = config_new[:password].to_s
|
199
|
+
|
200
|
+
File.open(File.expand_path(CONFIG_FILE),'w').write config.to_yaml
|
201
|
+
|
202
|
+
end
|
203
|
+
end
|
204
|
+
|
173
205
|
default_command :help
|
174
206
|
|
175
207
|
|
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.
|
4
|
+
version: 0.4.0
|
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
|
+
date: 2014-12-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|