pg_saurus 3.1.1 → 3.2.0

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: 850dd8861cb0267db129ffba31cd5e8cd2ebdd5d
4
- data.tar.gz: 0eff84f43df90fd63f85a142be5dadcbf10c7952
3
+ metadata.gz: 415fc5db55968776ea027a80129efaf2585a3bb5
4
+ data.tar.gz: 907c71a922cd7e21c438b404703fef26caa68c59
5
5
  SHA512:
6
- metadata.gz: 3718a473d102063808760d41af07801eeb341e09487802b1d95b1d3683fc74c353644ed86f2e39181ea17a31eef0f9cdbe6fd454ae7bd40a70945ef6c7f7690c
7
- data.tar.gz: c25ca755af2aeff56329d59afb0b8b3cd266c3ff39f903471be92bb6adfb9060d8ca410f6239db942b1270f881cc2da4a34256c652106e6e673e88331fe223b8
6
+ metadata.gz: 94678878deef5dfbd673f11a88c9395f0f6567398bf5275d80253736675c8ab4968be491c3fc65b037c2ff5c6d99cf5801260ab0d77315d7dd8860a4a16f64d6
7
+ data.tar.gz: a822d5f047b7d424284d24fb159b2b0acd27c5fe1deb5548075ab711196d272892392e7b9cd85055549f52b823a4e4757edaf6dfc158611db15c78a323c083d5
@@ -4,13 +4,13 @@ module PgSaurus::ConnectionAdapters::PostgreSQLAdapter::TranslateException
4
4
  # # See http://www.postgresql.org/docs/9.1/static/errcodes-appendix.html
5
5
  INSUFFICIENT_PRIVILEGE = "42501"
6
6
 
7
- # Intercept insufficient privilege PGError and raise active_record wrapped database exception
7
+ # Intercept insufficient privilege PG::Error and raise active_record wrapped database exception
8
8
  def translate_exception(exception, message)
9
9
  exception_result = exception.result
10
10
 
11
- case exception_result.try(:error_field, PGresult::PG_DIAG_SQLSTATE)
11
+ case exception_result.try(:error_field, PG::Result::PG_DIAG_SQLSTATE)
12
12
  when INSUFFICIENT_PRIVILEGE
13
- exc_message = exception_result.try(:error_field, PGresult::PG_DIAG_MESSAGE_PRIMARY)
13
+ exc_message = exception_result.try(:error_field, PG::Result::PG_DIAG_MESSAGE_PRIMARY)
14
14
  exc_message ||= message
15
15
  ::ActiveRecord::InsufficientPrivilege.new(exc_message, exception)
16
16
  else
@@ -1,4 +1,4 @@
1
1
  module PgSaurus
2
2
  # Version of pg_saurus gem.
3
- VERSION = "3.1.1"
3
+ VERSION = "3.2.0"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pg_saurus
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.1
4
+ version: 3.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Potapov Sergey
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2017-01-13 00:00:00.000000000 Z
16
+ date: 2017-06-21 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: pg