master_slave_adapter 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +4 -0
- data/lib/active_record/connection_adapters/master_slave_adapter.rb +4 -1
- data/lib/active_record/connection_adapters/master_slave_adapter/version.rb +1 -1
- data/spec/common/master_slave_adapter_spec.rb +2 -4
- data/spec/common/support/mysql_consistency_examples.rb +1 -2
- metadata +2 -2
data/CHANGELOG.md
CHANGED
@@ -210,6 +210,10 @@ module ActiveRecord
|
|
210
210
|
connections.each { |connection| connection.clear_query_cache }
|
211
211
|
end
|
212
212
|
|
213
|
+
def outside_transaction?
|
214
|
+
nil
|
215
|
+
end
|
216
|
+
|
213
217
|
# ADAPTER INTERFACE DELEGATES ===========================================
|
214
218
|
|
215
219
|
def self.rescued_delegate(*methods)
|
@@ -249,7 +253,6 @@ module ActiveRecord
|
|
249
253
|
:release_savepoint,
|
250
254
|
:current_savepoint_name,
|
251
255
|
:begin_db_transaction,
|
252
|
-
:outside_transaction?,
|
253
256
|
:add_limit!,
|
254
257
|
:default_sequence_name,
|
255
258
|
:reset_sequence!,
|
@@ -183,8 +183,7 @@ describe ActiveRecord::ConnectionAdapters::MasterSlaveAdapter do
|
|
183
183
|
%w(begin_db_transaction
|
184
184
|
commit_db_transaction
|
185
185
|
increment_open_transactions
|
186
|
-
decrement_open_transactions
|
187
|
-
outside_transaction?).each do |txstmt|
|
186
|
+
decrement_open_transactions).each do |txstmt|
|
188
187
|
master_connection.
|
189
188
|
should_receive(txstmt).exactly(1).times
|
190
189
|
end
|
@@ -209,8 +208,7 @@ describe ActiveRecord::ConnectionAdapters::MasterSlaveAdapter do
|
|
209
208
|
master_connection.
|
210
209
|
should_receive(txstmt).exactly(1).times
|
211
210
|
end
|
212
|
-
|
213
|
-
should_receive('outside_transaction?').exactly(2).times
|
211
|
+
|
214
212
|
master_connection.
|
215
213
|
should_receive('open_transactions').exactly(3).times.
|
216
214
|
and_return(0, 1, 0)
|
@@ -107,8 +107,7 @@ shared_examples_for 'mysql consistency' do
|
|
107
107
|
%w(begin_db_transaction
|
108
108
|
commit_db_transaction
|
109
109
|
increment_open_transactions
|
110
|
-
decrement_open_transactions
|
111
|
-
outside_transaction?).each do |txstmt|
|
110
|
+
decrement_open_transactions).each do |txstmt|
|
112
111
|
master_connection.should_receive(txstmt).exactly(1).times
|
113
112
|
end
|
114
113
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: master_slave_adapter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -15,7 +15,7 @@ authors:
|
|
15
15
|
autorequire:
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
|
-
date: 2012-11-
|
18
|
+
date: 2012-11-26 00:00:00.000000000 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: activerecord
|