couchrest_model_config 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +3 -0
- data/VERSION +1 -1
- data/lib/couchrest_model_config.rb +1 -0
- data/lib/couchrest_model_config/railtie.rb +31 -0
- metadata +4 -3
data/CHANGELOG
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.3
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module CouchRest
|
2
|
+
module Model
|
3
|
+
module Config
|
4
|
+
class Railtie < ::Rails::Railtie
|
5
|
+
config.to_prepare do
|
6
|
+
module ::CouchRest
|
7
|
+
module Model
|
8
|
+
class Base
|
9
|
+
class_eval <<-EOS, __FILE__, __LINE__ + 1
|
10
|
+
def self.database
|
11
|
+
CouchRest::Model::Config.for(self).current_database
|
12
|
+
end
|
13
|
+
|
14
|
+
def database
|
15
|
+
CouchRest::Model::Config.for(self.class).current_database
|
16
|
+
end
|
17
|
+
EOS
|
18
|
+
|
19
|
+
class << self
|
20
|
+
def use_database(*args)
|
21
|
+
raise "We're sorry, but the `use_database` method is not supported with couchrest_model_config."
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: couchrest_model_config
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 3
|
10
|
+
version: 0.1.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Matt Parker
|
@@ -97,6 +97,7 @@ files:
|
|
97
97
|
- lib/couchrest_model_config/config.rb
|
98
98
|
- lib/couchrest_model_config/couchrest_model_base.rb
|
99
99
|
- lib/couchrest_model_config/model.rb
|
100
|
+
- lib/couchrest_model_config/railtie.rb
|
100
101
|
- lib/couchrest_model_config/server.rb
|
101
102
|
- readme.markdown
|
102
103
|
has_rdoc: true
|