activerecord-jdbc-adapter 1.3.10 → 1.3.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 11049989079fcc38fceef1db1689c5db555fd37e
4
- data.tar.gz: 01a9dab21474a9548126ee80d840264f8d0018f5
3
+ metadata.gz: f03faf8d22c162a753fa8ec38946245c02349313
4
+ data.tar.gz: 30303e6bb6a9a6ce48d40bf9d3ff82e9284a28ba
5
5
  SHA512:
6
- metadata.gz: ed02de30c898c0a8fba369ef315572e16997b19436828294a367c93fd1101ae7bd077c7989d0372f524b87bf66cb6a421b4ac8e6d682d7d4655eb5cfc2157156
7
- data.tar.gz: 1dafdc93914c961ae1894d79e23b8f7b10c957fd183c96fd471031c16ff2dd6f87b786a8554770ea79612131f406742088c0bbb3dc2ab7ae7fb94fcd32f255be
6
+ metadata.gz: 669950d37ac2e29a1940ceb0fa4105d760593757d14e90e6bb520bf56332c0935238f82eac066a3948c88fc6d330295f357b9eac7d62029ce87d3c4e5354b73a
7
+ data.tar.gz: 598604f3136587a838cc500fae9a3b152c5b5a853e29b2bffd5e8e1f4a55c417a6323b4eb1def19cef954fbfa8b2ba5daef827a52e3bba9786e4dd1107edae4e
data/History.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 1.3.11 (10/20/14)
2
+
3
+ - arjdbc: performance improvement - avodinng JRuby's impl iface generation
4
+ - [firebird] Use ampersand literal in limit offset sub to fix FIRST 1/SKIP 1
5
+ - require super call is not needed and causes issues double loading features
6
+
1
7
  ## 1.3.10 (08/29/14)
2
8
 
3
9
  - [postgres] preliminary (temp) fix for Marshal.dump broken since 1.3.8 (#573)
@@ -13,7 +13,7 @@ module Arel
13
13
  sql = o.cores.map { |x| do_visit_select_core x, a }.join
14
14
  sql << " ORDER BY #{o.orders.map { |x| do_visit x, a }.join(', ')}" unless o.orders.empty?
15
15
 
16
- sql.sub!(/\A(\s*SELECT\s)/i, "\&#{lim_off} ") unless lim_off.empty?
16
+ sql.sub!(/\A(\s*SELECT\s)/i, '\&' + lim_off + ' ') unless lim_off.empty?
17
17
  sql
18
18
  end
19
19
 
@@ -39,7 +39,6 @@ module ActiveRecord
39
39
  super('arjdbc/sqlite3')
40
40
  else super
41
41
  end
42
- super
43
42
  end
44
43
 
45
44
  end
@@ -67,7 +67,20 @@ module ActiveRecord
67
67
  Java::JavaxNaming::InitialContext.new.lookup(config[:jndi].to_s)
68
68
 
69
69
  @jndi = true
70
- self.connection_factory = JdbcConnectionFactory.impl { data_source.connection }
70
+ self.connection_factory = JndiConnectionFactoryImpl.new(data_source)
71
+ end
72
+
73
+ # @private
74
+ class JndiConnectionFactoryImpl
75
+ include JdbcConnectionFactory
76
+
77
+ def initialize(data_source)
78
+ @data_source = data_source
79
+ end
80
+
81
+ def new_connection
82
+ @data_source.connection
83
+ end
71
84
  end
72
85
 
73
86
  def setup_jdbc_factory
@@ -79,12 +92,26 @@ module ActiveRecord
79
92
  url = jdbc_url
80
93
  username = config[:username]
81
94
  password = config[:password]
82
- jdbc_driver = ( config[:driver_instance] ||=
95
+ driver = ( config[:driver_instance] ||=
83
96
  JdbcDriver.new(config[:driver].to_s, config[:properties]) )
84
97
 
85
98
  @jndi = false
86
- self.connection_factory = JdbcConnectionFactory.impl do
87
- jdbc_driver.connection(url, username, password)
99
+ self.connection_factory = JdbcConnectionFactoryImpl.new(url, username, password, driver)
100
+ end
101
+
102
+ # @private
103
+ class JdbcConnectionFactoryImpl
104
+ include JdbcConnectionFactory
105
+
106
+ def initialize(url, username, password, driver)
107
+ @url = url
108
+ @username = username
109
+ @password = password
110
+ @driver = driver
111
+ end
112
+
113
+ def new_connection
114
+ @driver.connection(@url, @username, @password)
88
115
  end
89
116
  end
90
117
 
@@ -1,5 +1,5 @@
1
1
  module ArJdbc
2
- VERSION = "1.3.10"
2
+ VERSION = "1.3.11"
3
3
  # @deprecated
4
4
  module Version
5
5
  # @private 1.2.x compatibility
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-jdbc-adapter
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.10
4
+ version: 1.3.11
5
5
  platform: ruby
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: 2014-08-29 00:00:00.000000000 Z
11
+ date: 2014-10-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -243,7 +243,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
243
243
  version: '0'
244
244
  requirements: []
245
245
  rubyforge_project: jruby-extras
246
- rubygems_version: 2.4.1
246
+ rubygems_version: 2.1.9
247
247
  signing_key:
248
248
  specification_version: 4
249
249
  summary: JDBC adapter for ActiveRecord, for use within JRuby on Rails.