know_it_all 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -12
- data/LICENSE.txt +1 -1
- data/README.md +3 -3
- data/know_it_all.gemspec +2 -2
- data/lib/know_it_all/version.rb +1 -1
- data/lib/know_it_all.rb +5 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c4733fe0eb5cd53b5b415271a0451f1984071cc9
|
4
|
+
data.tar.gz: 4c0f5550ef6711605e3d481749ea4f7b6162d5f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4e5b605147a1028b2de253be3598eebdb9d378a9b11500a398dd7b8ac9fdd8dab411ed4a1a636162e8597328a780213c6f9d7d3b7d4d758cbc7fe27e42d243d
|
7
|
+
data.tar.gz: ab8536a016a11357ad51b607446092b3fdcc7b708bf6cb94d73ef7e3dc428aba2cdadf835893d30c014163183aeff29b283382b07929b9b007f72c8a783339e9
|
data/CHANGELOG.md
CHANGED
@@ -1,31 +1,31 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
-
## [v0.1.5](https://github.com/
|
4
|
-
[Full Changelog](https://github.com/
|
3
|
+
## [v0.1.5](https://github.com/oddlyfunctional/know_it_all/tree/v0.1.5) (2016-08-17)
|
4
|
+
[Full Changelog](https://github.com/oddlyfunctional/know_it_all/compare/v0.1.4...v0.1.5)
|
5
5
|
|
6
6
|
- Add Rails generators for installing the gem and creating policies
|
7
7
|
- Deprecating `assert` in favor of `validate`
|
8
8
|
|
9
|
-
## [v0.1.4](https://github.com/
|
10
|
-
[Full Changelog](https://github.com/
|
9
|
+
## [v0.1.4](https://github.com/oddlyfunctional/know_it_all/tree/v0.1.4) (2016-07-03)
|
10
|
+
[Full Changelog](https://github.com/oddlyfunctional/know_it_all/compare/v0.1.3...v0.1.4)
|
11
11
|
|
12
12
|
- Add support to define error message with a block
|
13
13
|
|
14
|
-
## [v0.1.3](https://github.com/
|
15
|
-
[Full Changelog](https://github.com/
|
14
|
+
## [v0.1.3](https://github.com/oddlyfunctional/know_it_all/tree/v0.1.3) (2016-07-03)
|
15
|
+
[Full Changelog](https://github.com/oddlyfunctional/know_it_all/compare/v0.1.2...v0.1.3)
|
16
16
|
|
17
|
-
- Remove ActiveSupport dependency [\#3](https://github.com/
|
17
|
+
- Remove ActiveSupport dependency [\#3](https://github.com/oddlyfunctional/know_it_all/issues/3)
|
18
18
|
|
19
|
-
## [v0.1.2](https://github.com/
|
20
|
-
[Full Changelog](https://github.com/
|
19
|
+
## [v0.1.2](https://github.com/oddlyfunctional/know_it_all/tree/v0.1.2) (2016-06-30)
|
20
|
+
[Full Changelog](https://github.com/oddlyfunctional/know_it_all/compare/v0.1.1...v0.1.2)
|
21
21
|
|
22
22
|
- Add support to inheritance chain of `KnowItAll::Base`
|
23
23
|
|
24
|
-
## [v0.1.1](https://github.com/
|
25
|
-
[Full Changelog](https://github.com/
|
24
|
+
## [v0.1.1](https://github.com/oddlyfunctional/know_it_all/tree/v0.1.1) (2016-06-30)
|
25
|
+
[Full Changelog](https://github.com/oddlyfunctional/know_it_all/compare/v0.1.0...v0.1.1)
|
26
26
|
|
27
27
|
- Fix bug when extending `KnowItAll::Base` with more than one class
|
28
28
|
|
29
|
-
## [v0.1.0](https://github.com/
|
29
|
+
## [v0.1.0](https://github.com/oddlyfunctional/know_it_all/tree/v0.1.0) (2016-06-29)
|
30
30
|
|
31
31
|
- Initial release
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
# KnowItAll
|
4
4
|
|
5
5
|
[![Gem Version](https://badge.fury.io/rb/know_it_all.svg)](https://badge.fury.io/rb/know_it_all)
|
6
|
-
[![Join the chat at https://gitter.im/
|
6
|
+
[![Join the chat at https://gitter.im/oddlyfunctional/know_it_all](https://badges.gitter.im/oddlyfunctional/know_it_all.svg)](https://gitter.im/oddlyfunctional/know_it_all?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
7
7
|
[![Twitter Follow](https://img.shields.io/twitter/follow/know_it_all_gem.svg?style=social&label=Follow&maxAge=2592000)](https://twitter.com/know_it_all_gem)
|
8
8
|
|
9
9
|
KnowItAll is a small, object-oriented approach to authorization. It knows everything about your application!
|
@@ -446,7 +446,7 @@ end
|
|
446
446
|
|
447
447
|
## Get help
|
448
448
|
|
449
|
-
Follow me on [Twitter](https://twitter.com/know_it_all_gem) or chat with me on [Gitter](https://gitter.im/
|
449
|
+
Follow me on [Twitter](https://twitter.com/know_it_all_gem) or chat with me on [Gitter](https://gitter.im/oddlyfunctional/know_it_all)! :)
|
450
450
|
|
451
451
|
## Alternatives
|
452
452
|
|
@@ -460,7 +460,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
460
460
|
|
461
461
|
## Contributing
|
462
462
|
|
463
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
463
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/oddlyfunctional/know_it_all. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
|
464
464
|
|
465
465
|
|
466
466
|
## License
|
data/know_it_all.gemspec
CHANGED
@@ -6,12 +6,12 @@ require 'know_it_all/version'
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "know_it_all"
|
8
8
|
spec.version = KnowItAll::VERSION
|
9
|
-
spec.authors = ["
|
9
|
+
spec.authors = ["oddlyfunctional"]
|
10
10
|
spec.email = ["mrodrigues.uff@gmail.com"]
|
11
11
|
|
12
12
|
spec.summary = %q{OO authorization for APIs}
|
13
13
|
spec.description = %q{Minimalistic authorization focused on APIs}
|
14
|
-
spec.homepage = "https://github.com/
|
14
|
+
spec.homepage = "https://github.com/oddlyfunctional/know_it_all"
|
15
15
|
spec.license = "MIT"
|
16
16
|
|
17
17
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
data/lib/know_it_all/version.rb
CHANGED
data/lib/know_it_all.rb
CHANGED
@@ -33,7 +33,7 @@ module KnowItAll
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def policy_class(policy_name: self.policy_name)
|
36
|
-
@policy_class
|
36
|
+
@policy_class = self.class.const_get(policy_name)
|
37
37
|
end
|
38
38
|
|
39
39
|
def policy_name(
|
@@ -62,6 +62,10 @@ module KnowItAll
|
|
62
62
|
def initialize(policy)
|
63
63
|
self.policy = policy
|
64
64
|
end
|
65
|
+
|
66
|
+
def to_s
|
67
|
+
"KnowItAll::NotAuthorized: #{policy.errors.to_s}"
|
68
|
+
end
|
65
69
|
end
|
66
70
|
|
67
71
|
class AuthorizationNotPerformedError < StandardError; end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: know_it_all
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- oddlyfunctional
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-05-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -110,7 +110,7 @@ files:
|
|
110
110
|
- lib/know_it_all/base.rb
|
111
111
|
- lib/know_it_all/string_helper.rb
|
112
112
|
- lib/know_it_all/version.rb
|
113
|
-
homepage: https://github.com/
|
113
|
+
homepage: https://github.com/oddlyfunctional/know_it_all
|
114
114
|
licenses:
|
115
115
|
- MIT
|
116
116
|
metadata: {}
|