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 +4 -4
- data/lib/human_error/persistable.rb +3 -3
- data/lib/human_error/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 11a8437998a69c4e52937a51033c389d3dea7b92
|
4
|
+
data.tar.gz: 350c459f6272b6ba3ffecb2749d3c69cbe909ac3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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 \'.*\'=(
|
10
|
+
when /\ACouldn't find .* with \'.*\'=([a-f0-9\-]+)/
|
11
11
|
[$1]
|
12
|
-
when /\ACouldn't find all .* with \'.*\': ((
|
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 =
|
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]
|
data/lib/human_error/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2014-06-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|