databasedotcom 1.1.6 → 1.1.7
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/databasedotcom/client.rb +5 -1
- data/lib/databasedotcom/version.rb +1 -1
- metadata +2 -2
@@ -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
|
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
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: databasedotcom
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 1.1.
|
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-
|
13
|
+
date: 2011-10-20 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: multipart-post
|