know_it_all 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bb53cc98993d4343b3ace8c80f84cbe790bc5b3d
4
- data.tar.gz: 7b51c78b30fd2fd9ba90fbf5093ac0e325ef5cf1
3
+ metadata.gz: 85674d4642b03b912a9963a5f5d9845946c38961
4
+ data.tar.gz: 7d38e9a2dd38d6b68365d448d127268eef9f8f53
5
5
  SHA512:
6
- metadata.gz: 5043002c2982d319e9ba9917b559a5bf6aba290e0007af569d3f7809ce6b8141519e73ecae17f48c856b1711f3a642995df6e318054f58b88f95c15e8f8e3eb6
7
- data.tar.gz: e7dbc212819b30bbf4c2b121c81f4cd1b446add74c0c04631c6f2559ad282fcd533089547d0b044c86f900ec3ea4cab751a56bb62cdf6513d92cf78ae0cef0a8
6
+ metadata.gz: 1d6f9f57dcb2ca6e63091c35d5f2461e819696697e36f37bae808673e2928e068ac6e20763d9489cb8b435134c645e2e718f202472e90b76bc2db11e7e532175
7
+ data.tar.gz: 916d1060f7d361600b95a9714eb535c185d73f48212f32d562900bfc0defaa3aaf6372b0d6e183c33c7125e71cc9c3578d4b3163481d76ecfc88fced0d4da15a
data/README.md CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  # KnowItAll
4
4
 
5
+ [![Gem Version](https://badge.fury.io/rb/know_it_all.svg)](https://badge.fury.io/rb/know_it_all)
5
6
  [![Join the chat at https://gitter.im/mrodrigues/know_it_all](https://badges.gitter.im/mrodrigues/know_it_all.svg)](https://gitter.im/mrodrigues/know_it_all?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
6
7
 
7
8
  KnowItAll is a small, object-oriented approach to authorization. It knows everything about your application!
@@ -19,7 +19,13 @@ module KnowItAll
19
19
  def errors
20
20
  self.class.validations.each
21
21
  .select { |method_name, _| !self.send(method_name) }
22
- .map { |_, message| message }
22
+ .map do |_, message|
23
+ if message.respond_to?(:call)
24
+ message.call(self)
25
+ else
26
+ message
27
+ end
28
+ end
23
29
  end
24
30
  end
25
31
  end
@@ -1,3 +1,3 @@
1
1
  module KnowItAll
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: know_it_all
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - mrodrigues