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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d5c2be25b5d3d098de066b63f1cc7bbf95aba2b0
4
- data.tar.gz: 7c082a164ef052713b2d5ca8ebaab9863f4d5566
3
+ metadata.gz: 611c4c47ea4d4c73a173b9f702a6d2abe514cd4c
4
+ data.tar.gz: 73d529a04a49c40f7887a962650a2a67f1eeddf9
5
5
  SHA512:
6
- metadata.gz: d8112b21ab77df6838113f0074851632c11ffa4900524668e6cd0c6f57033789c054551e9f50aa9e70e0e7cccd4f37eb561c14b46b9e4a9fd5f49a7f5ab0dc52
7
- data.tar.gz: 887107dfc33e6551edbe14a503f87a2c01e621a30e9b5c32b04f2e40df555bd6144f6e6a21bfd0df7dbc66375bf74faf8fd0e1b3d0c874a1873416eba947550d
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 |name|
14
- options[:master] = name;
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 |age|
18
- options[:destination] = age;
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
- File.open('destructiveChanges.xml','w') do |file|
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: destructiveChanges.xml successfully generated"
35
+ puts "info: #{out_file} successfully generated"
34
36
 
35
37
  end
36
38
 
data/lib/dcgen/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Dcgen
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
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.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Breinlinger