mdata 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 59ba3c43a2d5c4a92d35f80cd17e376009691f59
4
+ data.tar.gz: 3fd5301f77852b750e80218a71170c42f30db8ba
5
+ SHA512:
6
+ metadata.gz: a7f0de6579e18a699d0e08aaff78deadcf7e5ff03cb395e0cca8ea1d2a635832881f4288c902185181d9c2323ff6c58c9a14481afab892d240d5cf587a7a7c10
7
+ data.tar.gz: f9642aed7d6d97e4f35f58d1dca0b042636a70cfe47434103b009838878e2d2d4eb1e6fae4c49cf3f6f62ef5500e168a316ed8c0c429eb30fd3fda045a388527
data/bin/mdata ADDED
@@ -0,0 +1,252 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'rubygems'
4
+ require 'commander/import'
5
+ require 'mdata/metadata'
6
+ require 'terminal-table'
7
+
8
+ program :version, '1.0.0'
9
+ program :description, 'Your Salesforce metadata navigator and manipulator'
10
+ program :help, 'Author', 'Ben Burwell <ben.burwell@trifecta.com>'
11
+
12
+ global_option '--dir DIRECTORY', String, 'Specify a custom directory to search in'
13
+
14
+ command 'profile create' do |c|
15
+ c.syntax = 'mdata profile create --profile PROFILE'
16
+ c.summary = 'Create a new profile'
17
+ c.option '--profile PROFILE', String, 'The name of the profile to create'
18
+ c.action do |args, opts|
19
+ begin
20
+ raise ArgumentError, 'no profile specified' if opts.profile.nil?
21
+ Salesforce::Metadata::Profile.touch opts.profile, opts.dir
22
+ rescue ArgumentError => e
23
+ puts "Error executing command: #{e.message}"
24
+ end
25
+ end
26
+ end
27
+
28
+ # Profile - Field Permissions - Read
29
+ command :'profile fieldPermissions:read' do |c|
30
+ c.syntax = 'mdata profile fieldPermission:read --profile PROFILE [options]'
31
+ c.summary = 'See what permissions a particular profile is granted'
32
+ c.option '--profile PROFILE', String, 'The profile to examine'
33
+ c.option '--field FIELD', String, 'Optionally, a specific field to look for.'
34
+ c.action do |args, opts|
35
+ begin
36
+ raise ArgumentError, 'no profile specified' if opts.profile.nil?
37
+ profile = Salesforce::Metadata::Profile.read opts.profile, opts.dir
38
+ profile.fieldPermissions.keep_if { |x| x.field == opts.field } unless opts.field.nil?
39
+ profile.fieldPermissions.sort! { |a, b| a.field <=> b.field }
40
+ rows = []
41
+ profile.fieldPermissions.each do |fp|
42
+ obj = fp.field.split('.')[0]
43
+ field = fp.field.split('.')[1]
44
+ rows << [ obj, field, fp.to_flag_style ]
45
+ end
46
+ table = Terminal::Table.new :rows => rows, :headings => ['Object', 'Field', 'Permissions']
47
+ puts table
48
+ rescue ArgumentError => e
49
+ puts "Error executing command: #{e.message}"
50
+ end
51
+ end
52
+ end
53
+
54
+ # Profile - Field Permissions - Set
55
+ command :'profile fieldPermissions:set' do |c|
56
+ c.syntax = 'mdata profile fieldPermissions:set --profile PROFILE --field FIELD [options]'
57
+ c.summary = 'Overwrites any existing permissions for the field on the profile with the ones specified'
58
+ c.option '--profile PROFILE', String, 'The profile to configure'
59
+ c.option '--field FIELD', String, 'The field to assign permissions for'
60
+ c.option '--readable', 'Set the read permission'
61
+ c.option '--editable', 'Set the edit permission'
62
+ c.option '--hidden', 'Set the field to be hidden'
63
+ c.action do |args, opts|
64
+ begin
65
+ raise ArgumentError, 'no profile specified' if opts.profile.nil?
66
+ raise ArgumentError, 'no field specified' if opts.field.nil?
67
+ profile = Salesforce::Metadata::Profile.read opts.profile, opts.dir
68
+ idx = profile.fieldPermissions.find_index { |x| x.field == opts.field }
69
+
70
+ if idx.nil?
71
+ fp = Salesforce::Types::ProfileFieldLevelSecurity.new
72
+ fp.field = opts.field
73
+ profile.fieldPermissions.push fp
74
+ idx = profile.fieldPermissions.count - 1
75
+ end
76
+
77
+ profile.fieldPermissions[idx].readable = case opts.readable
78
+ when nil then 'false'
79
+ else 'true'
80
+ end
81
+ profile.fieldPermissions[idx].editable = case opts.editable
82
+ when nil then 'false'
83
+ else 'true'
84
+ end
85
+ profile.fieldPermissions[idx].hidden = case opts.hidden
86
+ when nil then 'false'
87
+ else 'true'
88
+ end
89
+ profile.save
90
+ rescue ArgumentError => e
91
+ puts "Error executing command: #{e.message}"
92
+ end
93
+ end
94
+ end
95
+
96
+ # Profile - Field Permissions - Grant
97
+ command :'profile fieldPermissions:grant' do |c|
98
+ c.syntax = 'mdata profile fieldPermissions:grant --profile PROFILE --field FIELD [options]'
99
+ c.summary = 'Grants the specified permission on the field to the profile and leaves all others intact'
100
+ c.option '--profile PROFILE', String, 'The profile to configure'
101
+ c.option '--field FIELD', String, 'The field to grant permissions on'
102
+ c.option '--readable', 'Grant the read permission'
103
+ c.option '--editable', 'Grant the edit permission'
104
+ c.option '--hidden', 'Make the field hidden'
105
+ c.action do |args, opts|
106
+ begin
107
+ raise ArgumentError, 'no profile specified' if opts.profile.nil?
108
+ raise ArgumentError, 'no field specified' if opts.field.nil?
109
+ profile = Salesforce::Metadata::Profile.read opts.profile, opts.dir
110
+ idx = profile.fieldPermissions.find_index { |x| x.field == opts.field }
111
+
112
+ if idx.nil?
113
+ fp = Salesforce::Types::ProfileFieldLevelSecurity.new
114
+ fp.field = opts.field
115
+ profile.fieldPermissions.push fp
116
+ idx = profile.fieldPermissions.count - 1
117
+ end
118
+
119
+ profile.fieldPermissions[idx].readable = 'true' unless opts.readable.nil?
120
+ profile.fieldPermissions[idx].editable = 'true' unless opts.editable.nil?
121
+ profile.fieldPermissions[idx].hidden = 'true' unless opts.hidden.nil?
122
+ profile.save
123
+ rescue ArgumentError => e
124
+ puts "Error executing command: #{e.message}"
125
+ end
126
+ end
127
+ end
128
+
129
+ # Profile - Field Permissions - Revoke
130
+ command :'profile fieldPermissions:revoke' do |c|
131
+ c.syntax = 'mdata profile fieldPermissions:revoke --profile PROFILE --field FIELD [options]'
132
+ c.summary = 'Revokes the specified permission on the field to the profile and leaves all others intact'
133
+ c.option '--profile PROFILE', String, 'The profile to configure'
134
+ c.option '--field FIELD', String, 'The field to revoke permissions on'
135
+ c.option '--readable', 'Revoke the read permission'
136
+ c.option '--editable', 'Revoke the edit permission'
137
+ c.option '--hidden', 'Remove the hidden flag'
138
+ c.action do |args, opts|
139
+ begin
140
+ raise ArgumentError, 'no profile specified' if opts.profile.nil?
141
+ raise ArgumentError, 'no field specified' if opts.field.nil?
142
+ profile = Salesforce::Metadata::Profile.read opts.profile, opts.dir
143
+ idx = profile.fieldPermissions.find_index { |x| x.field == opts.field }
144
+ raise ArgumentError, 'field not found in profile' if idx.nil?
145
+ profile.fieldPermissions[idx].readable = 'false' unless opts.readable.nil?
146
+ profile.fieldPermissions[idx].editable = 'false' unless opts.editable.nil?
147
+ profile.fieldPermissions[idx].hidden = 'false' unless opts.hidden.nil?
148
+ profile.save
149
+ rescue ArgumentError => e
150
+ puts "Error executing command: #{e.message}"
151
+ end
152
+ end
153
+ end
154
+
155
+ # Profile - Field Permissions - Copy
156
+ command :'profile fieldPermissions:copy' do |c|
157
+ c.syntax = 'mdata profile fieldPermissions:copy --fromProfile PROFILE --toProfile PROFILE --fromField FIELD --toField FIELD [options]'
158
+ c.summary = 'Copies the specified permissions for a field from one profile to another'
159
+ c.description = [
160
+ 'Copies the permissions on fromProfile for the object fromField to toField on toProfile.',
161
+ '',
162
+ 'If you are copying the permissions from one field to another on the same profile, you can use',
163
+ 'the --profile option rather than specifying the same --fromProfile and --toProfile.',
164
+ '',
165
+ 'Likewise, if you are copying the permissions for an field from one profile to another, you can',
166
+ 'specify an --field rather than a --fromField and --toField.'
167
+ ].join("\n")
168
+ c.option '--fromProfile PROFILE', String, 'The source profile'
169
+ c.option '--toProfile PROFILE', String, 'The destination profile'
170
+ c.option '--profile PROFILE', String, 'A profile to use as the source and destination'
171
+ c.option '--fromField FIELD', String, 'The source field'
172
+ c.option '--toField FIELD', String, 'The destination field'
173
+ c.option '--field FIELD', String, 'A field to use as the source and destination'
174
+ c.option '--all', 'Copy all permissions'
175
+ c.option '--readable', 'Copy the read permission'
176
+ c.option '--editable', 'Copy the edit permission'
177
+ c.option '--hidden', 'Copy the hidden permission'
178
+ c.action do |args, opts|
179
+ # Override options for helper options
180
+ opts.fromProfile = opts.profile if opts.profile
181
+ opts.toProfile = opts.profile if opts.profile
182
+ opts.fromField = opts.field if opts.field
183
+ opts.toField = opts.field if opts.field
184
+ opts.readable = true if opts.all
185
+ opts.editable = true if opts.all
186
+ opts.hidden = true if opts.all
187
+
188
+ begin
189
+ raise ArgumentError, 'no source profile specified' if opts.fromProfile.nil?
190
+ raise ArgumentError, 'no destination profile specified' if opts.toProfile.nil?
191
+ raise ArgumentError, 'no source field specified' if opts.fromField.nil?
192
+ raise ArgumentError, 'no destination field specified' if opts.toField.nil?
193
+
194
+ from_profile = Salesforce::Metadata::Profile.read opts.fromProfile, opts.dir
195
+ src_idx = from_profile.fieldPermissions.find_index { |x| x.field == opts.fromField }
196
+ raise ArgumentError, 'source field not found in source profile' if src_idx.nil?
197
+
198
+ to_profile = Salesforce::Metadata::Profile.read opts.toProfile, opts.dir
199
+ dst_idx = to_profile.fieldPermissions.find_index { |x| x.field == opts.toField }
200
+
201
+ if dst_idx.nil?
202
+ fp = Salesforce::Types::ProfileFieldLevelSecurity.new
203
+ fp.field = opts.toField
204
+ to_profile.fieldPermissions.push fp
205
+ dst_idx = to_profile.fieldPermissions.count - 1
206
+ end
207
+
208
+ unless opts.readable.nil?
209
+ val = from_profile.fieldPermissions[src_idx].readable
210
+ to_profile.fieldPermissions[dst_idx].readable = val
211
+ end
212
+ unless opts.editable.nil?
213
+ val = from_profile.fieldPermissions[src_idx].editable
214
+ to_profile.fieldPermissions[dst_idx].editable = val
215
+ end
216
+ unless opts.hidden.nil?
217
+ val = from_profile.fieldPermissions[src_idx].hidden
218
+ to_profile.fieldPermissions[dst_idx].hidden = val
219
+ end
220
+
221
+ to_profile.save
222
+ rescue ArgumentError => e
223
+ puts "Error executing command: #{e.message}"
224
+ end
225
+ end
226
+ end
227
+
228
+ # Profile - Field Permissions - Revoke
229
+ command :'profile fieldPermissions:delete' do |c|
230
+ c.syntax = 'mdata profile fieldPermissions:delete --profile PROFILE --field FIELD'
231
+ c.summary = 'Completely removes the permissions for a particular field. Useful if a field is deleted from an object.'
232
+ c.option '--profile PROFILE', String, 'The profile to configure'
233
+ c.option '--field FIELD', String, 'The field to revoke permissions on'
234
+ c.action do |args, opts|
235
+ begin
236
+ raise ArgumentError, 'no profile specified' if opts.profile.nil?
237
+ raise ArgumentError, 'no field specified' if opts.field.nil?
238
+ profile = Salesforce::Metadata::Profile.read opts.profile, opts.dir
239
+ profile.fieldPermissions.delete_if { |x| x.field == opts.field }
240
+ profile.save
241
+ rescue ArgumentError => e
242
+ puts "Error executing command: #{e.message}"
243
+ end
244
+ end
245
+ end
246
+
247
+ alias_command :'pr fp:r', :'profile fieldPermissions:read'
248
+ alias_command :'pr fp:s', :'profile fieldPermissions:set'
249
+ alias_command :'pr fp:g', :'profile fieldPermissions:grant'
250
+ alias_command :'pr fp:v', :'profile fieldPermissions:revoke'
251
+ alias_command :'pr fp:c', :'profile fieldPermissions:copy'
252
+ alias_command :'pr fp:d', :'profile fieldPermissions:delete'
@@ -0,0 +1,87 @@
1
+ require 'roxml'
2
+ require 'nokogiri'
3
+ require 'mdata/types'
4
+
5
+ module Salesforce
6
+ module Metadata
7
+ class Profile
8
+ include ROXML
9
+
10
+ attr_accessor :filename
11
+
12
+ xml_name 'Profile'
13
+
14
+ xml_accessor :applicationVisibilities,
15
+ as: [Salesforce::Types::ProfileApplicationVisibility],
16
+ from: 'applicationVisibilities'
17
+ xml_accessor :classAccesses,
18
+ as: [Salesforce::Types::ProfileApexClassAccess],
19
+ from: 'classAccesses'
20
+ xml_accessor :custom
21
+ xml_accessor :customPermissions,
22
+ as: [Salesforce::Types::ProfileCustomPermissions],
23
+ from: 'customPermissions'
24
+ xml_accessor :description
25
+ xml_accessor :externalDataSourceAccesses,
26
+ as: [Salesforce::Types::ProfileExternalDataSourceAccess],
27
+ from: 'externalDataSourceAccesses'
28
+ xml_accessor :fieldLevelSecurities,
29
+ as: [Salesforce::Types::ProfileFieldLevelSecurity],
30
+ from: 'fieldLevelSecurities'
31
+ xml_accessor :fieldPermissions,
32
+ as: [Salesforce::Types::ProfileFieldLevelSecurity],
33
+ from: 'fieldPermissions'
34
+ xml_accessor :fullName
35
+ xml_accessor :layoutAssignments,
36
+ as: [Salesforce::Types::ProfileLayoutAssignments],
37
+ from: 'layoutAssignments'
38
+ xml_accessor :loginHours,
39
+ as: [Salesforce::Types::ProfileLoginHours],
40
+ from: 'loginHours'
41
+ xml_accessor :loginIpRanges,
42
+ as: [Salesforce::Types::ProfileLoginIpRange],
43
+ from: 'loginIpRanges'
44
+ xml_accessor :objectPermissions,
45
+ as: [Salesforce::Types::ProfileObjectPermissions],
46
+ from: 'objectPermissions'
47
+ xml_accessor :pageAccesses,
48
+ as: [Salesforce::Types::ProfileApexPageAccess],
49
+ from: 'pageAccesses'
50
+ xml_accessor :recordTypeVisibilities,
51
+ as: [Salesforce::Types::ProfileRecordTypeVisibility],
52
+ from: 'recordTypeVisibilities'
53
+ xml_accessor :tabVisibilities,
54
+ as: [Salesforce::Types::ProfileTabVisibility],
55
+ from: 'tabVisibilities'
56
+ xml_accessor :userLicense
57
+ xml_accessor :userPermissions,
58
+ as: [Salesforce::Types::ProfileUserPermission],
59
+ from: 'userPermissions'
60
+
61
+ def self.read name, dir
62
+ dir = './src/profiles' if dir.nil?
63
+ filename = "#{dir}/#{name}.profile"
64
+ profile = Profile.from_xml(File.read(filename))
65
+ profile.filename = filename
66
+ profile
67
+ end
68
+
69
+ def save
70
+ doc = ::Nokogiri::XML::Document.new
71
+ doc.root = to_xml()
72
+ doc.root.add_namespace nil, 'http://soap.sforce.com/2006/04/metadata'
73
+ File.open @filename, 'w' do |file|
74
+ file << doc.serialize
75
+ end
76
+ end
77
+
78
+ def self.touch name, dir
79
+ dir = './src/profiles' if dir.nil?
80
+ filename = "#{dir}/#{name}.profile"
81
+ profile = Profile.new
82
+ profile.filename = filename
83
+ profile.save
84
+ end
85
+ end
86
+ end
87
+ end
@@ -0,0 +1 @@
1
+ require 'mdata/metadata/Profile'
@@ -0,0 +1,14 @@
1
+ require 'roxml'
2
+
3
+ module Salesforce
4
+ module Types
5
+ class ApexClassAccess
6
+ include ROXML
7
+
8
+ xml_accessor :apexClass
9
+ xml_accessor :enabled
10
+ end
11
+
12
+ class ProfileApexClassAccess < ApexClassAccess; end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ require 'roxml'
2
+
3
+ module Salesforce
4
+ module Types
5
+ class ApexPageAccess
6
+ include ROXML
7
+
8
+ xml_accessor :apexPage
9
+ xml_accessor :enabled
10
+ end
11
+
12
+ class ProfileApexPageAccess < ApexPageAccess; end
13
+ end
14
+ end
@@ -0,0 +1,15 @@
1
+ require 'roxml'
2
+
3
+ module Salesforce
4
+ module Types
5
+ class ApplicationVisibility
6
+ include ROXML
7
+
8
+ xml_accessor :application
9
+ xml_accessor :default
10
+ xml_accessor :visible
11
+ end
12
+
13
+ class ProfileApplicationVisibility < ApplicationVisibility; end
14
+ end
15
+ end
@@ -0,0 +1,14 @@
1
+ require 'roxml'
2
+
3
+ module Salesforce
4
+ module Types
5
+ class CustomPermissions
6
+ include ROXML
7
+
8
+ xml_accessor :enabled
9
+ xml_accessor :name
10
+ end
11
+
12
+ class ProfileCustomPermissions < CustomPermissions; end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ require 'roxml'
2
+
3
+ module Salesforce
4
+ module Types
5
+ class ExternalDataSourceAccess
6
+ include ROXML
7
+
8
+ xml_accessor :enabled
9
+ xml_accessor :externalDataSource
10
+ end
11
+
12
+ class ProfileExternalDataSourceAccess < ExternalDataSourceAccess; end
13
+ end
14
+ end
@@ -0,0 +1,52 @@
1
+ require 'roxml'
2
+
3
+ module Salesforce
4
+ module Types
5
+ class FieldLevelSecurity
6
+ include ROXML
7
+
8
+ xml_accessor :editable
9
+ xml_accessor :field
10
+ xml_accessor :hidden
11
+ xml_accessor :readable
12
+
13
+ def get_permissions
14
+ permissions = Array.new
15
+ permissions.push 'Editable' if @editable == 'true'
16
+ permissions.push 'Hidden' if @hidden == 'true'
17
+ permissions.push 'Readable' if @readable == 'true'
18
+ permissions
19
+ end
20
+
21
+ def to_s
22
+ get_permissions.join(', ')
23
+ end
24
+
25
+ def to_flag_style
26
+ flags = ''
27
+ if @readable == 'true'
28
+ flags += 'Readable '
29
+ else
30
+ flags += ' '
31
+ end
32
+
33
+ if @editable == 'true'
34
+ flags += 'Editable '
35
+ else
36
+ flags += ' '
37
+ end
38
+
39
+ if @hidden == 'true'
40
+ flags += 'Hidden'
41
+ else
42
+ flags += ' '
43
+ end
44
+
45
+ flags
46
+ end
47
+
48
+ end
49
+
50
+ class ProfileFieldLevelSecurity < FieldLevelSecurity; end
51
+ end
52
+ end
@@ -0,0 +1,14 @@
1
+ require 'roxml'
2
+
3
+ module Salesforce
4
+ module Types
5
+ class LayoutAssignments
6
+ include ROXML
7
+
8
+ xml_accessor :layout
9
+ xml_accessor :recordType
10
+ end
11
+
12
+ class ProfileLayoutAssignments < LayoutAssignments; end
13
+ end
14
+ end
@@ -0,0 +1,26 @@
1
+ require 'roxml'
2
+
3
+ module Salesforce
4
+ module Types
5
+ class LoginHours
6
+ include ROXML
7
+
8
+ xml_accessor :mondayStart
9
+ xml_accessor :mondayEnd
10
+ xml_accessor :tuesdayStart
11
+ xml_accessor :tuesdayEnd
12
+ xml_accessor :wednesdayStart
13
+ xml_accessor :wednesdayEnd
14
+ xml_accessor :thursdayStart
15
+ xml_accessor :thursdayEnd
16
+ xml_accessor :fridayStart
17
+ xml_accessor :fridayEnd
18
+ xml_accessor :saturdayStart
19
+ xml_accessor :saturdayEnd
20
+ xml_accessor :sundayStart
21
+ xml_accessor :sundayEnd
22
+ end
23
+
24
+ class ProfileLoginHours < LoginHours; end
25
+ end
26
+ end
@@ -0,0 +1,15 @@
1
+ require 'roxml'
2
+
3
+ module Salesforce
4
+ module Types
5
+ class LoginIpRange
6
+ include ROXML
7
+
8
+ xml_accessor :description
9
+ xml_accessor :endAddress
10
+ xml_accessor :startAddress
11
+ end
12
+
13
+ class ProfileLoginIpRange < LoginIpRange; end
14
+ end
15
+ end
@@ -0,0 +1,19 @@
1
+ require 'roxml'
2
+
3
+ module Salesforce
4
+ module Types
5
+ class ObjectPermissions
6
+ include ROXML
7
+
8
+ xml_accessor :allowCreate
9
+ xml_accessor :allowDelete
10
+ xml_accessor :allowEdit
11
+ xml_accessor :allowRead
12
+ xml_accessor :modifyAllRecords
13
+ xml_accessor :object
14
+ xml_accessor :viewAllRecords
15
+ end
16
+
17
+ class ProfileObjectPermissions < ObjectPermissions; end
18
+ end
19
+ end
@@ -0,0 +1,16 @@
1
+ require 'roxml'
2
+
3
+ module Salesforce
4
+ module Types
5
+ class RecordTypeVisibility
6
+ include ROXML
7
+
8
+ xml_accessor :default
9
+ xml_accessor :personAccountDefault
10
+ xml_accessor :recordType
11
+ xml_accessor :visible
12
+ end
13
+
14
+ class ProfileRecordTypeVisibility < RecordTypeVisibility; end
15
+ end
16
+ end
@@ -0,0 +1,14 @@
1
+ require 'roxml'
2
+
3
+ module Salesforce
4
+ module Types
5
+ class TabVisibility
6
+ include ROXML
7
+
8
+ xml_accessor :tab
9
+ xml_accessor :visibility # enum: DefaultOff, DefaultOn, Hidden
10
+ end
11
+
12
+ class ProfileTabVisibility < TabVisibility; end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ require 'roxml'
2
+
3
+ module Salesforce
4
+ module Types
5
+ class UserPermission
6
+ include ROXML
7
+
8
+ xml_accessor :enabled
9
+ xml_accessor :name
10
+ end
11
+
12
+ class ProfileUserPermission < UserPermission; end
13
+ end
14
+ end
@@ -0,0 +1,13 @@
1
+ require 'mdata/types/ApplicationVisibility'
2
+ require 'mdata/types/ApexClassAccess'
3
+ require 'mdata/types/CustomPermissions'
4
+ require 'mdata/types/ExternalDataSourceAccess'
5
+ require 'mdata/types/FieldLevelSecurity'
6
+ require 'mdata/types/LayoutAssignments'
7
+ require 'mdata/types/LoginHours'
8
+ require 'mdata/types/LoginIpRange'
9
+ require 'mdata/types/ObjectPermissions'
10
+ require 'mdata/types/ApexPageAccess'
11
+ require 'mdata/types/RecordTypeVisibility'
12
+ require 'mdata/types/TabVisibility'
13
+ require 'mdata/types/UserPermission'
data/lib/mdata.rb ADDED
@@ -0,0 +1,2 @@
1
+ require 'mdata/types'
2
+ require 'mdata/metadata'
metadata ADDED
@@ -0,0 +1,105 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: mdata
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Ben Burwell
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-09-22 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: commander
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: 4.3.5
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: 4.3.5
27
+ - !ruby/object:Gem::Dependency
28
+ name: roxml
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: 3.3.1
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: 3.3.1
41
+ - !ruby/object:Gem::Dependency
42
+ name: terminal-table
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '>='
46
+ - !ruby/object:Gem::Version
47
+ version: 1.5.2
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '>='
53
+ - !ruby/object:Gem::Version
54
+ version: 1.5.2
55
+ description: A command line tool to help manipulate Salesforce metadata without digging
56
+ into XML
57
+ email: ben.burwell@trifecta.com
58
+ executables:
59
+ - mdata
60
+ extensions: []
61
+ extra_rdoc_files: []
62
+ files:
63
+ - lib/mdata.rb
64
+ - lib/mdata/metadata.rb
65
+ - lib/mdata/metadata/Profile.rb
66
+ - lib/mdata/types.rb
67
+ - lib/mdata/types/ApplicationVisibility.rb
68
+ - lib/mdata/types/ApexClassAccess.rb
69
+ - lib/mdata/types/CustomPermissions.rb
70
+ - lib/mdata/types/ExternalDataSourceAccess.rb
71
+ - lib/mdata/types/FieldLevelSecurity.rb
72
+ - lib/mdata/types/LayoutAssignments.rb
73
+ - lib/mdata/types/LoginHours.rb
74
+ - lib/mdata/types/LoginIpRange.rb
75
+ - lib/mdata/types/ObjectPermissions.rb
76
+ - lib/mdata/types/ApexPageAccess.rb
77
+ - lib/mdata/types/RecordTypeVisibility.rb
78
+ - lib/mdata/types/TabVisibility.rb
79
+ - lib/mdata/types/UserPermission.rb
80
+ - bin/mdata
81
+ homepage: http://www.trifecta.com/
82
+ licenses:
83
+ - MIT
84
+ metadata: {}
85
+ post_install_message:
86
+ rdoc_options: []
87
+ require_paths:
88
+ - lib
89
+ required_ruby_version: !ruby/object:Gem::Requirement
90
+ requirements:
91
+ - - '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
94
+ required_rubygems_version: !ruby/object:Gem::Requirement
95
+ requirements:
96
+ - - '>='
97
+ - !ruby/object:Gem::Version
98
+ version: '0'
99
+ requirements: []
100
+ rubyforge_project:
101
+ rubygems_version: 2.0.14
102
+ signing_key:
103
+ specification_version: 4
104
+ summary: Your Salesforce metadata navigator and manipulator
105
+ test_files: []