master_slave_adapter_tcurdt 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,4 @@
1
+ require 'active_record'
1
2
  require 'active_record/connection_adapters/abstract/database_statements'
2
3
  require 'active_record/connection_adapters/abstract/schema_statements'
3
4
 
@@ -1,7 +1,5 @@
1
1
  require 'active_record/connection_adapters/master_slave_adapter'
2
2
 
3
- require 'master_slave_adapter/active_record_extension'
4
- require 'master_slave_adapter/adapter'
5
- require 'master_slave_adapter/instance_methods_generation'
6
-
7
- require 'master_slave_adapter/version'
3
+ module MasterSlaveAdapter
4
+ autoload :Version, 'master_slave_adapter/version'
5
+ end
@@ -11,7 +11,7 @@ ActiveRecord::Base.class_eval do
11
11
  if connection.respond_to? :with_master
12
12
  connection.with_master(&block)
13
13
  else
14
- raise "no with_master"
14
+ yield
15
15
  end
16
16
  end
17
17
 
@@ -24,7 +24,7 @@ ActiveRecord::Base.class_eval do
24
24
  if connection.respond_to? :with_slave
25
25
  connection.with_slave(&block)
26
26
  else
27
- raise "no with_slave"
27
+ yield
28
28
  end
29
29
  end
30
30
 
@@ -39,7 +39,7 @@ ActiveRecord::Base.class_eval do
39
39
  if connection.respond_to? :with_consistency
40
40
  connection.with_consistency(clock, &block)
41
41
  else
42
- raise "no with_consistency"
42
+ yield
43
43
  end
44
44
  end
45
45
 
@@ -1,3 +1,3 @@
1
1
  module MasterSlaveAdapter
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 6
9
- version: 0.0.6
8
+ - 7
9
+ version: 0.0.7
10
10
  platform: ruby
11
11
  authors:
12
12
  - Mauricio Linhares
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-06-07 00:00:00 +02:00
18
+ date: 2011-06-10 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency