salesforce-deploy-tool 0.6.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/sf +28 -16
- 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: fad8de757cf36572a02786cc1cb215ee881c87d2
|
4
|
+
data.tar.gz: 17136965e98bddbe06fd4c28e2e189c0265e1ddd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 897cf3aba5186e2a8eb2bd3740f2295824bcb2e3390584f706933052044712dc9b6b11abf4f0eb16259944f44d258ef21a7335ed0912e3a4c23d89bc1b45afcd
|
7
|
+
data.tar.gz: 8aa320556bc9183abe9f6e354184a281f69fc3335bf82bce2625c6caff61671d4e64bac57d05933bef636566c6d637b84ac61ad5dd27bc53edfbc4ced8eb51e1
|
data/bin/sf
CHANGED
@@ -1,16 +1,28 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
require 'yaml'
|
3
|
+
require 'fileutils'
|
4
|
+
require 'pp'
|
5
|
+
|
6
|
+
CONFIG_DIR = '~/.sf'
|
7
|
+
CONFIG_FILE = '~/.sf/credentials.yaml'
|
8
|
+
GLOBAL_CONFIG_FILE = '~/.sf/salesforce.yaml'
|
9
|
+
SANDBOX_CONFIG_FILE = '~/.sf/salesforce.sbox'
|
10
|
+
|
11
|
+
FileUtils.mkdir File.expand_path CONFIG_DIR if not Dir.exists? File.expand_path CONFIG_DIR
|
12
|
+
|
13
|
+
config = {}
|
14
|
+
[CONFIG_FILE,GLOBAL_CONFIG_FILE].each do |file|
|
15
|
+
file = File.expand_path file
|
16
|
+
if File.exists? file
|
17
|
+
config_content = YAML::load(File.open(file).read)
|
18
|
+
config.merge! config_content if config_content
|
19
|
+
else
|
20
|
+
FileUtils.touch file
|
21
|
+
end
|
22
|
+
end
|
3
23
|
|
4
|
-
CONFIG_FILE = '~/.salesforce.yaml'
|
5
|
-
SANDBOX_CONFIG_FILE = '~/.salesforce.sbox'
|
6
24
|
|
7
|
-
config
|
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"
|
12
|
-
exit 1
|
13
|
-
end
|
25
|
+
pp config
|
14
26
|
|
15
27
|
begin
|
16
28
|
sandbox = File.open(File.expand_path(SANDBOX_CONFIG_FILE)).read
|
@@ -177,11 +189,11 @@ command :config do |c|
|
|
177
189
|
|
178
190
|
config_new[:username] = ask "Please enter your SalesForce production login user name" do |q|
|
179
191
|
q.validate = /^[\.@a-zA-Z\s]+$/
|
180
|
-
end
|
192
|
+
end.to_s
|
181
193
|
|
182
194
|
config_new[:password] = ask "Please enter your Salesforce production password" do |q|
|
183
195
|
q.echo = "x"
|
184
|
-
end
|
196
|
+
end.to_s
|
185
197
|
|
186
198
|
git_name = ask "Please enter your Full name to be used as commit owner on GIT" do |q|
|
187
199
|
q.validate = /^[a-zA-Z\s]+$/
|
@@ -191,13 +203,13 @@ command :config do |c|
|
|
191
203
|
q.validate = /^.+@.+$/
|
192
204
|
end
|
193
205
|
|
194
|
-
|
195
|
-
|
206
|
+
#%x[git config --global user.email "#{git_email}"]
|
207
|
+
#%x[git config --global user.name "#{git_name}"]
|
196
208
|
|
197
|
-
config[:username] = config_new[:username]
|
198
|
-
config[:password] = config_new[:password]
|
209
|
+
config[:username] = config_new[:username]
|
210
|
+
config[:password] = config_new[:password]
|
199
211
|
|
200
|
-
File.open(File.expand_path(CONFIG_FILE),'w').write
|
212
|
+
File.open(File.expand_path(CONFIG_FILE),'w').write config_new.to_yaml
|
201
213
|
|
202
214
|
end
|
203
215
|
end
|
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.7.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-12-
|
11
|
+
date: 2014-12-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|