README.md in consul-1.0.3 vs README.md in consul-1.1.0
- old
+ new
@@ -1,16 +1,17 @@
Consul — A next gen authorization solution
==========================================
-[![Build Status](https://secure.travis-ci.org/makandra/consul.png?branch=master)](https://travis-ci.org/makandra/consul) [![Code Climate](https://codeclimate.com/github/makandra/consul.png)](https://codeclimate.com/github/makandra/consul)
+[![Tests](https://github.com/makandra/consul/workflows/Tests/badge.svg)](https://github.com/makandra/consul/actions) [![Code Climate](https://codeclimate.com/github/makandra/consul.png)](https://codeclimate.com/github/makandra/consul)
+
Consul is an authorization solution for Ruby on Rails where you describe *sets of accessible things* to control what a user can see or edit.
We have used Consul in combination with [assignable_values](https://github.com/makandra/assignable_values) to solve a variety of authorization requirements ranging from boring to bizarre.
Also see our crash course video: [Solving bizare authorization requirements with Rails](http://bizarre-authorization.talks.makandra.com/).
-Consul is tested with Rails 3.2, 4.2, 5.2, and 6.0 on Ruby 2.3, 2.4, and 2.5 (only if supported, for each Ruby/Rails combination). If you need support for Rails 3.2, please use [v0.13.2](https://github.com/makandra/consul/tree/v0.13.2).
+Consul is tested with Rails 5.2 and 6.0 on Ruby 2.5, 2.7 and 3.0 (only if supported, for each Ruby/Rails combination). If you need support for Rails 3.2, please use [v0.13.2](https://github.com/makandra/consul/tree/v0.13.2).
Describing access to your application
-------------------------------------
@@ -44,11 +45,11 @@
end
end
```
-There are no restrictions on the name or constructor arguments of your this class.
+There are no restrictions on the name or constructor arguments of this class.
You can deposit all kinds of objects in your power. See the sections below for details.
### Scope powers (relations)
@@ -88,11 +89,11 @@
```rb
power.notes? # => returns true if Power#notes returns a scope and not nil
```
-Or you can raise an error unless a power its given, e.g. to guard access into a controller action:
+Or you can raise an error unless a power is given, e.g. to guard access into a controller action:
```rb
power.notes! # => raises Consul::Powerless unless Power#notes returns a scope (even if it's empty)
```
@@ -495,11 +496,11 @@
```rb
class Power
...
- power :clients do |client|
+ power :clients do
Client.active if signed_in?
end
power :client_notes do |client|
client.notes.where(:state => 'published')
@@ -844,21 +845,27 @@
Development
-----------
-- There are tests in `spec`. We only accept PRs with tests.
-- We currently develop using Ruby 2.3.8 (see `.ruby-version`) since that version works for all versions of ActiveRecord that we support. Travis CI will test additional Ruby versions (2.4.5 and 2.5.3).
+We currently develop using Ruby 2.5.3 (see `.ruby-version`) since that version works for current versions of ActiveRecord that we support. GitHub Actions will test additional Ruby versions (2.3.8, 2.4.5, and 3.0.1).
+
+There are tests in `spec`. We only accept PRs with tests. To run tests:
+
+- Install Ruby 2.5.3
+- run `bundle install`
- Put your database credentials into `spec/support/database.yml`. There's a `database.sample.yml` you can use as a template.
- There are gem bundles in the project root for each rails version that we support.
- You can bundle all test applications by saying `bundle exec rake matrix:install`
- You can run specs from the project root by saying `bundle exec rake matrix:spec`. This will run all gemfiles compatible with your current Ruby.
If you would like to contribute:
- Fork the repository.
- Push your changes **with specs**.
- Send me a pull request.
+
+Note that we have configured GitHub Actions to automatically run tests in all supported Ruby versions and dependency sets after each push. We will only merge pull requests after a green GitHub Actions run.
I'm very eager to keep this gem leightweight and on topic. If you're unsure whether a change would make it into the gem, [talk to me beforehand](mailto:henning.koch@makandra.de).
Credits