jdbc-mssql 0.9.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: 54ba0b6312f2e3f016bb1118ffae21d28160e842b93a4bd21fc88717f7d58cb4
4
- data.tar.gz: 28a7f38ede7fb495ff55ba50605d84444c2beb6bb5765db1606e6c8213a235e6
3
+ metadata.gz: 9da9d2eae8a64cf57a2fe0ff4fe038874b3cc5e2ad14db380e93fe24aa3bb725
4
+ data.tar.gz: 8f5a41c9d7187ef7aaf35b2eea346c93644141052754f090589207fa3e6fe7eb
5
5
  SHA512:
6
- metadata.gz: 001bcafbdd676d5928b11da12fef64595248e9cf134f621eeb2a7c5f716d61e4f9f6d62ad429a5e9b153360c41a73af0ac8f216dab7d621abc9cbc959172f25b
7
- data.tar.gz: 33d33fb7e858b6441ef571d1ec93061a4397f549128bc4b7c791ef84ac9543972e4f14a761616cdbdfaf694fd6d9b981a3c8167e2a3ad937a1ebabae6c3b3b77
6
+ metadata.gz: cad4d199f23cfc86f8c24c2393556c981cc3c52244965cebf2872ab5619e31af731e3550a265d1003230ee37ceebecc49b28d0da8c0202c47545d42f9f646bae
7
+ data.tar.gz: 882885e4cc8a9201cd64b18d996cd6cb7f2bee05dc93e530afaf032fc86a8dd751f96d53e37a1fcd07d06f9312fa5f2eca39f51ebcc96e068d45a5f6c49f0ee2
data/README.md CHANGED
@@ -48,28 +48,42 @@ 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.9.0 | 8.4.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 |
71
72
  | 14 | 0.9.0 | 8.4.1 |
72
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
+
86
+
73
87
  ## Development
74
88
 
75
89
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -1,5 +1,5 @@
1
1
  module Jdbc
2
2
  module Mssql
3
- VERSION = '0.9.0'.freeze
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
- '14' => 14
11
- }.freeze
12
-
13
- JAVA_DRIVER_VERSIONS = {
14
- '1.8' => '8.4.1',
15
- '11' => '8.4.1',
16
- '14' => '8.4.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.9.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-11-10 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
- prerelease: false
21
- type: :development
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:
@@ -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.4.1.jre11.jar
68
- - lib/mssql-jdbc-8.4.1.jre14.jar
69
- - lib/mssql-jdbc-8.4.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,8 +71,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
86
71
  - !ruby/object:Gem::Version
87
72
  version: '0'
88
73
  requirements: []
89
- rubyforge_project:
90
- rubygems_version: 2.7.10
74
+ rubygems_version: 3.2.29
91
75
  signing_key:
92
76
  specification_version: 4
93
77
  summary: JDBC driver for JRuby and SQL Server / Azure SQL
Binary file
Binary file
Binary file