jdbc-helper 0.8.1 → 0.8.2

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: cd3112f8aa6d3119d13eff732b5a6321ce9a3b68
4
- data.tar.gz: f80d4ab009b0ac10819c6b8274e2fb981307598a
3
+ metadata.gz: 339d00f2071a8153323eb1d53610aec8ff33ce98
4
+ data.tar.gz: 11a6d3e5b2ba8f75cca979c5df6074aeb9787c8a
5
5
  SHA512:
6
- metadata.gz: 061871bc4ce8f9422ea8349d5fce6cf84537ae1e0e40b5cf38f825f2b51d5d576b2031c8b1440fa009bd17b7fd30a8b939b8d0b5056ff3a0313f149407d53436
7
- data.tar.gz: e54c9555bcffa3e8da8f9ae8ea800f0bffeb5d49887ea49e90d202119d6b5d53186a178ca23f1ecce49ec3afcb7c2cda244daf49f46643e73f97f06612d414c0
6
+ metadata.gz: f2c0207b3aa27f8caf1d19ab37c681a8dc854c7f663fec5ee2085f0e5693d45d3b841319ce4fa2501ddb8239d11c989a82137f2b6d759df00548de9014afe936
7
+ data.tar.gz: cd0988661b3f5cbf4df5f9440a3baf9919fceeb1618f12643a3630af6feae810a280d6f7bf649f40a3e44177b4fb66a68c6c337e7decba5d0b34d16358c2310a
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ### 0.8.2
2
+
3
+ * Allow :driver parameter to be an object that responds to `connect`
4
+
1
5
  ### 0.8.1
2
6
 
3
7
  * Allow :driver parameter to be in either String or Class
@@ -116,7 +116,7 @@ class Connection
116
116
  attr_reader :url
117
117
 
118
118
  # JDBC driver of the connection
119
- # @return [String]
119
+ # @return [String|Class|#connect]
120
120
  attr_reader :driver
121
121
 
122
122
  # Returns the underlying JDBC Connection object.
@@ -167,7 +167,11 @@ class Connection
167
167
  when Class
168
168
  @driver.new.connect(@url, props)
169
169
  else
170
- raise ArgumentError.new('Invalid type for :driver')
170
+ if @driver.respond_to?(:connect)
171
+ @driver.connect(@url, props)
172
+ else
173
+ raise ArgumentError.new('Invalid type for :driver')
174
+ end
171
175
  end
172
176
  @spool = StatementPool.send :new, self
173
177
  @bstmt = nil
@@ -1,3 +1,3 @@
1
1
  module JDBCHelper
2
- VERSION = '0.8.1'
2
+ VERSION = '0.8.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jdbc-helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Junegunn Choi