jdbc-mssql 0.8.0-java → 12.2.0-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 05fd89007c7b0d252b19cd27a62a320a991ff2a0c346c591cba831e034625c25
4
- data.tar.gz: 46c75a52657f78bf7fc039eee613a3f2509cbdbf5d01a52621485efae7388c30
3
+ metadata.gz: 9da9d2eae8a64cf57a2fe0ff4fe038874b3cc5e2ad14db380e93fe24aa3bb725
4
+ data.tar.gz: 8f5a41c9d7187ef7aaf35b2eea346c93644141052754f090589207fa3e6fe7eb
5
5
  SHA512:
6
- metadata.gz: 46f2a523e889f0e16a186cb5435e5f4181370796f6cb8164923deb19a78074bcaa5e950ed721d393404fdd9ea812f026b528d55272012840c45d2d1c71dd4538
7
- data.tar.gz: f0a58cf2d03fbed17752b8f01c7503777e68e9b1518387de8d4b645447cb32d077f90143ddc1aff4a653212f7543430646859139f6cfa9221f26373a37de43cf
6
+ metadata.gz: cad4d199f23cfc86f8c24c2393556c981cc3c52244965cebf2872ab5619e31af731e3550a265d1003230ee37ceebecc49b28d0da8c0202c47545d42f9f646bae
7
+ data.tar.gz: 882885e4cc8a9201cd64b18d996cd6cb7f2bee05dc93e530afaf032fc86a8dd751f96d53e37a1fcd07d06f9312fa5f2eca39f51ebcc96e068d45a5f6c49f0ee2
data/README.md CHANGED
@@ -48,26 +48,41 @@ end
48
48
 
49
49
  For more details follow Microsoft's documentation and JRuby conventions to call java methods.
50
50
 
51
- ## Supported Java versions
51
+ ## Supported versions
52
52
 
53
- For supported Java version use Gem versions as per below table:
53
+ Supported Java version are 8, 11 or greater
54
54
 
55
- | Java version | Gem version | used driver |
56
- | ------------ | ------------- | ----------- |
57
- | 8 | 0.8.0 | 8.2.1 |
58
- | 11 | 0.8.0 | 8.2.1 |
55
+ Starting from driver version `12.2.0` gem follows same version as jdbc driver
59
56
 
60
- ## Other Java versions
57
+ ## Old Gems versioning
61
58
 
62
- For other Java version use Gem versions as per below table:
59
+ Do not use these versions unless you have to such as java 7, 9, or 10
60
+
61
+ For use Gem versions as per below table:
63
62
 
64
63
  | Java version | Gem version | used driver |
65
64
  | ------------ | ------------- | ----------- |
66
65
  | 7 | 0.6.0 | 6.4.0 |
66
+ | 8 | 0.8.0 | 8.2.1 |
67
67
  | 9 | 0.6.0 | 6.4.0 |
68
68
  | 10 | 0.6.0 | 7.0.0 |
69
+ | 11 | 0.9.0 | 8.4.1 |
69
70
  | 12 | 0.7.0 | 7.4.1 |
70
71
  | 13 | 0.8.0 | 8.2.1 |
