sf_cli 1.2.3 → 1.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sf_cli/sf/core/base.rb +5 -2
- data/lib/sf_cli/sf/sobject/schema.rb +14 -1
- data/lib/sf_cli/version.rb +1 -1
- metadata +6 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9eaa5b952281b6d65ee9985c4627ed2e28cdca208bc8a9de215bfe933ae71d2a
|
4
|
+
data.tar.gz: 7ee7b1020b429e05edc68fed332267e24a3d3806ff2fffd2dfaf7279a3e00759
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27ad97ba8c8478f9e75b50c446101ebf7a1045772d4734ac8b89a4ef0a4f0195ff849be5694dce36e5bc9033906f5754a4936355d5181910db55a5fec02ec546
|
7
|
+
data.tar.gz: a986236aa5b63bfb86202148df5a2fc5251d9f125a3bc9fb795578137a6d180af2f8f4edcbd61cd2065d1c7f532b7b21e5807b35b268368007016f83a04e7d03
|
data/lib/sf_cli/sf/core/base.rb
CHANGED
@@ -47,8 +47,11 @@ module SfCli
|
|
47
47
|
if format.to_sym == :json
|
48
48
|
' ' + {json: true}.merge(hash).each_with_object([]){|(k,v), arr| arr << %(--#{k}) if v}.join(' ')
|
49
49
|
else
|
50
|
-
|
51
|
-
|
50
|
+
options = hash.each_with_object([]){|(k,v), arr| arr << %(--#{k}) if v}.join(' ')
|
51
|
+
return '' if options.empty?
|
52
|
+
|
53
|
+
options = ' ' + options unless options.start_with?(' ')
|
54
|
+
return options
|
52
55
|
end
|
53
56
|
end
|
54
57
|
|
@@ -44,6 +44,10 @@ module SfCli
|
|
44
44
|
@relations ||= Relations.new(children_relations + parent_relations)
|
45
45
|
end
|
46
46
|
|
47
|
+
def relation_names
|
48
|
+
relations.names
|
49
|
+
end
|
50
|
+
|
47
51
|
def to_h
|
48
52
|
schema
|
49
53
|
end
|
@@ -169,7 +173,7 @@ module SfCli
|
|
169
173
|
end
|
170
174
|
|
171
175
|
def record_types
|
172
|
-
schema["recordTypeInfos"]
|
176
|
+
@record_types = schema["recordTypeInfos"].map{|rt| RecordType.new(**rt)}
|
173
177
|
end
|
174
178
|
|
175
179
|
def replicateable?
|
@@ -219,6 +223,7 @@ module SfCli
|
|
219
223
|
end
|
220
224
|
|
221
225
|
Relation = Struct.new(:name, :field, :class_name)
|
226
|
+
RecordType = Struct.new(:active, :available, :defaultRecordTypeMapping, :developerName, :master, :name, :recordTypeId, :urls)
|
222
227
|
|
223
228
|
class Relations
|
224
229
|
include Enumerable
|
@@ -278,6 +283,14 @@ module SfCli
|
|
278
283
|
map{|field| [field.name, field.label]}
|
279
284
|
end
|
280
285
|
|
286
|
+
def names
|
287
|
+
map(&:name)
|
288
|
+
end
|
289
|
+
|
290
|
+
def labels
|
291
|
+
map(&:label)
|
292
|
+
end
|
293
|
+
|
281
294
|
private
|
282
295
|
|
283
296
|
def fields
|
data/lib/sf_cli/version.rb
CHANGED
metadata
CHANGED
@@ -1,17 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sf_cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takanobu Maekawa
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-11-
|
11
|
+
date: 2024-11-17 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
|
-
description: A
|
14
|
-
only sf command is the target of development.
|
13
|
+
description: A library for introducing Salesforce CLI to Ruby scripting.
|
15
14
|
email:
|
16
15
|
executables:
|
17
16
|
- sf_cli
|
@@ -80,16 +79,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
80
79
|
requirements:
|
81
80
|
- - ">="
|
82
81
|
- !ruby/object:Gem::Version
|
83
|
-
version: 3.3.
|
82
|
+
version: 3.3.4
|
84
83
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
85
84
|
requirements:
|
86
85
|
- - ">="
|
87
86
|
- !ruby/object:Gem::Version
|
88
87
|
version: '0'
|
89
88
|
requirements:
|
90
|
-
- 'Salesforce CLI ( >= 2.
|
89
|
+
- 'Salesforce CLI ( >= 2.64.8): https://developer.salesforce.com/tools/salesforcecli'
|
91
90
|
rubygems_version: 3.5.11
|
92
91
|
signing_key:
|
93
92
|
specification_version: 4
|
94
|
-
summary: A library for Salesforce CLI
|
93
|
+
summary: A library for introducing Salesforce CLI to Ruby scripting.
|
95
94
|
test_files: []
|