README.md in action_policy-0.4.4 vs README.md in action_policy-0.5.0

- old
+ new

@@ -1,7 +1,8 @@ [![Gem Version](https://badge.fury.io/rb/action_policy.svg)](https://badge.fury.io/rb/action_policy) -[![Build Status](https://travis-ci.org/palkan/action_policy.svg?branch=master)](https://travis-ci.org/palkan/action_policy) +![Build](https://github.com/palkan/action_policy/workflows/Build/badge.svg) +![JRuby Build](https://github.com/palkan/action_policy/workflows/JRuby%20Build/badge.svg) [![Documentation](https://img.shields.io/badge/docs-link-brightgreen.svg)](https://actionpolicy.evilmartians.io) # Action Policy Authorization framework for Ruby and Rails applications. @@ -19,11 +20,10 @@ - Seattle.rb, 2019 "A Denial!" talk ([slides](https://speakerdeck.com/palkan/seattle-dot-rb-2019-a-denial)) - RailsConf, 2018 "Access Denied" talk ([video](https://www.youtube.com/watch?v=NVwx0DARDis), [slides](https://speakerdeck.com/palkan/railsconf-2018-access-denied-the-missing-guide-to-authorization-in-rails)) - ## Integrations - GraphQL Ruby ([`action_policy-graphql`](https://github.com/palkan/action_policy-graphql)) ## Installation @@ -34,11 +34,13 @@ gem "action_policy", "~> 0.4.0" ``` And then execute: - $ bundle +```sh +bundle install +``` ## Usage Action Policy relies on resource-specific policy classes (just like [Pundit](https://github.com/varvet/pundit)). @@ -86,10 +88,9 @@ end end ``` \* See [Non-Rails Usage](docs/non_rails.md) on how to add `authorize!` to any Ruby project. - When authorization is successful (i.e., the corresponding rule returns `true`), nothing happens, but in case of authorization failure `ActionPolicy::Unauthorized` error is raised. There is also an `allowed_to?` method which returns `true` or `false`, and could be used, in views, for example: