databasedotcom 1.1.6 → 1.1.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -143,7 +143,7 @@ module Databasedotcom
143
143
  classes = (classnames.is_a?(Array) ? classnames : [classnames]).collect do |clazz|
144
144
  original_classname = clazz
145
145
  clazz = original_classname[0,1].capitalize + original_classname[1..-1]
146
- unless module_namespace.const_defined?(clazz)
146
+ unless const_defined_in_module(module_namespace, clazz)
147
147
  new_class = module_namespace.const_set(clazz, Class.new(Databasedotcom::Sobject::Sobject))
148
148
  new_class.client = self
149
149
  new_class.materialize(original_classname)
@@ -492,5 +492,9 @@ module Databasedotcom
492
492
  def query_org_id
493
493
  query("select id from Organization")[0]["Id"]
494
494
  end
495
+
496
+ def const_defined_in_module(mod, const)
497
+ mod.method(:const_defined?).arity == 1 ? mod.const_defined?(const) : mod.const_defined?(const, false)
498
+ end
495
499
  end
496
500
  end
@@ -1,3 +1,3 @@
1
1
  module Databasedotcom
2
- VERSION = "1.1.6"
2
+ VERSION = "1.1.7"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: databasedotcom
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.1.6
5
+ version: 1.1.7
6
6
  platform: ruby
7
7
  authors:
8
8
  - Glenn Gillen, Danny Burkes & Richard Zhao
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-10-19 00:00:00 Z
13
+ date: 2011-10-20 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: multipart-post