jdbc-postgres 9.2.1004 → 9.3.1100

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
  SHA1:
3
- metadata.gz: 75e322a6022073195622a9b945c38c4de9ed995c
4
- data.tar.gz: a2de53052a611239b8de22d391008eb5d40cc71d
3
+ metadata.gz: 9dcdbec5b3da166f9909111a4c372624348a1d04
4
+ data.tar.gz: ef3b99c841f6c713393af13025d444ed47cf49be
5
5
  SHA512:
6
- metadata.gz: 29e60157ef5721c6ebe8cf40051307e2ecb425234e8fffa704be46637780c5b9c3b831604b08da7c74f2b3b9f067a15279aca8a720445c17d65c5bc0647ec16c
7
- data.tar.gz: bba2ccca3f3f38a1784c603d7cb5c1d4dbcb400977b7dc2896a4a86621603307ca22b3978b63cc3c8b0b8eff25ef4410cfd24943fe12ee7db9a5bb26999baa88
6
+ metadata.gz: c9a8c3ef882364e49ff0a30d341c6a47fd0b47ffe4a9ecf8c4ea8734d233ce55450d3021f3677e8d94ad8951ee008a09638145c67b6d6b9ea1d0818805854f76
7
+ data.tar.gz: 34ee48a571200a148bfe9172c67c404a0964bf5651f4613109764249b82b447b9d06a30ac8bff26df50d767c3fe9090a43946d16634000aa5f07ee488d547f32
@@ -6,12 +6,21 @@ module Jdbc
6
6
 
7
7
  def self.driver_jar
8
8
  version_jdbc_version = DRIVER_VERSION.split( '.' )
9
+ if ( jdbc_version = self.jdbc_version ).is_a? Float
10
+ jdbc_version = (jdbc_version * 10).to_i
11
+ end
9
12
  version_jdbc_version << jdbc_version
10
13
  'postgresql-%s.%s-%s.jdbc%d.jar' % version_jdbc_version
11
14
  end
12
15
 
13
16
  def self.load_driver(method = :load)
14
17
  send method, driver_jar
18
+ rescue LoadError => e
19
+ if jdbc_version < 4
20
+ warn "failed to load postgresql (driver) jar, please note that we no longer " <<
21
+ "include JDBC 3.x support, on Java < 6 please use gem 'jdbc-postgres', '~> 9.2'"
22
+ end
23
+ raise e
15
24
  end
16
25
 
17
26
  def self.driver_name
@@ -20,10 +29,16 @@ module Jdbc
20
29
 
21
30
  private
22
31
 
23
- # JDBC version 4 if Java >=1.6, else 3
24
32
  def self.jdbc_version
25
- vers = Java::JavaLang::System.get_property( "java.specification.version" )
26
- ( ( vers.split( '.' ).map(&:to_i) <=> [ 1, 6 ] ) >= 0 ) ? 4 : 3
33
+ version = ENV_JAVA[ 'java.specification.version' ]
34
+ version = version.split('.').last.to_i # '1.7' => 7
35
+ if version < 6
36
+ 3 # not supported
37
+ elsif version == 6
38
+ 4
39
+ else # JDBC >= 4.1
40
+ 4.1
41
+ end
27
42
  end
28
43
 
29
44
  if defined?(JRUBY_VERSION) && # enable backwards-compat behavior :
@@ -1,6 +1,6 @@
1
1
  module Jdbc
2
2
  module Postgres
3
- DRIVER_VERSION = '9.2.1004'
3
+ DRIVER_VERSION = '9.3.1100'
4
4
  VERSION = DRIVER_VERSION
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jdbc-postgres
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.2.1004
4
+ version: 9.3.1100
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Sieger, Ola Bini and JRuby contributors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-06 00:00:00.000000000 Z
11
+ date: 2013-11-07 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Install this gem `require 'jdbc/postgres'` and invoke `Jdbc::Postgres.load_driver` within JRuby to load the driver.
14
14
  email: nick@nicksieger.com, ola.bini@gmail.com
@@ -18,8 +18,8 @@ extra_rdoc_files: []
18
18
  files:
19
19
  - README.md
20
20
  - LICENSE.txt
21
- - lib/postgresql-9.2-1004.jdbc4.jar
22
- - lib/postgresql-9.2-1004.jdbc3.jar
21
+ - lib/postgresql-9.3-1100.jdbc41.jar
22
+ - lib/postgresql-9.3-1100.jdbc4.jar
23
23
  - lib/jdbc/postgres.rb
24
24
  - lib/jdbc/postgres/version.rb
25
25
  homepage: https://github.com/jruby/activerecord-jdbc-adapter