salesforce-dcgen 0.0.2 → 0.0.3
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/dcgen +9 -4
- data/lib/dcgen/app.rb +5 -3
- data/lib/dcgen/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 611c4c47ea4d4c73a173b9f702a6d2abe514cd4c
|
|
4
|
+
data.tar.gz: 73d529a04a49c40f7887a962650a2a67f1eeddf9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 62e4d24d50773b83b562e86bf24c80007c98c431ed97d44a0ff7957cf20c653ec313b7718c1dd039de17667fec35640a9a05ca4936c36abc044374a9c7f3b129
|
|
7
|
+
data.tar.gz: 4f4aa83feb0cdc9ef22daf341477dc0706c4b31bf7e45b6b10bae9a8727f582d4d92cfa2b5e117cf7031c9beb869acf541847c90ba32d1f1d49190f65b905b7b
|
data/bin/dcgen
CHANGED
|
@@ -10,12 +10,16 @@ parser = OptionParser.new do |opts|
|
|
|
10
10
|
|
|
11
11
|
opts.banner = 'Usage: dcgen [options]'
|
|
12
12
|
|
|
13
|
-
opts.on('-m', '--master dir', 'Source dir') do |
|
|
14
|
-
options[:master] =
|
|
13
|
+
opts.on('-m', '--master dir', 'Source dir') do |dir|
|
|
14
|
+
options[:master] = dir;
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
-
opts.on('-d', '--destination dir', 'Destination dir') do |
|
|
18
|
-
options[:destination] =
|
|
17
|
+
opts.on('-d', '--destination dir', 'Destination dir') do |dir|
|
|
18
|
+
options[:destination] = dir;
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
opts.on('-o', '--output FILE', 'Output file to write instead of destructiveChange.xml') do |file|
|
|
22
|
+
options[:output] = file;
|
|
19
23
|
end
|
|
20
24
|
|
|
21
25
|
opts.on('-h', '--help', 'Displays Help') do
|
|
@@ -53,6 +57,7 @@ begin
|
|
|
53
57
|
|
|
54
58
|
dcgen.master = options[:master]
|
|
55
59
|
dcgen.destination = options[:destination]
|
|
60
|
+
dcgen.output = options[:output] if not options[:output].nil?
|
|
56
61
|
|
|
57
62
|
dcgen.generate_destructive_changes
|
|
58
63
|
rescue => e
|
data/lib/dcgen/app.rb
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
module Dcgen
|
|
2
2
|
class App
|
|
3
3
|
|
|
4
|
-
attr_accessor :master, :destination
|
|
4
|
+
attr_accessor :master, :destination, :output
|
|
5
5
|
|
|
6
6
|
def initialize
|
|
7
7
|
|
|
@@ -26,11 +26,13 @@ module Dcgen
|
|
|
26
26
|
dc_erb_tpl = File.open(File.join(File.dirname(__FILE__),'..','..','tpl','destructiveChanges.xml.erb')).read
|
|
27
27
|
renderer = ERB.new(dc_erb_tpl,0,'>')
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
out_file = @output || 'destructiveChanges.xml'
|
|
30
|
+
|
|
31
|
+
File.open(out_file,'w') do |file|
|
|
30
32
|
file.write renderer.result(binding)
|
|
31
33
|
end
|
|
32
34
|
|
|
33
|
-
puts "info:
|
|
35
|
+
puts "info: #{out_file} successfully generated"
|
|
34
36
|
|
|
35
37
|
end
|
|
36
38
|
|
data/lib/dcgen/version.rb
CHANGED