rails-mongoid-gatekeeper 0.1.0 → 0.1.1
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1ca2866678aeb9e1e76fc1a4ce3538102fee2378802055306aca9e72701b6952
|
4
|
+
data.tar.gz: 9b07a89a5d87c10b033110b769c6550ee01740f0240d7a462e9c3f28db032b34
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 14e6a65575cf3b79889eed8d917a334ad910d6795a18febde2df64cc6e20709ab67499d1dd466033d676c3b8aac5680f3a331ae27c86307f164cd409232b2f62
|
7
|
+
data.tar.gz: 23d6d4cfd078b8b9e6a173099fac09adab5d810b6b9afc56eedc02f448ffae605417e3f1578af735a43cfda5bae15e335117f4752c3729699c404f587d996a1d
|
data/README.md
CHANGED
@@ -67,7 +67,7 @@ book.info(customer) # { :name => "Lord of the Rings" }
|
|
67
67
|
```
|
68
68
|
|
69
69
|
### Controllers
|
70
|
-
On controllers, you can include `Gatekeeper::
|
70
|
+
On controllers, you can include `Gatekeeper::Responder` to generate automatic responses for your HTML, JS, or JSON views. These responses contains information based on the `allowed_info` method specified in your models.
|
71
71
|
|
72
72
|
## License
|
73
73
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module Gatekeeper
|
2
|
-
module
|
2
|
+
module Responder
|
3
3
|
|
4
4
|
extend ActiveSupport::Concern
|
5
5
|
|
@@ -13,7 +13,6 @@ module Gatekeeper
|
|
13
13
|
##
|
14
14
|
# Handles response based on request format.
|
15
15
|
def handle_response
|
16
|
-
fatto = performed?
|
17
16
|
unless performed?
|
18
17
|
if @error.present?
|
19
18
|
handle_error(@error)
|
data/lib/gatekeeper/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-mongoid-gatekeeper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Francesco Ballardin
|
@@ -77,7 +77,7 @@ files:
|
|
77
77
|
- MIT-LICENSE
|
78
78
|
- README.md
|
79
79
|
- Rakefile
|
80
|
-
- app/controllers/concerns/gatekeeper/
|
80
|
+
- app/controllers/concerns/gatekeeper/responder.rb
|
81
81
|
- app/controllers/gatekeeper_controller.rb
|
82
82
|
- app/models/gatekeeper/embedded_model.rb
|
83
83
|
- app/models/gatekeeper/model.rb
|