human_error 1.8.1 → 1.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: c55554df9b5ca6be992b36fbca062fa8e6c4ea0e
4
- data.tar.gz: 246c273b755e273e132e9fb8d65e27e909ab087e
3
+ metadata.gz: 84204722cea575f9bda9333cd31e1a29f85351e0
4
+ data.tar.gz: 2d6bfc6135ce80475dcefad49454917dbb69fb4f
5
5
  SHA512:
6
- metadata.gz: f40e1a014d53632a840475003c64f96117f9e2cad20f412e8bd0844b48063c5efcc658ac949f0ac8281daa50aa29dd8a694f585fcb31e393370c590e83011469
7
- data.tar.gz: a643c39007b66cc9629be8eebb2d27bd9388773b459802fde156c4b284f248dc44cecbe91b8c90c0857775b4d001eb2b3c9148d5377be71c56df885a1fc3fa78
6
+ metadata.gz: 1e79817c0b8aeb3d4af7b037e7f11ca6b0dc3eef7c3a413fd085c6c1c501b42e674c613dac35044eb9a0a95c1e20248ece404580bc06cdabd985f07a6baf86f9
7
+ data.tar.gz: db9eec83c9ce4cec175b908a91a2b0373b186822ff82b3b86aa321a0d98c4f5089b4418286d5dc861b1fb92c93fe37ab2d5ac4d34c46585c9a90e23184f7c692
@@ -14,7 +14,7 @@ module Persistable
14
14
  end
15
15
 
16
16
  raise HumanError::Errors::ResourceNotFoundError.new(
17
- resource_name: human_error_resource_name(self),
17
+ resource_name: Persistable.human_error_resource_name(self),
18
18
  resource_id: ids)
19
19
  end
20
20
  end
@@ -28,18 +28,18 @@ module Persistable
28
28
  [1..-1]
29
29
 
30
30
  raise HumanError::Errors::AssociationError.new(
31
- resource_name: human_error_resource_name(self.class),
31
+ resource_name: Persistable.human_error_resource_name(self.class),
32
32
  association_name: association_name,
33
33
  association_id: association_id,
34
34
  attributes: attributes)
35
35
  rescue ActiveRecord::RecordInvalid, ActiveRecord::RecordNotSaved => e
36
36
  raise HumanError::Errors::ResourcePersistenceError.new(
37
- resource_name: human_error_resource_name(self.class),
37
+ resource_name: Persistable.human_error_resource_name(self.class),
38
38
  attributes: attributes,
39
39
  errors: errors.full_messages)
40
40
  end
41
41
 
42
- def human_error_resource_name(klass)
42
+ def self.human_error_resource_name(klass)
43
43
  last_part_of_class_name = /::(\w+)\z/
44
44
 
45
45
  klass.
@@ -49,8 +49,6 @@ module Persistable
49
49
  downcase
50
50
  end
51
51
 
52
- module_function :human_error_resource_name
53
-
54
52
  def self.included(base)
55
53
  base.extend ClassMethods
56
54
  end
@@ -1,3 +1,3 @@
1
1
  class HumanError
2
- VERSION = '1.8.1'
2
+ VERSION = '1.8.2'
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.8.1
4
+ version: 1.8.2
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-05 00:00:00.000000000 Z
11
+ date: 2014-06-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec