salesforce-dcgen 0.7.0 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/dcgen +5 -1
- data/lib/dcgen/app.rb +11 -4
- data/lib/dcgen/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: a8e9c1a880499f45d94f9373bb6064c23c4bdb3d
|
4
|
+
data.tar.gz: c969eb11a2e19239d941b5b7d4100197c6f81531
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f20ac238234b35e6c7c749dcff76f8410f162ca206a8b66bc1305348e2d092b47fcf0a13acc186bbfd27e491e98c92e9271aae5a57bcc98fdbc57438482e19db
|
7
|
+
data.tar.gz: a2a2e25fe95d54f0ee149e915fb6a16bd14262b7f8a54bff9cbd863620383c107a41f254ff756ae4a60043f3ee1c9dc5e50fee1a5a9244bf6aa6e8820ff3d987
|
data/bin/dcgen
CHANGED
@@ -30,6 +30,10 @@ parser = OptionParser.new do |opts|
|
|
30
30
|
options[:exclude] = exclude.split(',')
|
31
31
|
end
|
32
32
|
|
33
|
+
opts.on('-i', '--include CSV_METADATA_LIST', 'a CSV list of metadata to destroy only') do |include|
|
34
|
+
options[:include] = include.split(',')
|
35
|
+
end
|
36
|
+
|
33
37
|
opts.on('-v', '--version', 'Show current version') do
|
34
38
|
puts Dcgen::VERSION
|
35
39
|
exit 0
|
@@ -54,7 +58,6 @@ rescue => e
|
|
54
58
|
exit 1
|
55
59
|
end
|
56
60
|
|
57
|
-
|
58
61
|
if options[:master].nil?
|
59
62
|
puts "error: you must specify master dir"
|
60
63
|
exit 1
|
@@ -73,6 +76,7 @@ begin
|
|
73
76
|
dcgen.destination = options[:destination]
|
74
77
|
dcgen.output = options[:output] if not options[:output].nil?
|
75
78
|
dcgen.exclude = options[:exclude] if not options[:exclude].nil?
|
79
|
+
dcgen.include = options[:include] if not options[:include].nil?
|
76
80
|
|
77
81
|
dcgen.generate_destructive_changes
|
78
82
|
|
data/lib/dcgen/app.rb
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
module Dcgen
|
2
2
|
class App
|
3
3
|
|
4
|
-
attr_accessor :master, :destination, :output, :exclude, :verbose
|
4
|
+
attr_accessor :master, :destination, :output, :exclude, :verbose, :include
|
5
5
|
|
6
6
|
def initialize
|
7
7
|
|
8
8
|
@verbose = true
|
9
9
|
@metadata = {}
|
10
10
|
@exclude = []
|
11
|
+
@include = []
|
11
12
|
|
12
13
|
end
|
13
14
|
|
@@ -51,6 +52,7 @@ Diff between:
|
|
51
52
|
master: #{master}
|
52
53
|
destination: #{destination}:
|
53
54
|
excluded: #{@exclude.join(' ')}
|
55
|
+
included: #{@include.join(' ')}
|
54
56
|
|
55
57
|
Changes detected:
|
56
58
|
=================
|
@@ -68,15 +70,20 @@ Changes detected:
|
|
68
70
|
print_header if @verbose
|
69
71
|
|
70
72
|
# Load plugins and build metadata variables
|
71
|
-
plugins = Dir.glob(File.dirname(__FILE__) + "/plugins/*"
|
73
|
+
plugins = Dir.glob(File.dirname(__FILE__) + "/plugins/*")
|
72
74
|
|
73
75
|
plugins.each do |plugin|
|
74
76
|
|
75
77
|
require_relative plugin
|
76
78
|
|
77
79
|
plugin_name = plugin.match(/^.*\/(.*).rb$/)[1]
|
78
|
-
|
79
|
-
@
|
80
|
+
|
81
|
+
if @include.include?(plugin_name) || @include.empty?
|
82
|
+
plugin_metadata = eval "Dcgen::#{plugin_name} @master, @destination, @verbose"
|
83
|
+
@metadata[plugin_name.to_sym] = plugin_metadata - @exclude unless plugin_metadata.nil?
|
84
|
+
else
|
85
|
+
@metadata[plugin_name.to_sym] = []
|
86
|
+
end
|
80
87
|
|
81
88
|
end
|
82
89
|
|
data/lib/dcgen/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: salesforce-dcgen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.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: 2015-
|
11
|
+
date: 2015-06-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|