salesforce-dcgen 0.0.7 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8d6344bd52f41193c4e258fc1386491a8727c5ad
4
- data.tar.gz: 2779839a8c80f7ad64527613cf61128c5a5110dd
3
+ metadata.gz: da088337dcf551f0c47363549d94d7fd62d53181
4
+ data.tar.gz: 8c1953dd72cddbfa402939d4810e0a345366baf8
5
5
  SHA512:
6
- metadata.gz: 4b4033ec8664c3ae468980d448be86319cea65180b85efac7696de37e037d34c61febcaccf9fda2e730ce4bef1d4a1bc0bf9bf2cf5a86953bd152db1ec2dcf8a
7
- data.tar.gz: 88de73796a60b3dcedc995837586beaa8cfac4ba467327cc75765e50db657a86f1f1a7ff30f592e86fc89d8e4a2be5768ff20c877b05f43bd39f77d314a32999
6
+ metadata.gz: 948e81efdae419761d32934d8bd9b739755edddb67955704c80343697146777a349b8314137110e9b8572542f1922ded66df89fecf4efc64c5bb7109e0a25fd6
7
+ data.tar.gz: bc6618b2e576aedda1a027a4ecf910adf25bf150aa1598e0c619213b414b56d8e168392a016a70e8121deae7d1ff9a661ad831db0be29cf5f668aff6de75d1dd
data/lib/dcgen/app.rb CHANGED
@@ -33,7 +33,29 @@ module Dcgen
33
33
  file.write renderer.result(binding)
34
34
  end
35
35
 
36
- puts "info: #{out_file} successfully generated"
36
+ puts "
37
+ File generated:
38
+ ===============
39
+
40
+ #{out_file}
41
+
42
+ "
43
+
44
+ end
45
+
46
+ def print_header
47
+
48
+ puts "
49
+ Diff between:
50
+ =============
51
+
52
+ master: #{master}
53
+ destination: #{destination}:
54
+
55
+ Changes detected:
56
+ =================
57
+
58
+ "
37
59
 
38
60
  end
39
61
 
@@ -42,6 +64,9 @@ module Dcgen
42
64
  # Validate directories
43
65
  validate_directories
44
66
 
67
+ # header output
68
+ print_header
69
+
45
70
  # Load plugins and build metadata variables
46
71
  plugins = Dir.glob(File.dirname(__FILE__) + "/plugins/*" )
47
72
 
@@ -5,7 +5,14 @@ module Dcgen
5
5
  master_classes = Dir.glob(master + '/classes/*cls').map {|c| c.match(/^.*\/(.*).cls$/)[1] }
6
6
  destination_classes = Dir.glob(destination + '/classes/*cls').map {|c| c.match(/^.*\/(.*).cls$/)[1] }
7
7
 
8
- destination_classes - master_classes
8
+ remove_classes = destination_classes - master_classes
9
+
10
+ puts "ApexClasses:" if not remove_classes.empty?
11
+ remove_classes.each do |apexclass|
12
+ puts " #{apexclass}"
13
+ end
14
+
15
+ remove_classes
9
16
 
10
17
  end
11
18
 
@@ -5,7 +5,14 @@ module Dcgen
5
5
  master_pages = Dir.glob(master + '/pages/*page').map {|c| c.match(/^.*\/(.*).page$/)[1] }
6
6
  destination_pages = Dir.glob(destination + '/pages/*page').map {|c| c.match(/^.*\/(.*).page$/)[1] }
7
7
 
8
- destination_pages - master_pages
8
+ remove_pages = destination_pages - master_pages
9
+
10
+ puts "ApexPages:" if not remove_pages.empty?
11
+ remove_pages.each do |aplexpage|
12
+ puts " #{aplexpage}"
13
+ end
14
+
15
+ remove_pages
9
16
 
10
17
  end
11
18
 
@@ -5,7 +5,14 @@ module Dcgen
5
5
  master_approvalprocess = Dir.glob(master + '/approvalProcesses/*approvalProcess').map {|c| c.match(/^.*\/(.*).approvalProcess$/)[1] }
6
6
  destination_approvalprocess = Dir.glob(destination + '/approvalProcesses/*approvalProcess').map {|c| c.match(/^.*\/(.*).approvalProcess$/)[1] }
7
7
 
8
- destination_approvalprocess - master_approvalprocess
8
+ remove_approvalprocess = destination_approvalprocess - master_approvalprocess
9
+
10
+ puts "ApprovalProcesses:" if not remove_approvalprocess.empty?
11
+ remove_approvalprocess.each do |approvalprocess|
12
+ puts " #{approvalprocess}"
13
+ end
14
+
15
+ remove_approvalprocess
9
16
 
10
17
  end
11
18
 
@@ -4,7 +4,7 @@ module Dcgen
4
4
 
5
5
  def self.customfield master , destination
6
6
 
7
- remove_fields = []
7
+ remove_customfields = []
8
8
 
9
9
  master_objects = Dir.glob(master + '/objects/*object').map {|c| c.match(/^.*\/(.*).object$/)[1] }
10
10
 
@@ -24,14 +24,19 @@ module Dcgen
24
24
  # Find all the customfields that are in destination, if they are not present in
25
25
  # master, then they have to be in the remove list
26
26
  destination_doc.xpath('//fields/fullName').each do |field|
27
- remove_fields << "#{obj}.#{field.text}" if master_doc.xpath("//fields[fullName=\"#{field.text}\"]").empty?
27
+ remove_customfields << "#{obj}.#{field.text}" if master_doc.xpath("//fields[fullName=\"#{field.text}\"]").empty?
28
28
  end
29
29
 
30
30
  end
31
31
 
32
32
  end
33
33
 
34
- remove_fields
34
+ puts "CustomFields:" if not remove_customfields.empty?
35
+ remove_customfields.each do |customfield|
36
+ puts " #{customfield}"
37
+ end
38
+
39
+ remove_customfields
35
40
 
36
41
  end
37
42
  end
@@ -5,7 +5,14 @@ module Dcgen
5
5
  master_groups = Dir.glob(master + '/groups/*group').map {|c| c.match(/^.*\/(.*).group$/)[1] }
6
6
  destination_groups = Dir.glob(destination + '/groups/*group').map {|c| c.match(/^.*\/(.*).group$/)[1] }
7
7
 
8
- destination_groups - master_groups
8
+ remove_groups = destination_groups - master_groups
9
+
10
+ puts "Groups:" if not remove_groups.empty?
11
+ remove_groups.each do |group|
12
+ puts " #{group}"
13
+ end
14
+
15
+ remove_groups
9
16
 
10
17
  end
11
18
 
@@ -31,6 +31,11 @@ module Dcgen
31
31
 
32
32
  end
33
33
 
34
+ puts "Labels:" if not remove_labels.empty?
35
+ remove_labels.each do |label|
36
+ puts " #{label}"
37
+ end
38
+
34
39
  remove_labels
35
40
 
36
41
  end
@@ -5,7 +5,14 @@ module Dcgen
5
5
  master_permissionset = Dir.glob(master + '/permissionsets/*permissionset').map {|c| c.match(/^.*\/(.*).permissionset$/)[1] }
6
6
  destination_permissionset = Dir.glob(destination + '/permissionsets/*permissionset').map {|c| c.match(/^.*\/(.*).permissionset$/)[1] }
7
7
 
8
- destination_permissionset - master_permissionset
8
+ remove_permissionset = destination_permissionset - master_permissionset
9
+
10
+ puts "PermissionSets:" if not remove_permissionset.empty?
11
+ remove_permissionset.each do |permissionset|
12
+ puts " #{permissionset}"
13
+ end
14
+
15
+ remove_permissionset
9
16
 
10
17
  end
11
18
 
@@ -31,6 +31,11 @@ module Dcgen
31
31
 
32
32
  end
33
33
 
34
+ puts "WorkflowRules:" if not remove_workflowrules.empty?
35
+ remove_workflowrules.each do |workflowrule|
36
+ puts " #{workflowrule}"
37
+ end
38
+
34
39
  remove_workflowrules
35
40
 
36
41
  end
data/lib/dcgen/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Dcgen
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.9"
3
3
  end
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.0.7
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Breinlinger
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-30 00:00:00.000000000 Z
11
+ date: 2014-10-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler