salesforce-dcgen 0.0.3 → 0.0.4
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 +10 -4
- data/lib/dcgen/app.rb +4 -2
- 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: 8d187846cb6f8af75fb15532ef2eb11b02fbd811
|
4
|
+
data.tar.gz: b278c6a6d9748ba52b869d49d497254cb89d7838
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c7a5e6f2101a4dd06f12fcd64fbf78105ec871f3ab66816c11d3f743c130c354babfca70b1fb36b21446342b27922e32fa9071c91a0b5008dc4a6ed268c38ad
|
7
|
+
data.tar.gz: 9976c94447cf2b238a77be46f28c179b8930a2d1e6845e5a4722af70596abd0ffa870e3227e875b52d321ce71e276f9df49848403764701e1a3ede247a240cb1
|
data/bin/dcgen
CHANGED
@@ -11,15 +11,19 @@ parser = OptionParser.new do |opts|
|
|
11
11
|
opts.banner = 'Usage: dcgen [options]'
|
12
12
|
|
13
13
|
opts.on('-m', '--master dir', 'Source dir') do |dir|
|
14
|
-
options[:master] = dir
|
14
|
+
options[:master] = dir
|
15
15
|
end
|
16
16
|
|
17
17
|
opts.on('-d', '--destination dir', 'Destination dir') do |dir|
|
18
|
-
options[:destination] = dir
|
18
|
+
options[:destination] = dir
|
19
19
|
end
|
20
20
|
|
21
21
|
opts.on('-o', '--output FILE', 'Output file to write instead of destructiveChange.xml') do |file|
|
22
|
-
options[:output] = file
|
22
|
+
options[:output] = file
|
23
|
+
end
|
24
|
+
|
25
|
+
opts.on('-x', '--exclude CSV_METADATA_LIST', 'a CSV list of metadata to exclude') do |exclude|
|
26
|
+
options[:exclude] = exclude.split(',')
|
23
27
|
end
|
24
28
|
|
25
29
|
opts.on('-h', '--help', 'Displays Help') do
|
@@ -58,9 +62,11 @@ begin
|
|
58
62
|
dcgen.master = options[:master]
|
59
63
|
dcgen.destination = options[:destination]
|
60
64
|
dcgen.output = options[:output] if not options[:output].nil?
|
65
|
+
dcgen.exclude = options[:exclude] if not options[:exclude].nil?
|
61
66
|
|
62
67
|
dcgen.generate_destructive_changes
|
63
|
-
|
68
|
+
|
69
|
+
rescue ArgumentError => e
|
64
70
|
puts "error: #{e}"
|
65
71
|
exit 1
|
66
72
|
end
|
data/lib/dcgen/app.rb
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
module Dcgen
|
2
2
|
class App
|
3
3
|
|
4
|
-
attr_accessor :master, :destination, :output
|
4
|
+
attr_accessor :master, :destination, :output, :exclude
|
5
5
|
|
6
6
|
def initialize
|
7
7
|
|
8
8
|
@metadata = {}
|
9
|
+
@exclude = []
|
9
10
|
|
10
11
|
end
|
11
12
|
|
@@ -48,7 +49,8 @@ module Dcgen
|
|
48
49
|
require_relative plugin
|
49
50
|
|
50
51
|
plugin_name = plugin.match(/^.*\/(.*).rb$/)[1]
|
51
|
-
|
52
|
+
plugin_metadata = eval "Dcgen::#{plugin_name} @master, @destination"
|
53
|
+
@metadata[plugin_name.to_sym] = plugin_metadata - @exclude unless plugin_metadata.nil?
|
52
54
|
|
53
55
|
end
|
54
56
|
|
data/lib/dcgen/version.rb
CHANGED