activerecord-oracle_enhanced-adapter 5.2.3 → 5.2.4

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: 99ba62aedd6e50d8e73857481e9571fe6d32bcf54e63ad71efb585a41ee46de3
4
- data.tar.gz: a328430116e7ff784117e6281e6ed7be5bc3df51ea9425d49cf3304bc0730ccf
3
+ metadata.gz: 11809784906ee64a1f23667c4d5f146f8cb53b64c653eda3774f405f6e9785fb
4
+ data.tar.gz: 75e8601819924d7daa14203efdf9e20fdb9199e8a38c0f9a6ecaeb14f5e52163
5
5
  SHA512:
6
- metadata.gz: ec5c2229cc8ec228ae600373f107a4dd325913c7940f9668462148bda65380818ee7ac5eaf369e042c54cda30c44ad1934cd9aa0429a783c2c723869c036066b
7
- data.tar.gz: 566e26dc8d096883fff8409fce90160706e1ae18f4e4779cd2f83ff58657f2a91f2e93ad552068717d242af38ed70403264b6b6bf1d87b7d354bf7c61f5309d9
6
+ metadata.gz: 1733956ba38e3ad5164e299964969d3da5281244596520cc2cd4d8f162765edd2f3f34cdadbb5603930b0dd0b29ae134482076d2cb8ccd3c1863a7caabb4028b
7
+ data.tar.gz: 79bb4b2ef4203f0cf6c93d7fd891e59f03c47f56e7e9432239729cac11f8b64db1606d0a49302f9f9458505874518113b1239542780358f1b58aeef4578f8145
data/History.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 5.2.4 / 2018-11-29
2
+
3
+ * Changes and bug fixes
4
+ * Stop using NativeException [#1666 #1761 #1762]
5
+
1
6
  ## 5.2.3 / 2018-08-08
2
7
 
3
8
  * Changes and bug fixes
data/VERSION CHANGED
@@ -1 +1 @@
1
- 5.2.3
1
+ 5.2.4
@@ -209,13 +209,9 @@ module ActiveRecord
209
209
  def ping
210
210
  exec_no_retry("select 1 from dual")
211
211
  @active = true
212
- rescue NativeException => e
212
+ rescue Java::JavaSql::SQLException => e
213
213
  @active = false
214
- if e.message =~ /^java\.sql\.SQL(Recoverable)?Exception/
215
- raise OracleEnhanced::ConnectionException, e.message
216
- else
217
- raise
218
- end
214
+ raise OracleEnhanced::ConnectionException, e.message
219
215
  end
220
216
 
221
217
  # Resets connection, by logging off and creating a new connection.
@@ -224,13 +220,9 @@ module ActiveRecord
224
220
  begin
225
221
  new_connection(@config)
226
222
  @active = true
227
- rescue NativeException => e
223
+ rescue Java::JavaSql::SQLException => e
228
224
  @active = false
229
- if e.message =~ /^java\.sql\.SQL(Recoverable)?Exception/
230
- raise OracleEnhanced::ConnectionException, e.message
231
- else
232
- raise
233
- end
225
+ raise OracleEnhanced::ConnectionException, e.message
234
226
  end
235
227
  end
236
228
 
@@ -239,8 +231,8 @@ module ActiveRecord
239
231
  should_retry = auto_retry? && autocommit?
240
232
  begin
241
233
  yield if block_given?
242
- rescue NativeException => e
243
- raise unless e.message =~ /^java\.sql\.SQL(Recoverable)?Exception: (Closed Connection|Io exception:|No more data to read from socket|IO Error:)/
234
+ rescue Java::JavaSql::SQLException => e
235
+ raise unless e.message =~ /^(Closed Connection|Io exception:|No more data to read from socket|IO Error:)/
244
236
  @active = false
245
237
  raise unless should_retry
246
238
  should_retry = false
@@ -455,11 +447,9 @@ module ActiveRecord
455
447
  super
456
448
  end
457
449
 
458
- # Return NativeException / java.sql.SQLException error code
450
+ # Return java.sql.SQLException error code
459
451
  def error_code(exception)
460
452
  case exception
461
- when NativeException
462
- exception.cause.getErrorCode
463
453
  when Java::JavaSql::SQLException
464
454
  exception.getErrorCode
465
455
  else
Binary file
@@ -381,7 +381,7 @@ describe "OracleEnhancedConnection" do
381
381
  ActiveRecord::Base.connection.auto_retry = false
382
382
  kill_current_session
383
383
  if defined?(RUBY_ENGINE) && RUBY_ENGINE == "jruby"
384
- expect { @conn.exec("SELECT * FROM dual") }.to raise_error(NativeException)
384
+ expect { @conn.exec("SELECT * FROM dual") }.to raise_error(Java::JavaSql::SQLRecoverableException)
385
385
  else
386
386
  expect { @conn.exec("SELECT * FROM dual") }.to raise_error(OCIError)
387
387
  end
@@ -399,7 +399,7 @@ describe "OracleEnhancedConnection" do
399
399
  ActiveRecord::Base.connection.auto_retry = false
400
400
  kill_current_session
401
401
  if defined?(RUBY_ENGINE) && RUBY_ENGINE == "jruby"
402
- expect { @conn.select("SELECT * FROM dual") }.to raise_error(NativeException)
402
+ expect { @conn.select("SELECT * FROM dual") }.to raise_error(Java::JavaSql::SQLRecoverableException)
403
403
  else
404
404
  expect { @conn.select("SELECT * FROM dual") }.to raise_error(OCIError)
405
405
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-oracle_enhanced-adapter
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.2.3
4
+ version: 5.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Raimonds Simanovskis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-07 00:00:00.000000000 Z
11
+ date: 2018-11-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -86,6 +86,7 @@ files:
86
86
  - lib/active_record/type/oracle_enhanced/timestampltz.rb
87
87
  - lib/active_record/type/oracle_enhanced/timestamptz.rb
88
88
  - lib/activerecord-oracle_enhanced-adapter.rb
89
+ - lib/ojdbc6.jar
89
90
  - spec/active_record/connection_adapters/emulation/oracle_adapter_spec.rb
90
91
  - spec/active_record/connection_adapters/oracle_enhanced/connection_spec.rb
91
92
  - spec/active_record/connection_adapters/oracle_enhanced/context_index_spec.rb
@@ -139,31 +140,31 @@ signing_key:
139
140
  specification_version: 4
140
141
  summary: Oracle enhanced adapter for ActiveRecord
141
142
  test_files:
142
- - spec/support/alter_system_set_open_cursors.sql
143
- - spec/support/alter_system_user_password.sql
144
- - spec/support/create_oracle_enhanced_users.sql
145
- - spec/spec_config.yaml.template
146
- - spec/active_record/connection_adapters/oracle_enhanced_data_types_spec.rb
147
- - spec/active_record/connection_adapters/emulation/oracle_adapter_spec.rb
148
- - spec/active_record/connection_adapters/oracle_enhanced_adapter_spec.rb
149
- - spec/active_record/connection_adapters/oracle_enhanced/dbms_output_spec.rb
150
- - spec/active_record/connection_adapters/oracle_enhanced/structure_dump_spec.rb
151
- - spec/active_record/connection_adapters/oracle_enhanced/schema_dumper_spec.rb
152
- - spec/active_record/connection_adapters/oracle_enhanced/database_tasks_spec.rb
153
- - spec/active_record/connection_adapters/oracle_enhanced/schema_statements_spec.rb
154
- - spec/active_record/connection_adapters/oracle_enhanced/procedures_spec.rb
155
- - spec/active_record/connection_adapters/oracle_enhanced/context_index_spec.rb
156
- - spec/active_record/connection_adapters/oracle_enhanced/quoting_spec.rb
157
- - spec/active_record/connection_adapters/oracle_enhanced/connection_spec.rb
158
- - spec/active_record/oracle_enhanced/type/timestamp_spec.rb
159
- - spec/active_record/oracle_enhanced/type/boolean_spec.rb
143
+ - spec/spec_helper.rb
160
144
  - spec/active_record/oracle_enhanced/type/float_spec.rb
161
- - spec/active_record/oracle_enhanced/type/binary_spec.rb
145
+ - spec/active_record/oracle_enhanced/type/text_spec.rb
162
146
  - spec/active_record/oracle_enhanced/type/national_character_string_spec.rb
163
147
  - spec/active_record/oracle_enhanced/type/integer_spec.rb
164
- - spec/active_record/oracle_enhanced/type/raw_spec.rb
148
+ - spec/active_record/oracle_enhanced/type/boolean_spec.rb
149
+ - spec/active_record/oracle_enhanced/type/dirty_spec.rb
150
+ - spec/active_record/oracle_enhanced/type/timestamp_spec.rb
165
151
  - spec/active_record/oracle_enhanced/type/json_spec.rb
152
+ - spec/active_record/oracle_enhanced/type/binary_spec.rb
153
+ - spec/active_record/oracle_enhanced/type/raw_spec.rb
166
154
  - spec/active_record/oracle_enhanced/type/national_character_text_spec.rb
167
- - spec/active_record/oracle_enhanced/type/dirty_spec.rb
168
- - spec/active_record/oracle_enhanced/type/text_spec.rb
169
- - spec/spec_helper.rb
155
+ - spec/active_record/connection_adapters/oracle_enhanced_adapter_spec.rb
156
+ - spec/active_record/connection_adapters/oracle_enhanced/schema_dumper_spec.rb
157
+ - spec/active_record/connection_adapters/oracle_enhanced/quoting_spec.rb
158
+ - spec/active_record/connection_adapters/oracle_enhanced/structure_dump_spec.rb
159
+ - spec/active_record/connection_adapters/oracle_enhanced/schema_statements_spec.rb
160
+ - spec/active_record/connection_adapters/oracle_enhanced/database_tasks_spec.rb
161
+ - spec/active_record/connection_adapters/oracle_enhanced/dbms_output_spec.rb
162
+ - spec/active_record/connection_adapters/oracle_enhanced/connection_spec.rb
163
+ - spec/active_record/connection_adapters/oracle_enhanced/procedures_spec.rb
164
+ - spec/active_record/connection_adapters/oracle_enhanced/context_index_spec.rb
165
+ - spec/active_record/connection_adapters/emulation/oracle_adapter_spec.rb
166
+ - spec/active_record/connection_adapters/oracle_enhanced_data_types_spec.rb
167
+ - spec/support/create_oracle_enhanced_users.sql
168
+ - spec/support/alter_system_user_password.sql
169
+ - spec/support/alter_system_set_open_cursors.sql
170
+ - spec/spec_config.yaml.template