couchrest_model_config 0.1.3 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,6 @@
1
+ v0.2.0
2
+ -- ok, new tack - forget all the other attempts to fix the rails reloading problem. this should fix it.
3
+
1
4
  v0.1.3
2
5
  -- simpler method for fixing rails reloading problem now in a railtie.
3
6
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.3
1
+ 0.2.0
@@ -3,4 +3,3 @@ require 'couchrest_model_config/config'
3
3
  require 'couchrest_model_config/model'
4
4
  require 'couchrest_model_config/server'
5
5
  require 'couchrest_model_config/couchrest_model_base.rb'
6
- require 'couchrest_model_config/railtie' if defined?(Rails)
@@ -5,6 +5,7 @@ module CouchRest
5
5
  attr_reader :environments
6
6
 
7
7
  def initialize(klass)
8
+ klass = klass.to_s.camelize.constantize unless klass.class == Class rescue klass
8
9
  @klass = klass
9
10
  @environments = {}
10
11
  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: 29
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 1
9
- - 3
10
- version: 0.1.3
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