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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f2c9d3f6e989ec8e15956f85a2734e15ce858a7b
4
- data.tar.gz: 1e7194c8936f99fcecbd5c543855c69bdc5577e2
3
+ metadata.gz: c4733fe0eb5cd53b5b415271a0451f1984071cc9
4
+ data.tar.gz: 4c0f5550ef6711605e3d481749ea4f7b6162d5f6
5
5
  SHA512:
6
- metadata.gz: 8efd4ad6004315675decbf3038628d5178319e5895c7d0d2a7e80df15984dce504d5c315d33893b6988ced57d63fafbc65e66bba58ebe10a0caf10cb36884ac3
7
- data.tar.gz: 26183fd792e49f71e69bed56a522648a5fc0854500f72823223dd127c162b314b1462a46a9f1f8f63f7114cd0858913f0e7dc05c857c09a98df7daa0ff67322a
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/mrodrigues/know_it_all/tree/v0.1.5) (2016-08-17)
4
- [Full Changelog](https://github.com/mrodrigues/know_it_all/compare/v0.1.4...v0.1.5)
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/mrodrigues/know_it_all/tree/v0.1.4) (2016-07-03)
10
- [Full Changelog](https://github.com/mrodrigues/know_it_all/compare/v0.1.3...v0.1.4)
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/mrodrigues/know_it_all/tree/v0.1.3) (2016-07-03)
15
- [Full Changelog](https://github.com/mrodrigues/know_it_all/compare/v0.1.2...v0.1.3)
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/mrodrigues/know_it_all/issues/3)
17
+ - Remove ActiveSupport dependency [\#3](https://github.com/oddlyfunctional/know_it_all/issues/3)
18
18
 
19
- ## [v0.1.2](https://github.com/mrodrigues/know_it_all/tree/v0.1.2) (2016-06-30)
20
- [Full Changelog](https://github.com/mrodrigues/know_it_all/compare/v0.1.1...v0.1.2)
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/mrodrigues/know_it_all/tree/v0.1.1) (2016-06-30)
25
- [Full Changelog](https://github.com/mrodrigues/know_it_all/compare/v0.1.0...v0.1.1)
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/mrodrigues/know_it_all/tree/v0.1.0) (2016-06-29)
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
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2016 mrodrigues
3
+ Copyright (c) 2016 oddlyfunctional
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
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/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
+ [![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/mrodrigues/know_it_all)! :)
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/mrodrigues/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.
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 = ["mrodrigues"]
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/mrodrigues/know_it_all"
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)/}) }
@@ -1,3 +1,3 @@
1
1
  module KnowItAll
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
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 ||= self.class.const_get(policy_name)
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.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
- - mrodrigues
7
+ - oddlyfunctional
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-08-17 00:00:00.000000000 Z
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/mrodrigues/know_it_all
113
+ homepage: https://github.com/oddlyfunctional/know_it_all
114
114
  licenses:
115
115
  - MIT
116
116
  metadata: {}