human_error 1.9.0 → 1.10.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: 36b18426c2181a007f56af9f9357c99cda35536a
4
- data.tar.gz: fba62de8b8c4a1f3b88e3570030961a72b274869
3
+ metadata.gz: 11a8437998a69c4e52937a51033c389d3dea7b92
4
+ data.tar.gz: 350c459f6272b6ba3ffecb2749d3c69cbe909ac3
5
5
  SHA512:
6
- metadata.gz: 793e07bfb657a7cc8c8f36a5308bc916e23b1da53c3fa7de607d882eb92322997a2b2bcce56ab06898db10dd962c3011d5c97077461b1896238ee49d30b5dca1
7
- data.tar.gz: 501dcd316b673613eae74f4d861a819ac46f3cf3da9196e1758fac33ff1beb3c316f1cd185ab03543d1593f3ca0280959f35d2a7fe4a70b82041035aa04c20bd
6
+ metadata.gz: 9600653b449b447f68dcc3c299101d389ba49eaee86fa35958bdfa19e4836ef45c26c0a39a009b5e9f6a0041b674951378c57d59a4e28a20f5ac121dd7d073f7
7
+ data.tar.gz: 5a9ca02a9af5e3d8e1595203a0201f05d884133f15f09658099434fa00453b1c08dfa58190215d8a4ff70f11f89b2d4d5f9e5b7e0fa66faeffb601a23ce69758
@@ -7,9 +7,9 @@ module Persistable
7
7
  ids = case e.message
8
8
  when /\ACouldn't find .* without an ID\z/
9
9
  []
10
- when /\ACouldn't find .* with \'.*\'=(\d+)/
10
+ when /\ACouldn't find .* with \'.*\'=([a-f0-9\-]+)/
11
11
  [$1]
12
- when /\ACouldn't find all .* with \'.*\': ((?:\d+(?:, )?)+)/
12
+ when /\ACouldn't find all .* with \'.*\': ((?:[a-f0-9\-]+(?:, )?)+)/
13
13
  $1.split(', ')
14
14
  end
15
15
 
@@ -22,7 +22,7 @@ module Persistable
22
22
  def save!(*args)
23
23
  super
24
24
  rescue ActiveRecord::InvalidForeignKey => e
25
- association_info_pattern = %r{DETAIL: Key \((.*)_id\)=\((\d+)\)}
25
+ association_info_pattern = /DETAIL: Key \((.*)_id\)=\(([a-f0-9\-]+)\)/
26
26
  association_name, association_id = e.message.
27
27
  match(association_info_pattern) \
28
28
  [1..-1]
@@ -1,3 +1,3 @@
1
1
  class HumanError
2
- VERSION = '1.9.0'
2
+ VERSION = '1.10.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: human_error
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.0
4
+ version: 1.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - jfelchner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-10 00:00:00.000000000 Z
11
+ date: 2014-06-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec