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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 611c4c47ea4d4c73a173b9f702a6d2abe514cd4c
4
- data.tar.gz: 73d529a04a49c40f7887a962650a2a67f1eeddf9
3
+ metadata.gz: 8d187846cb6f8af75fb15532ef2eb11b02fbd811
4
+ data.tar.gz: b278c6a6d9748ba52b869d49d497254cb89d7838
5
5
  SHA512:
6
- metadata.gz: 62e4d24d50773b83b562e86bf24c80007c98c431ed97d44a0ff7957cf20c653ec313b7718c1dd039de17667fec35640a9a05ca4936c36abc044374a9c7f3b129
7
- data.tar.gz: 4f4aa83feb0cdc9ef22daf341477dc0706c4b31bf7e45b6b10bae9a8727f582d4d92cfa2b5e117cf7031c9beb869acf541847c90ba32d1f1d49190f65b905b7b
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
- rescue => e
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
- @metadata[plugin_name.to_sym] = eval "Dcgen::#{plugin_name} @master, @destination"
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
@@ -1,3 +1,3 @@
1
1
  module Dcgen
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: salesforce-dcgen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Breinlinger