medea 0.2.14 → 0.2.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/lib/medea/jasondb.rb +2 -17
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.15
|
data/lib/medea/jasondb.rb
CHANGED
@@ -1,24 +1,9 @@
|
|
1
1
|
module JasonDB
|
2
|
-
def JasonDB::class_exists? class_name
|
3
|
-
const = Module.const_get(class_name)
|
4
|
-
return const.is_a? Class
|
5
|
-
rescue NameError
|
6
|
-
return false
|
7
|
-
end
|
8
|
-
|
9
2
|
#jason_url here doesn't include the http[s]:// part, but does include the domain and a trailing '/'
|
10
3
|
#( so it's "rest.jasondb.com/<domain>/" )
|
11
4
|
def JasonDB::db_auth_url mode=:secure
|
12
|
-
|
13
|
-
|
14
|
-
config = Rails.configuration.database_configuration[Rails.env]
|
15
|
-
else
|
16
|
-
#if not, use some defaults for testing medea.
|
17
|
-
config = {"user" => "michael",
|
18
|
-
"topic" => "medea-test",
|
19
|
-
"password" => "password"}
|
20
|
-
end
|
21
|
-
|
5
|
+
config = Rails.configuration.database_configuration[Rails.env]
|
6
|
+
|
22
7
|
user = config["user"]
|
23
8
|
topic = config["topic"]
|
24
9
|
password = config["password"]
|