activerecord-sqlserver-adapter 4.2.11 → 4.2.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/VERSION +1 -1
- data/appveyor.yml +3 -7
- data/lib/active_record/connection_adapters/sqlserver/database_statements.rb +0 -1
- data/lib/active_record/connection_adapters/sqlserver/transaction.rb +5 -0
- data/lib/active_record/tasks/sqlserver_database_tasks.rb +1 -0
- data/test/cases/rake_test_sqlserver.rb +1 -1
- data/test/cases/transaction_test_sqlserver.rb +17 -13
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 54c5914ff2792205172ac4e9f99f9f43cef3476c
|
4
|
+
data.tar.gz: 126e1fc2846d80fef6c1818ead2c3f4c125cfe3e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6dada71646dfbad6c3664eadbc4d8d29d09575b20833c1d7809d506d26e91dde269dacc3cafd21748c9683b30a1bdd1e8e72fa6880480c2f7101fa19f9d64cab
|
7
|
+
data.tar.gz: 2a7764404a937e063993ebfe641949841b06cc9d2bbebf69c8deb61c8c7427ec1527a7fa2a171a28d91316abf62626539112e67b7230c83f99b8678f4100a83f
|
data/CHANGELOG.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
4.2.
|
1
|
+
4.2.12
|
data/appveyor.yml
CHANGED
@@ -2,7 +2,7 @@ init:
|
|
2
2
|
- SET PATH=C:\Ruby%ruby_version%\bin;%PATH%
|
3
3
|
- SET PATH=C:\MinGW\msys\1.0\bin;%PATH%
|
4
4
|
- SET RAKEOPT=-rdevkit
|
5
|
-
- SET TINYTDS_VERSION=0.
|
5
|
+
- SET TINYTDS_VERSION=1.0.2
|
6
6
|
clone_depth: 5
|
7
7
|
skip_tags: true
|
8
8
|
matrix:
|
@@ -20,17 +20,13 @@ test_script:
|
|
20
20
|
- timeout /t 4 /nobreak > NUL
|
21
21
|
- sqlcmd -S ".\SQL2014" -U sa -P Password12! -i %APPVEYOR_BUILD_FOLDER%\test\appveyor\dbsetup.sql
|
22
22
|
- bundle exec rake test ACTIVERECORD_UNITTEST_DATASERVER="localhost\SQL2014"
|
23
|
-
- bundle exec rake test ACTIVERECORD_UNITTEST_DATASERVER="localhost\SQL2014" ACTIVERECORD_UNITTEST_TDSVERSION="7.3"
|
24
23
|
- ps: Stop-Service 'MSSQL$SQL2014'
|
25
24
|
- ps: Start-Service 'MSSQL$SQL2012SP1'
|
26
25
|
- timeout /t 4 /nobreak > NUL
|
27
26
|
- sqlcmd -S ".\SQL2012SP1" -U sa -P Password12! -i %APPVEYOR_BUILD_FOLDER%\test\appveyor\dbsetup.sql
|
28
27
|
- bundle exec rake test ACTIVERECORD_UNITTEST_DATASERVER="localhost\SQL2012SP1"
|
29
|
-
-
|
30
|
-
|
31
|
-
# - bundle exec rake test ACTIVERECORD_UNITTEST_HOST=%CI_AZURE_HOST% ACTIVERECORD_UNITTEST_PASS=%CI_AZURE_PASS% ACTIVERECORD_UNITTEST_AZURE=1
|
32
|
-
# - timeout /t 4 /nobreak > NUL
|
33
|
-
# - bundle exec rake test ACTIVERECORD_UNITTEST_HOST=%CI_AZURE_HOST% ACTIVERECORD_UNITTEST_PASS=%CI_AZURE_PASS% ACTIVERECORD_UNITTEST_AZURE=1 TDSVER=7.3
|
28
|
+
- timeout /t 4 /nobreak > NUL
|
29
|
+
- bundle exec rake test ACTIVERECORD_UNITTEST_HOST=%CI_AZURE_HOST% ACTIVERECORD_UNITTEST_PASS=%CI_AZURE_PASS% ACTIVERECORD_UNITTEST_AZURE=1
|
34
30
|
environment:
|
35
31
|
CI_AZURE_HOST:
|
36
32
|
secure: VChrioaIWkf9iuuaSs4cryiA4honrADgZqNC0++begg=
|
@@ -61,6 +61,7 @@ module ActiveRecord
|
|
61
61
|
command.concat(table_args)
|
62
62
|
view_args = connection.views.map { |v| Shellwords.escape(v) }
|
63
63
|
command.concat(view_args)
|
64
|
+
puts command.inspect
|
64
65
|
raise 'Error dumping database' unless Kernel.system(command.join(' '))
|
65
66
|
dump = File.read(filename)
|
66
67
|
dump.gsub!(/^USE .*$\nGO\n/, '') # Strip db USE statements
|
@@ -43,7 +43,7 @@ class SQLServerRakeCreateTest < SQLServerRakeTest
|
|
43
43
|
|
44
44
|
it 'establishes connection to database after create ' do
|
45
45
|
db_tasks.create configuration
|
46
|
-
connection.current_database.must_equal(new_database)
|
46
|
+
connection.current_database.must_equal(connection_sqlserver_azure? ? 'master' : new_database)
|
47
47
|
end
|
48
48
|
|
49
49
|
it 'creates database with default collation' do
|
@@ -32,20 +32,24 @@ class TransactionTestSQLServer < ActiveRecord::TestCase
|
|
32
32
|
end
|
33
33
|
|
34
34
|
it 'can use an isolation level and reverts back to starting isolation level' do
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
Ship.
|
40
|
-
|
41
|
-
in_level = connection.user_options_isolation_level
|
42
|
-
end
|
43
|
-
after_level = connection.user_options_isolation_level
|
44
|
-
in_level.must_match %r{serializable}i
|
45
|
-
after_level.must_match %r{read committed}i
|
46
|
-
ensure
|
47
|
-
connection.set_transaction_isolation_level 'READ COMMITTED'
|
35
|
+
in_level = nil
|
36
|
+
begin_level = connection.user_options_isolation_level
|
37
|
+
begin_level.must_match %r{read committed}i
|
38
|
+
Ship.transaction(isolation: :serializable) do
|
39
|
+
Ship.create! name: 'Black Pearl'
|
40
|
+
in_level = connection.user_options_isolation_level
|
48
41
|
end
|
42
|
+
after_level = connection.user_options_isolation_level
|
43
|
+
in_level.must_match %r{serializable}i
|
44
|
+
after_level.must_match %r{read committed}i
|
45
|
+
end
|
46
|
+
|
47
|
+
it 'can use an isolation level and reverts back to starting isolation level under exceptions' do
|
48
|
+
connection.user_options_isolation_level.must_match %r{read committed}i
|
49
|
+
lambda {
|
50
|
+
Ship.transaction(isolation: :serializable) { Ship.create! }
|
51
|
+
}.must_raise(ActiveRecord::RecordInvalid)
|
52
|
+
connection.user_options_isolation_level.must_match %r{read committed}i
|
49
53
|
end
|
50
54
|
|
51
55
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-sqlserver-adapter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.2.
|
4
|
+
version: 4.2.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ken Collins
|
@@ -14,7 +14,7 @@ authors:
|
|
14
14
|
autorequire:
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
|
-
date: 2016-
|
17
|
+
date: 2016-05-10 00:00:00.000000000 Z
|
18
18
|
dependencies:
|
19
19
|
- !ruby/object:Gem::Dependency
|
20
20
|
name: activerecord
|
@@ -188,7 +188,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
188
188
|
version: '0'
|
189
189
|
requirements: []
|
190
190
|
rubyforge_project:
|
191
|
-
rubygems_version: 2.4
|
191
|
+
rubygems_version: 2.6.4
|
192
192
|
signing_key:
|
193
193
|
specification_version: 4
|
194
194
|
summary: ActiveRecord SQL Server Adapter.
|