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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 73d74a22524e1a1538360b9ef7434bf89cae8bae9d2cdb6d2c23f8641ee742f5
4
- data.tar.gz: 1171a2731d591334e1bea3f2f188c9900506a71b3a89c25d307dc3af6e528afa
3
+ metadata.gz: f7b70531e828233611bd335a99c7b58babebf550ab87f17b64d09857526332ba
4
+ data.tar.gz: 3aa3f6a945bc7a7a2ab03a0450a18634f73535f2ecce68abe9192a4cf1a67f32
5
5
  SHA512:
6
- metadata.gz: c06710f4fe37f7ea58ba1a65517b42da510f3bc03314fcda954ac7a2c343d7561f330fa22be86dbaf09e38a7717493484328f544aa56dbefe83c0d46247d249c
7
- data.tar.gz: 703bd51408cfd80263cc7e35efd468a35a5ca2cd80c2dc36e9ea365083a99e440043447cbea3c0deedcb0b1d6c8cd7ea066b7ff6154c8f168913a1ddced53355
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
@@ -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
@@ -1,23 +1,24 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2020-03-27 23:01:52 -0400 using RuboCop version 0.80.1.
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: 22
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: 23
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
@@ -0,0 +1 @@
1
+ 2.6.6
@@ -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
  [![RubyGems](https://img.shields.io/gem/v/ruolo.svg)](https://rubygems.org/gems/ruolo)
4
- [![Build Status](https://travis-ci.org/mfinelli/ruolo.svg?branch=master)](https://travis-ci.org/mfinelli/ruolo)
4
+ ![Build Status](https://github.com/mfinelli/ruolo/workflows/CI/badge.svg)
5
5
  [![Coverage Status](https://coveralls.io/repos/github/mfinelli/ruolo/badge.svg?branch=master)](https://coveralls.io/github/mfinelli/ruolo?branch=master)
6
6
  [![Inline docs](http://inch-ci.org/github/mfinelli/ruolo.svg?branch=master)](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.
@@ -15,5 +15,5 @@
15
15
  # limitations under the License.
16
16
 
17
17
  module Ruolo
18
- VERSION = '0.4.0'
18
+ VERSION = '0.4.1'
19
19
  end
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.0
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-03-28 00:00:00.000000000 Z
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
- - ".travis.yml"
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.1.2
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
@@ -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