72
+ | 14 | 0.9.0 | 8.4.1 |
73
+
74
+ ## Other usage
75
+
76
+ This gem is commonly used with the `activerecord-jdbc-alt-adapter` gem
77
+
78
+ For more information visit:
79
+
80
+ - [activerecord-jdbc-alt-adapter](https://rubygems.org/gems/activerecord-jdbc-alt-adapter) gem.
81
+
82
+ - [activerecord-jdbc-alt-adapter](https://github.com/JesseChavez/activerecord-jdbc-adapter) repository.
83
+
84
+ - [wombat61](https://github.com/JesseChavez/wombat61) Rails 6.1 sample application.
85
+
71
86
 
72
87
  ## Development
73
88
 
@@ -1,5 +1,5 @@
1
1
  module Jdbc
2
2
  module Mssql
3
- VERSION = '0.8.0'
3
+ VERSION = '12.2.0'.freeze
4
4
  end
5
5
  end
data/lib/jdbc/mssql.rb CHANGED
@@ -4,40 +4,34 @@ require 'jdbc/mssql/version'
4
4
 
5
5
  module Jdbc
6
6
  module Mssql
7
- JAVA_VERSIONS = {
8
- '1.8' => 8,
9
- '11' => 11,
10
- '13' => 13
11
- }.freeze
12
-
13
- JAVA_DRIVER_VERSIONS = {
14
- '1.8' => '8.2.1',
15
- '11' => '8.2.1',
16
- '13' => '8.2.1'
17
- }.freeze
18
-
19
7
  def self.java_specification_version
20
8
  ENV_JAVA['java.specification.version']
21
9
  end
22
10
 
23
11
  def self.jre_version
24
- JAVA_VERSIONS[java_specification_version]
12
+ java_specification_version.split('.').last.to_i
25
13
  end
26
14
 
27
15
  def self.driver_version
28
- JAVA_DRIVER_VERSIONS[java_specification_version]
16
+ '12.2.0'
17
+ end
18
+
19
+ def self.effective_jre_version
20
+ if jre_version >= 11
21
+ 11
22
+ elsif jre_version == 8
23
+ 8
24
+ end
29
25
  end
30
26
 
31
27
  def self.jar_file
32
- "mssql-jdbc-#{driver_version}.jre#{jre_version}.jar"
28
+ "mssql-jdbc-#{driver_version}.jre#{effective_jre_version}.jar"
33
29
  end
34
30
 
35
31
  def self.load_driver
36
32
  warn 'loading JDBC driver on require "jdbc/mssql"' if $VERBOSE
37
33
 
38
- if jre_version.nil? || driver_version.nil?
39
- raise 'No JDBC driver for your java version'
40
- end
34
+ raise 'No JDBC driver for your java version' unless jre_version > 7
41
35
 
42
36
  require jar_file
43
37
  end
Binary file
Binary file
metadata CHANGED
@@ -1,29 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jdbc-mssql
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 12.2.0
5
5
  platform: java
6
6
  authors:
7
7
  - Jesse Chavez
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-03-09 00:00:00.000000000 Z
11
+ date: 2023-02-03 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- requirement: !ruby/object:Gem::Requirement
15
- requirements:
16
- - - "~>"
17
- - !ruby/object:Gem::Version
18
- version: 2.1.4
19
- name: bundler
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: 2.1.4
27
13
  - !ruby/object:Gem::Dependency
28
14
  requirement: !ruby/object:Gem::Requirement
29
15
  requirements:
@@ -31,8 +17,8 @@ dependencies:
31
17
  - !ruby/object:Gem::Version
32
18
  version: '12.0'
33
19
  name: rake
34
- type: :development
35
20
  prerelease: false
21
+ type: :development
36
22
  version_requirements: !ruby/object:Gem::Requirement
37
23
  requirements:
38
24
  - - "~>"
@@ -45,8 +31,8 @@ dependencies:
45
31
  - !ruby/object:Gem::Version
46
32
  version: '3.0'
47
33
  name: rspec
48
- type: :development
49
34
  prerelease: false
35
+ type: :development
50
36
  version_requirements: !ruby/object:Gem::Requirement
51
37
  requirements:
52
38
  - - "~>"
@@ -64,9 +50,8 @@ files:
64
50
  - README.md
65
51
  - lib/jdbc/mssql.rb
66
52
  - lib/jdbc/mssql/version.rb
67
- - lib/mssql-jdbc-8.2.1.jre11.jar
68
- - lib/mssql-jdbc-8.2.1.jre13.jar
69
- - lib/mssql-jdbc-8.2.1.jre8.jar
53
+ - lib/mssql-jdbc-12.2.0.jre11.jar
54
+ - lib/mssql-jdbc-12.2.0.jre8.jar
70
55
  homepage: https://github.com/JesseChavez/jdbc-mssql
71
56
  licenses:
72
57
  - MIT
@@ -86,7 +71,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
86
71
  - !ruby/object:Gem::Version
87
72
  version: '0'
88
73
  requirements: []
89
- rubygems_version: 3.0.6
74
+ rubygems_version: 3.2.29
90
75
  signing_key:
91
76
  specification_version: 4
92
77
  summary: JDBC driver for JRuby and SQL Server / Azure SQL
Binary file
Binary file
Binary file