couchrest_model_config 0.1.3 → 0.2.0
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/CHANGELOG +3 -0
- data/VERSION +1 -1
- data/lib/couchrest_model_config.rb +0 -1
- data/lib/couchrest_model_config/model.rb +1 -0
- metadata +4 -5
- data/lib/couchrest_model_config/railtie.rb +0 -31
data/CHANGELOG
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.2.0
|
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: 23
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 2
|
9
|
+
- 0
|
10
|
+
version: 0.2.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Matt Parker
|
@@ -97,7 +97,6 @@ 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
|
101
100
|
- lib/couchrest_model_config/server.rb
|
102
101
|
- readme.markdown
|
103
102
|
has_rdoc: true
|
@@ -1,31 +0,0 @@
|
|
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
|