ruolo 0.4.0 → 0.4.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 +4 -4
- data/.github/workflows/default.yml +38 -0
- data/.github/workflows/publish.yml +33 -0
- data/.rubocop.yml +1 -10
- data/.rubocop_todo.yml +6 -5
- data/.ruby-version +1 -0
- data/CHANGELOG.md +5 -0
- data/README.md +4 -4
- data/lib/ruolo/version.rb +1 -1
- metadata +6 -4
- data/.travis.yml +0 -27
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f7b70531e828233611bd335a99c7b58babebf550ab87f17b64d09857526332ba
|
4
|
+
data.tar.gz: 3aa3f6a945bc7a7a2ab03a0450a18634f73535f2ecce68abe9192a4cf1a67f32
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e804857f8adfdc2b5174aa1fec17679a2e6f790e3529e5d26a63bf7d6234b9795b8194ea29d3fbd92f5d959f0ac158f3659d37cb38b3e99eb678285732ff838
|
7
|
+
data.tar.gz: 1e5e82a88a63203ec94fabfe846f75befa201655a904eb5d3b35b2dd4c2ce476719a06f5604a2f1bed956fb29e2b559ef2f5aa0f10750ce717a8eac885033eca
|
@@ -0,0 +1,38 @@
|
|
1
|
+
---
|
2
|
+
name: CI
|
3
|
+
on: push
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
main:
|
7
|
+
name: ${{ matrix.ruby }}
|
8
|
+
runs-on: ubuntu-latest
|
9
|
+
strategy:
|
10
|
+
fail-fast: false
|
11
|
+
matrix:
|
12
|
+
ruby: [2.5, 2.6, 2.7]
|
13
|
+
env:
|
14
|
+
TRAVIS: "true"
|
15
|
+
|
16
|
+
services:
|
17
|
+
postgres:
|
18
|
+
image: postgres
|
19
|
+
env:
|
20
|
+
POSTGRES_PASSWORD: ruolo
|
21
|
+
POSTGRES_USER: ruolo
|
22
|
+
options: >-
|
23
|
+
--health-cmd pg_isready
|
24
|
+
--health-interval 10s
|
25
|
+
--health-timeout 5s
|
26
|
+
--health-retries 5
|
27
|
+
ports:
|
28
|
+
- 5432:5432
|
29
|
+
|
30
|
+
steps:
|
31
|
+
- uses: actions/checkout@v2
|
32
|
+
- uses: ruby/setup-ruby@v1
|
33
|
+
with:
|
34
|
+
ruby-version: ${{ matrix.ruby }}
|
35
|
+
- run: bundle install
|
36
|
+
- run: bundle exec rubocop
|
37
|
+
- run: bundle exec rspec
|
38
|
+
- run: bundle exec yard
|
@@ -0,0 +1,33 @@
|
|
1
|
+
---
|
2
|
+
name: Publish Rubygem
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
tags:
|
6
|
+
- 'v*'
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
main:
|
10
|
+
name: Release
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
steps:
|
13
|
+
- uses: actions/checkout@v2
|
14
|
+
- uses: ruby/setup-ruby@v1
|
15
|
+
- run: gem build ruolo.gemspec
|
16
|
+
|
17
|
+
- name: setup credentials
|
18
|
+
run: |
|
19
|
+
mkdir -p $HOME/.gem
|
20
|
+
touch $HOME/.gem/credentials
|
21
|
+
chmod 0600 $HOME/.gem/credentials
|
22
|
+
printf -- "---\n:github: ${GH_API_KEY}\n" > $HOME/.gem/credentials
|
23
|
+
printf -- ":rubygems_api_key: ${RUBYGEMS_API_KEY}\n" > $HOME/.gem/credentials
|
24
|
+
env:
|
25
|
+
GH_API_KEY: Bearer ${{ secrets.GITHUB_TOKEN }}
|
26
|
+
RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
|
27
|
+
|
28
|
+
- name: publish to rubygems
|
29
|
+
run: |
|
30
|
+
gem push *.gem
|
31
|
+
- name: publish to github packages
|
32
|
+
run: |
|
33
|
+
gem push --KEY github --host https://rubygems.pkg.github.com/${{ github.repository_owner }} *.gem
|
data/.rubocop.yml
CHANGED
@@ -3,17 +3,8 @@ inherit_from: .rubocop_todo.yml
|
|
3
3
|
require: rubocop-rspec
|
4
4
|
|
5
5
|
AllCops:
|
6
|
+
NewCops: enable
|
6
7
|
TargetRubyVersion: 2.5.0
|
7
8
|
|
8
9
|
Layout/ExtraSpacing:
|
9
10
|
AllowForAlignment: false
|
10
|
-
|
11
|
-
# TODO: remove on next major rubocop
|
12
|
-
Style/HashEachMethods:
|
13
|
-
Enabled: true
|
14
|
-
|
15
|
-
Style/HashTransformKeys:
|
16
|
-
Enabled: true
|
17
|
-
|
18
|
-
Style/HashTransformValues:
|
19
|
-
Enabled: true
|
data/.rubocop_todo.yml
CHANGED
@@ -1,23 +1,24 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on 2020-
|
3
|
+
# on 2020-10-02 21:59:57 UTC using RuboCop version 0.92.0.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
8
8
|
|
9
9
|
# Offense count: 2
|
10
|
+
# Configuration parameters: IgnoredMethods.
|
10
11
|
Metrics/AbcSize:
|
11
|
-
Max:
|
12
|
+
Max: 24
|
12
13
|
|
13
14
|
# Offense count: 7
|
14
|
-
# Configuration parameters: CountComments, ExcludedMethods.
|
15
|
+
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods.
|
15
16
|
# ExcludedMethods: refine
|
16
17
|
Metrics/BlockLength:
|
17
18
|
Max: 87
|
18
19
|
|
19
20
|
# Offense count: 2
|
20
|
-
# Configuration parameters: CountComments, ExcludedMethods.
|
21
|
+
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods.
|
21
22
|
Metrics/MethodLength:
|
22
23
|
Max: 12
|
23
24
|
|
@@ -50,7 +51,7 @@ Style/Documentation:
|
|
50
51
|
- 'test/**/*'
|
51
52
|
- 'bin/console'
|
52
53
|
|
53
|
-
# Offense count:
|
54
|
+
# Offense count: 7
|
54
55
|
# Cop supports --auto-correct.
|
55
56
|
# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
56
57
|
# URISchemes: http, https
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.6.6
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,11 @@
|
|
3
3
|
This file keeps track of changes between releases for the ruolo project
|
4
4
|
which adheres to [semantic versioning](https://semver.org).
|
5
5
|
|
6
|
+
## v0.4.1 2020-10-04
|
7
|
+
|
8
|
+
Correct sample database constraints to remove a useless regular expression
|
9
|
+
escape.
|
10
|
+
|
6
11
|
## v0.4.0 2020-03-27
|
7
12
|
|
8
13
|
Add `set_roles` method to the user mixin to synchronize desired roles for an
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# Ruolo
|
2
2
|
|
3
3
|
[](https://rubygems.org/gems/ruolo)
|
4
|
-
|
4
|
+

|
5
5
|
[](https://coveralls.io/github/mfinelli/ruolo?branch=master)
|
6
6
|
[](http://inch-ci.org/github/mfinelli/ruolo)
|
7
7
|
|
@@ -61,7 +61,7 @@ Sequel.migration do
|
|
61
61
|
column :created_at, DateTime, null: false
|
62
62
|
column :updated_at, DateTime, null: false
|
63
63
|
|
64
|
-
constraint(:valid_name, name: /^[A-Z]([A-Z0-9]*[
|
64
|
+
constraint(:valid_name, name: /^[A-Z]([A-Z0-9]*[\-._]?)*$/)
|
65
65
|
end
|
66
66
|
|
67
67
|
create_table :permissions do
|
@@ -72,7 +72,7 @@ Sequel.migration do
|
|
72
72
|
column :created_at, DateTime, null: false
|
73
73
|
column :updated_at, DateTime, null: false
|
74
74
|
|
75
|
-
constraint(:valid_name, name: /^[A-Z]([A-Z0-9]*[
|
75
|
+
constraint(:valid_name, name: /^[A-Z]([A-Z0-9]*[\-._]?)*$/)
|
76
76
|
end
|
77
77
|
|
78
78
|
create_table :users_roles do
|
@@ -178,7 +178,7 @@ $ bundle exec bin/console
|
|
178
178
|
## License
|
179
179
|
|
180
180
|
```
|
181
|
-
Copyright 2019 Mario Finelli
|
181
|
+
Copyright 2019-2020 Mario Finelli
|
182
182
|
|
183
183
|
Licensed under the Apache License, Version 2.0 (the "License");
|
184
184
|
you may not use this file except in compliance with the License.
|
data/lib/ruolo/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruolo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mario Finelli
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-10-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sequel
|
@@ -201,11 +201,13 @@ extensions: []
|
|
201
201
|
extra_rdoc_files: []
|
202
202
|
files:
|
203
203
|
- ".editorconfig"
|
204
|
+
- ".github/workflows/default.yml"
|
205
|
+
- ".github/workflows/publish.yml"
|
204
206
|
- ".gitignore"
|
205
207
|
- ".rspec"
|
206
208
|
- ".rubocop.yml"
|
207
209
|
- ".rubocop_todo.yml"
|
208
|
-
- ".
|
210
|
+
- ".ruby-version"
|
209
211
|
- CHANGELOG.md
|
210
212
|
- Gemfile
|
211
213
|
- LICENSE
|
@@ -239,7 +241,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
239
241
|
- !ruby/object:Gem::Version
|
240
242
|
version: '0'
|
241
243
|
requirements: []
|
242
|
-
rubygems_version: 3.
|
244
|
+
rubygems_version: 3.0.3
|
243
245
|
signing_key:
|
244
246
|
specification_version: 4
|
245
247
|
summary: A library to keep your static role-based access control policies in sync
|
data/.travis.yml
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
---
|
2
|
-
sudo: false
|
3
|
-
|
4
|
-
language: ruby
|
5
|
-
rvm:
|
6
|
-
- 2.5
|
7
|
-
- 2.6
|
8
|
-
- 2.7
|
9
|
-
|
10
|
-
services:
|
11
|
-
- postgresql
|
12
|
-
|
13
|
-
before_script:
|
14
|
-
- psql -c 'create database ruolo;' -U postgres
|
15
|
-
|
16
|
-
before_install:
|
17
|
-
- gem update --system
|
18
|
-
- gem install bundler
|
19
|
-
- gem --version
|
20
|
-
|
21
|
-
script:
|
22
|
-
- bundle exec rubocop
|
23
|
-
- bundle exec rspec
|
24
|
-
- bundle exec yard
|
25
|
-
|
26
|
-
notifications:
|
27
|
-
email: false
|