couchbase-settings 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/couchbase_settings/version.rb +1 -1
- data/lib/couchbase_settings.rb +5 -0
- metadata +1 -1
data/lib/couchbase_settings.rb
CHANGED
@@ -15,6 +15,7 @@ module CouchbaseSettings
|
|
15
15
|
def find_ymls
|
16
16
|
main_file = "#{Rails.root.to_s}/config/couchbase.yml"
|
17
17
|
couchbase_main_file = File.exists?(main_file) ? [main_file] : []
|
18
|
+
couchbase_main_file
|
18
19
|
end
|
19
20
|
|
20
21
|
def create_cbsettings_class(yml_file)
|
@@ -27,6 +28,10 @@ module CouchbaseSettings
|
|
27
28
|
#Rails.logger.debug "hash: key = #{key}, value = #{value}"
|
28
29
|
klass.define_singleton_method(key){ value }
|
29
30
|
end
|
31
|
+
|
32
|
+
# add a method to inspect the entire yml hash
|
33
|
+
klass.define_singleton_method("inspect", hash)
|
34
|
+
|
30
35
|
klass.class_eval do
|
31
36
|
def self.method_missing(method_id,*args)
|
32
37
|
raise UndefinedCouchbaseSettings, "#{method_id} is not defined in #{self.to_s}"
|