gd_salesforce 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/salesforce.rb +7 -2
- data/lib/salesforce/version.rb +1 -1
- metadata +2 -2
data/lib/salesforce.rb
CHANGED
@@ -28,13 +28,18 @@ module Salesforce
|
|
28
28
|
modules = g[:describeGlobalResponse][:result][:sobjects]
|
29
29
|
end
|
30
30
|
|
31
|
-
def fields(mod)
|
31
|
+
def fields(mod, options={})
|
32
32
|
result = @rforce_binding.describeSObject(:sObject => mod)
|
33
33
|
if result.has_key?(:Fault)
|
34
|
+
binding.pry
|
34
35
|
fail result
|
35
36
|
end
|
36
37
|
fields = result[:describeSObjectResponse][:result][:fields]
|
37
|
-
|
38
|
+
if (options[:with_details] == true)
|
39
|
+
fields
|
40
|
+
else
|
41
|
+
fields.map {|f| f[:name]}
|
42
|
+
end
|
38
43
|
end
|
39
44
|
|
40
45
|
def grab(options={})
|
data/lib/salesforce/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gd_salesforce
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-09-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rforce
|