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 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
- fields.map {|f| f[:name]}
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={})
@@ -1,3 +1,3 @@
1
1
  module Salesforce
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
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.3
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-08-12 00:00:00.000000000 Z
12
+ date: 2013-09-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rforce