activerecord-jdbcsqlserver-adapter 51.0.1 → 51.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -1
- data/VERSION +1 -1
- data/activerecord-jdbcsqlserver-adapter.gemspec +1 -1
- data/lib/activerecord-jdbcsqlserver-adapter.rb +1 -1
- data/lib/jdbc_mssql_driver_loader.rb +22 -0
- data/test/cases/helper_sqlserver.rb +1 -1
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d0fc70db649cdce388b0aa9682a6c67c425953238feed9db877e597edea9a887
|
4
|
+
data.tar.gz: ae1c960295840fecfb6a6134d012e557f2ac61c2da7f1651cd10e9ceb2f23025
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d17bb43ed779b8dbb7b27c12d64e00666368dd1aa7eec19a1b2ef19db4c7202dd2f4a81058ade3dcc4c4977630a4109e952f43cec683f728fcc05cc3939055c
|
7
|
+
data.tar.gz: bd361d607277b673f3e2f83428024730c9aa86a08b38cf5e01677dbd2b0ba7e817338c58efff22bf33ca9a915f0ae8030624f5d93bfb84a3053d04a81e05c7f1
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
## v51.1.0
|
2
|
+
|
3
|
+
* Updated activerecord-jdbc-adapter dependecy to fix an issue with inserts on tables with composite primary keys
|
4
|
+
* Changed how the jdbc driver is loaded so that other drivers can be used if needed
|
5
|
+
|
1
6
|
## v51.0.0
|
2
7
|
|
3
8
|
* Forked original gem to provide JRuby support
|
@@ -55,4 +60,3 @@
|
|
55
60
|
#### Added
|
56
61
|
|
57
62
|
* Support MismatchedForeignKey exception.
|
58
|
-
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
51.0
|
1
|
+
51.1.0
|
@@ -17,6 +17,6 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.require_paths = ['lib']
|
18
18
|
|
19
19
|
spec.add_dependency 'activerecord', '~> 5.1.0', '>= 5.1.7'
|
20
|
-
spec.add_dependency 'activerecord-jdbc-adapter' , '~> 51.
|
20
|
+
spec.add_dependency 'activerecord-jdbc-adapter' , '~> 51.8'
|
21
21
|
spec.add_dependency 'jdbc-mssql', '>= 0.6.0'
|
22
22
|
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
require 'active_record/connection_adapters/sqlserver/core_ext/date_time'
|
3
3
|
|
4
4
|
# Load the jar file for the jdbc driver
|
5
|
-
|
5
|
+
require_relative './jdbc_mssql_driver_loader'
|
6
6
|
|
7
7
|
# Standadard arjdbc functionality
|
8
8
|
require 'arjdbc/abstract/connection_management'
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module JdbcMssqlDriverLoader
|
2
|
+
def self.check_and_maybe_load_driver
|
3
|
+
driver_name = "com.microsoft.sqlserver.jdbc.SQLServerDriver"
|
4
|
+
if (Java::JavaClass.for_name(driver_name) rescue nil)
|
5
|
+
driver = Java::ComMicrosoftSqlserverJdbc::SQLServerDriver.new
|
6
|
+
which = driver
|
7
|
+
.getClass().getClassLoader().loadClass(driver_name)
|
8
|
+
.getProtectionDomain().getCodeSource().getLocation().to_s
|
9
|
+
warn "You already required a mssql jdbc driver (#{which}), skipping gem jdbc-mssql"
|
10
|
+
|
11
|
+
major_version = driver.major_version
|
12
|
+
required_major_version = 8
|
13
|
+
if major_version < required_major_version
|
14
|
+
raise "MSSQL jdbc driver version is to old (given major version #{major_version} < required major version #{required_major_version})"
|
15
|
+
end
|
16
|
+
else
|
17
|
+
require "jdbc/mssql"
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
check_and_maybe_load_driver
|
22
|
+
end
|
@@ -9,7 +9,7 @@ require 'support/load_schema_sqlserver'
|
|
9
9
|
require 'support/coerceable_test_sqlserver'
|
10
10
|
require 'support/sql_counter_sqlserver'
|
11
11
|
require 'support/connection_reflection'
|
12
|
-
require 'mocha/
|
12
|
+
require 'mocha/minitest'
|
13
13
|
|
14
14
|
module ActiveRecord
|
15
15
|
class TestCase < ActiveSupport::TestCase
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-jdbcsqlserver-adapter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 51.0
|
4
|
+
version: 51.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ken Collins
|
@@ -15,7 +15,7 @@ authors:
|
|
15
15
|
autorequire:
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
|
-
date: 2020-
|
18
|
+
date: 2020-12-18 00:00:00.000000000 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
requirement: !ruby/object:Gem::Requirement
|
@@ -27,8 +27,8 @@ dependencies:
|
|
27
27
|
- !ruby/object:Gem::Version
|
28
28
|
version: 5.1.7
|
29
29
|
name: activerecord
|
30
|
-
prerelease: false
|
31
30
|
type: :runtime
|
31
|
+
prerelease: false
|
32
32
|
version_requirements: !ruby/object:Gem::Requirement
|
33
33
|
requirements:
|
34
34
|
- - "~>"
|
@@ -42,15 +42,15 @@ dependencies:
|
|
42
42
|
requirements:
|
43
43
|
- - "~>"
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
version: '51.
|
45
|
+
version: '51.8'
|
46
46
|
name: activerecord-jdbc-adapter
|
47
|
-
prerelease: false
|
48
47
|
type: :runtime
|
48
|
+
prerelease: false
|
49
49
|
version_requirements: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
51
|
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: '51.
|
53
|
+
version: '51.8'
|
54
54
|
- !ruby/object:Gem::Dependency
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|
56
56
|
requirements:
|
@@ -58,8 +58,8 @@ dependencies:
|
|
58
58
|
- !ruby/object:Gem::Version
|
59
59
|
version: 0.6.0
|
60
60
|
name: jdbc-mssql
|
61
|
-
prerelease: false
|
62
61
|
type: :runtime
|
62
|
+
prerelease: false
|
63
63
|
version_requirements: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
65
|
- - ">="
|
@@ -157,6 +157,7 @@ files:
|
|
157
157
|
- lib/activerecord-sqlserver-adapter.rb
|
158
158
|
- lib/arel/visitors/sqlserver.rb
|
159
159
|
- lib/arel_sqlserver.rb
|
160
|
+
- lib/jdbc_mssql_driver_loader.rb
|
160
161
|
- test/appveyor/dbsetup.ps1
|
161
162
|
- test/appveyor/dbsetup.sql
|
162
163
|
- test/bin/setup.sh
|
@@ -243,8 +244,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
243
244
|
- !ruby/object:Gem::Version
|
244
245
|
version: '0'
|
245
246
|
requirements: []
|
246
|
-
|
247
|
-
rubygems_version: 2.7.9
|
247
|
+
rubygems_version: 3.0.6
|
248
248
|
signing_key:
|
249
249
|
specification_version: 4
|
250
250
|
summary: ActiveRecord JDBC SQL Server Adapter.
|