activerecord-sqlserver-adapter 2.3.21 → 2.3.22

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 CHANGED
@@ -1,5 +1,10 @@
1
1
 
2
- * 2.3.21*
2
+ * 2.3.22 *
3
+
4
+ * Make #rollback_db_transaction smarter.
5
+
6
+
7
+ * 2.3.21 *
3
8
 
4
9
  * Add support/test around handling of float/real column types [Lucas Maxwell]
5
10
 
@@ -147,7 +147,7 @@ module ActiveRecord
147
147
  class SQLServerAdapter < AbstractAdapter
148
148
 
149
149
  ADAPTER_NAME = 'SQLServer'.freeze
150
- VERSION = '2.3.21'.freeze
150
+ VERSION = '2.3.22'.freeze
151
151
  DATABASE_VERSION_REGEXP = /Microsoft SQL Server\s+(\d{4})/
152
152
  SUPPORTED_VERSIONS = [2000,2005,2008].freeze
153
153
  LIMITABLE_TYPES = ['string','integer','float','char','nchar','varchar','nvarchar'].to_set.freeze
@@ -451,7 +451,7 @@ module ActiveRecord
451
451
  end
452
452
 
453
453
  def rollback_db_transaction
454
- do_execute "ROLLBACK TRANSACTION" rescue nil
454
+ do_execute "IF @@TRANCOUNT > 0 ROLLBACK TRANSACTION"
455
455
  end
456
456
 
457
457
  def create_savepoint
@@ -485,7 +485,7 @@ class AdapterTestSqlserver < ActiveRecord::TestCase
485
485
  assert @dirty_t2, 'Should have a Task record from within block above.'
486
486
  assert @dirty_t2.starting, 'Should have a dirty date.'
487
487
  assert_nil Task.find(@t2.id).starting, 'Should be nil again from botched transaction above.'
488
- end unless active_record_2_point_2? # Transactions in tests are a bit screwy in 2.2.
488
+ end
489
489
 
490
490
  end
491
491
 
@@ -36,7 +36,7 @@ class EagerAssociationTest < ActiveRecord::TestCase
36
36
  :conditions => { 'authors.name' => 'David', 'comments.body' => 'go crazy' })
37
37
  assert_equal 0, posts.size
38
38
  end
39
- end unless active_record_2_point_2?
39
+ end
40
40
 
41
41
 
42
42
  end
@@ -114,8 +114,6 @@ module ActiveRecord
114
114
  def sqlserver_2000? ; ActiveRecord::Base.connection.sqlserver_2000? ; end
115
115
  def sqlserver_2005? ; ActiveRecord::Base.connection.sqlserver_2005? ; end
116
116
  def sqlserver_2008? ; ActiveRecord::Base.connection.sqlserver_2008? ; end
117
- def active_record_2_point_2? ; ActiveRecord::VERSION::MAJOR == 2 && ActiveRecord::VERSION::MINOR == 2 ; end
118
- def active_record_2_point_3? ; ActiveRecord::VERSION::MAJOR == 2 && ActiveRecord::VERSION::MINOR == 3 ; end
119
117
  def ruby_19? ; RUBY_VERSION >= '1.9' ; end
120
118
  end
121
119
  def assert_sql(*patterns_to_match)
@@ -134,8 +132,6 @@ module ActiveRecord
134
132
  def sqlserver_2000? ; self.class.sqlserver_2000? ; end
135
133
  def sqlserver_2005? ; self.class.sqlserver_2005? ; end
136
134
  def sqlserver_2008? ; self.class.sqlserver_2008? ; end
137
- def active_record_2_point_2? ; self.class.active_record_2_point_2? ; end
138
- def active_record_2_point_3? ; self.class.active_record_2_point_3? ; end
139
135
  def ruby_19? ; self.class.ruby_19? ; end
140
136
  end
141
137
  end
@@ -75,7 +75,7 @@ class TransactionTestSqlserver < ActiveRecord::TestCase
75
75
  assert_equal 0, Ship.connection.open_transactions
76
76
  end
77
77
 
78
- end unless active_record_2_point_2?
78
+ end
79
79
 
80
80
 
81
81
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-sqlserver-adapter
3
3
  version: !ruby/object:Gem::Version
4
- hash: 41
4
+ hash: 47
5
5
  prerelease:
6
6
  segments:
7
7
  - 2
8
8
  - 3
9
- - 21
10
- version: 2.3.21
9
+ - 22
10
+ version: 2.3.22
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ken Collins
@@ -19,7 +19,7 @@ autorequire:
19
19
  bindir: bin
20
20
  cert_chain: []
21
21
 
22
- date: 2011-08-25 00:00:00 -04:00
22
+ date: 2011-10-04 00:00:00 -04:00
23
23
  default_executable:
24
24
  dependencies:
25
25
  - !ruby/object:Gem::Dependency