activerecord-jdbc-alt-adapter 60.1.0-java → 60.3.0-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.nvimlog +0 -0
- data/README.md +6 -6
- data/lib/arjdbc/jdbc/adapter_java.jar +0 -0
- data/lib/arjdbc/mssql/connection_methods.rb +3 -0
- data/lib/arjdbc/version.rb +1 -1
- data/src/java/arjdbc/postgresql/PostgreSQLRubyJdbcConnection.java +14 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fef06d854287aa90265b3470d9e126f556afee76bcf75d6efd887c0390b3570e
|
4
|
+
data.tar.gz: 45a22fd5240546ac6ae2de94bff4ced69c6155d0e78bce20feeabe65c51735e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b8742114ade9460ca8f7bb5fe13db0f2d1ee5195e0d93aebcc68dd6a940c3601a8a7a641c02165adb37a2e458034eb438a0ccd6f7110b51a6427f4c37f3d5ce
|
7
|
+
data.tar.gz: 7f73c8c6bc76ff739af784a0d01faa0918c54e2cfa99e4394699ce9cd845ca6519561a4f59ef5002ec0c3a6cc6e17c21617ee975fce031ec4b1fb450019210f6
|
data/.nvimlog
ADDED
File without changes
|
data/README.md
CHANGED
@@ -10,10 +10,10 @@ stable of this adapter and Rails
|
|
10
10
|
|
11
11
|
| Gem Version | Rails Version | min JRuby |
|
12
12
|
| ----------- | ------------- | --------- |
|
13
|
-
| 50.
|
14
|
-
| 51.
|
15
|
-
| 52.
|
16
|
-
| 60.
|
13
|
+
| 50.7.0 | 5.0.7 | 9.1.x |
|
14
|
+
| 51.7.0 | 5.1.7 | 9.1.x |
|
15
|
+
| 52.6.0 | 5.2.4 | 9.1.x |
|
16
|
+
| 60.1.0 | 6.0.3 | 9.2.9 |
|
17
17
|
|
18
18
|
This adapter passes most of the Rails tests (ActiveRecord tests) with the
|
19
19
|
exception of some test that are not compatible with the SQL Server. To run
|
@@ -28,8 +28,8 @@ Add the following to your `Gemfile`:
|
|
28
28
|
```ruby
|
29
29
|
platforms :jruby do
|
30
30
|
# Use jdbc as the database for Active Record
|
31
|
-
gem 'activerecord-jdbc-alt-adapter', '~> 60.
|
32
|
-
gem 'jdbc-mssql', '~> 0.
|
31
|
+
gem 'activerecord-jdbc-alt-adapter', '~> 60.1.0'
|
32
|
+
gem 'jdbc-mssql', '~> 0.9.0'
|
33
33
|
end
|
34
34
|
```
|
35
35
|
|
Binary file
|
@@ -78,12 +78,15 @@ ArJdbc::ConnectionMethods.module_eval do
|
|
78
78
|
url << "sendTimeAsDatetime=#{config[:send_time_as_datetime] || false};"
|
79
79
|
url << "loginTimeout=#{config[:login_timeout].to_i};" if config[:login_timeout]
|
80
80
|
url << "lockTimeout=#{config[:lock_timeout].to_i};"
|
81
|
+
url << "encrypt=#{config[:encrypt]};" if config.key?(:encrypt)
|
82
|
+
url << "trustServerCertificate=#{config[:trust_server_certificate]};" if config.key?(:trust_server_certificate)
|
81
83
|
app = config[:appname] || config[:application]
|
82
84
|
url << "applicationName=#{app};" if app
|
83
85
|
isc = config[:integrated_security] # Win only - needs sqljdbc_auth.dll
|
84
86
|
url << "integratedSecurity=#{isc};" unless isc.nil?
|
85
87
|
url
|
86
88
|
end
|
89
|
+
|
87
90
|
jdbc_connection(config)
|
88
91
|
end
|
89
92
|
alias_method :jdbcsqlserver_connection, :sqlserver_connection
|
data/lib/arjdbc/version.rb
CHANGED
@@ -387,7 +387,20 @@ public class PostgreSQLRubyJdbcConnection extends arjdbc.jdbc.RubyJdbcConnection
|
|
387
387
|
RubyDate rubyDate = (RubyDate) value;
|
388
388
|
DateTime dt = rubyDate.getDateTime();
|
389
389
|
// pgjdbc needs adjustment for default JVM timezone
|
390
|
-
|
390
|
+
//
|
391
|
+
// If the date is a day when Daylight savings starts (2am changed to 3am),
|
392
|
+
// And we are in a positive GMT timezone (Australia/Melbourne)
|
393
|
+
// Then removing milliseconds equal to the TimeZone (+11 GMT),
|
394
|
+
// will result in the date being the previous day 23:00, because of the missing hour.
|
395
|
+
// So we check if the date after the shift is outside of daylight time and remove an hours worth of milliseconds.
|
396
|
+
final long dateMillis = dt.getMillis();
|
397
|
+
long offset = TZ_DEFAULT.getOffset(dt.getMillis());
|
398
|
+
if (TZ_DEFAULT.inDaylightTime(new Date(dt.getMillis())) && !TZ_DEFAULT.inDaylightTime(new Date(dateMillis - offset))) {
|
399
|
+
offset -= 3600000; // 1 hour
|
400
|
+
}
|
401
|
+
Date utcShiftedDate = new Date(dateMillis - offset);
|
402
|
+
|
403
|
+
statement.setDate(index, utcShiftedDate);
|
391
404
|
return;
|
392
405
|
}
|
393
406
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-jdbc-alt-adapter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 60.
|
4
|
+
version: 60.3.0
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Nick Sieger, Ola Bini, Karol Bucek and JRuby contributors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-02-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -17,8 +17,8 @@ dependencies:
|
|
17
17
|
- !ruby/object:Gem::Version
|
18
18
|
version: 6.0.0
|
19
19
|
name: activerecord
|
20
|
-
type: :runtime
|
21
20
|
prerelease: false
|
21
|
+
type: :runtime
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
@@ -38,6 +38,7 @@ extensions: []
|
|
38
38
|
extra_rdoc_files: []
|
39
39
|
files:
|
40
40
|
- ".gitignore"
|
41
|
+
- ".nvimlog"
|
41
42
|
- ".travis.yml"
|
42
43
|
- ".yardopts"
|
43
44
|
- CONTRIBUTING.md
|
@@ -264,7 +265,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
264
265
|
- !ruby/object:Gem::Version
|
265
266
|
version: '0'
|
266
267
|
requirements: []
|
267
|
-
rubygems_version: 3.
|
268
|
+
rubygems_version: 3.2.29
|
268
269
|
signing_key:
|
269
270
|
specification_version: 4
|
270
271
|
summary: ActiveRecord JDBC adapter, for use within JRuby on Rails and SQL Server
|