Skip to content

Commit

Permalink
Merge pull request #21 from github/updates
Browse files Browse the repository at this point in the history
General Updates
  • Loading branch information
GrantBirki authored Mar 28, 2024
2 parents 6a5dc8c + b727ce4 commit 65a53df
Show file tree
Hide file tree
Showing 62 changed files with 249 additions and 108 deletions.
29 changes: 29 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
version: 2
updates:
- package-ecosystem: bundler
vendor: true
directory: "/"
schedule:
interval: weekly
day: "monday"
time: "21:00"
groups:
prod-ruby-dependencies:
dependency-type: "production"
patterns:
- "*"
dev-ruby-dependencies:
dependency-type: "development"
patterns:
- "*"
- package-ecosystem: github-actions
directory: "/"
groups:
github-actions:
patterns:
- "*"
schedule:
interval: weekly
day: "tuesday"
time: "21:00"
10 changes: 5 additions & 5 deletions .github/workflows/acceptance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
has_change: ${{ steps.diff.outputs.has_change}}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- id: fetch-base
if: github.event_name == 'pull_request'
Expand Down Expand Up @@ -50,10 +50,10 @@ jobs:
if: github.event_name == 'push'
run: echo "::set-output name=has_change::true"

acceptance-suite:
acceptance:
needs: changes
runs-on: ubuntu-latest
name: runner / acceptance-tests
runs-on: ubuntu-latest-xl
name: acceptance
permissions:
contents: read

Expand All @@ -67,7 +67,7 @@ jobs:
- name: checkout
if: ${{ needs.changes.outputs.has_change == 'true' }}
uses: actions/checkout@v3
uses: actions/checkout@v4

# Use Docker layer caching for 'docker build' and 'docker-compose build' commands.
# https://github.com/satackey/action-docker-layer-caching/releases/tag/v0.0.11
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,17 @@ permissions:
jobs:
build:
name: build
runs-on: ubuntu-latest

strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}

steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- uses: ruby/setup-ruby@250fcd6a742febb1123a77a841497ccaa8b9e939 # pin@v1.152.0
- uses: ruby/setup-ruby@5f19ec79cedfadb78ab837f95b87734d0003c899 # pin@v1.173.0
with:
bundler-cache: true

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/gem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ jobs:

steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- uses: ruby/setup-ruby@250fcd6a742febb1123a77a841497ccaa8b9e939 # pin@v1.152.0
- uses: ruby/setup-ruby@5f19ec79cedfadb78ab837f95b87734d0003c899 # pin@v1.173.0
with:
bundler-cache: true

Expand All @@ -31,7 +31,7 @@ jobs:
run: bundle exec rubocop -c .rubocop.yml lib/ spec/

- name: test
run: script/test
run: script/test -d -k

- name: set GEM_NAME from gemspec
run: echo "GEM_NAME=$(ls | grep gemspec | cut -d. -f1)" >> $GITHUB_ENV
Expand All @@ -46,7 +46,7 @@ jobs:
GEM_HOST_API_KEY=${{ secrets.GITHUB_TOKEN }} gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} ${{ env.GEM_NAME }}-${{ env.GEM_VERSION }}.gem
- name: release
uses: ncipollo/release-action@a2e71bdd4e7dab70ca26a852f29600c98b33153e # pin@v1.12.0
uses: ncipollo/release-action@2c591bcc8ecdcd2db72b97d6147f871fcd833ba5 # pin@v1.14.0
with:
artifacts: "${{ env.GEM_NAME }}-${{ env.GEM_VERSION }}.gem"
tag: "v${{ env.GEM_VERSION }}"
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,24 @@ on:
- main
pull_request:

permissions:
contents: read

jobs:
rubocop:
name: runner / rubocop
lint:
name: lint
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- uses: ruby/setup-ruby@250fcd6a742febb1123a77a841497ccaa8b9e939 # pin@v1.152.0
- uses: ruby/setup-ruby@5f19ec79cedfadb78ab837f95b87734d0003c899 # pin@v1.173.0
with:
bundler-cache: true

- name: bootstrap
run: script/bootstrap

- name: rubocop
run: bundle exec rubocop -c .rubocop.yml lib/ spec/
23 changes: 16 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,29 @@ on:
- main
pull_request:

permissions:
contents: read

jobs:
rubocop:
name: runner / rspec
test:
name: test
runs-on: ubuntu-latest
permissions:
contents: read

strategy:
matrix:
ruby: [ '3.1.2', '3.1.4', '3.2.2', '3.2.3', '3.3.0' ]

steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- uses: ruby/setup-ruby@250fcd6a742febb1123a77a841497ccaa8b9e939 # pin@v1.152.0
- uses: ruby/setup-ruby@5f19ec79cedfadb78ab837f95b87734d0003c899 # pin@v1.173.0
with:
bundler-cache: true
ruby-version: ${{ matrix.ruby }}

- name: bootstrap
run: script/bootstrap

- name: rspec tests
run: script/test -d
run: script/test -d -k
3 changes: 2 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ inherit_gem:
- config/default.yml

AllCops:
NewCops: disable
SuggestExtensions: false
DisplayCopNames: true
TargetRubyVersion: 3.1
TargetRubyVersion: 3.3
Exclude:
- 'bin/*'
- 'spec/acceptance/fixtures/**/*'
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1.2
3.3.0
90 changes: 52 additions & 38 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,59 +1,70 @@
PATH
remote: .
specs:
entitlements-gitrepo-auditor-plugin (0.4.0)
entitlements-gitrepo-auditor-plugin (0.4.1)
contracts (~> 0.17)
entitlements-app (~> 0.3)

GEM
remote: https://rubygems.org/
specs:
activesupport (7.0.7.2)
activesupport (7.1.3.2)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
addressable (2.8.5)
public_suffix (>= 2.0.2, < 6.0)
ast (2.4.2)
base64 (0.1.1)
bigdecimal (3.1.7)
concurrent-ruby (1.1.9)
connection_pool (2.4.1)
contracts (0.17)
crack (0.4.5)
rexml
diff-lcs (1.5.0)
docile (1.4.0)
entitlements-app (0.3.0)
drb (2.2.1)
entitlements-app (0.3.1)
concurrent-ruby (= 1.1.9)
faraday (~> 2.0)
net-ldap (~> 0.17)
octokit (~> 4.18)
optimist (= 3.0.0)
faraday (2.7.11)
base64
faraday-net_http (>= 2.0, < 3.1)
ruby2_keywords (>= 0.0.4)
faraday-net_http (3.0.2)
faraday (2.9.0)
faraday-net_http (>= 2.0, < 3.2)
faraday-net_http (3.1.0)
net-http
hashdiff (1.0.1)
i18n (1.14.1)
i18n (1.14.4)
concurrent-ruby (~> 1.0)
json (2.6.3)
minitest (5.19.0)
net-ldap (0.18.0)
language_server-protocol (3.17.0.3)
minitest (5.22.3)
mutex_m (0.2.0)
net-http (0.4.1)
uri
net-ldap (0.19.0)
octokit (4.25.1)
faraday (>= 1, < 3)
sawyer (~> 0.9)
optimist (3.0.0)
parallel (1.23.0)
parser (3.2.2.3)
parallel (1.24.0)
parser (3.3.0.5)
ast (~> 2.4.1)
racc
public_suffix (5.0.3)
racc (1.7.1)
rack (3.0.8)
racc (1.7.3)
rack (3.0.10)
rainbow (3.1.1)
rake (13.0.6)
regexp_parser (2.8.1)
regexp_parser (2.9.0)
rexml (3.2.6)
rspec (3.8.0)
rspec-core (~> 3.8.0)
Expand All @@ -68,31 +79,33 @@ GEM
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.8.0)
rspec-support (3.8.3)
rubocop (1.29.1)
rubocop (1.62.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.1.0.0)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.17.0, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.29.0)
parser (>= 3.2.1.0)
rubocop-github (0.17.0)
rubocop
rubocop-performance
rubocop-rails
rubocop-performance (1.13.3)
rubocop (>= 1.7.0, < 2.0)
rubocop-ast (>= 0.4.0)
rubocop-rails (2.15.2)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.31.2)
parser (>= 3.3.0.4)
rubocop-github (0.20.0)
rubocop (>= 1.37)
rubocop-performance (>= 1.15)
rubocop-rails (>= 2.17)
rubocop-performance (1.20.2)
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.30.0, < 2.0)
rubocop-rails (2.24.1)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.7.0, < 2.0)
rubocop (>= 1.33.0, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
ruby-progressbar (1.13.0)
ruby2_keywords (0.0.5)
rugged (0.27.5)
rugged (1.7.2)
sawyer (0.9.2)
addressable (>= 2.3.5)
faraday (>= 0.17.3, < 3)
Expand All @@ -105,7 +118,8 @@ GEM
simplecov-html (0.10.2)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.4.2)
unicode-display_width (2.5.0)
uri (0.13.0)
vcr (4.0.0)
webmock (3.4.2)
addressable (>= 2.3.6)
Expand All @@ -120,10 +134,10 @@ DEPENDENCIES
rake (= 13.0.6)
rspec (= 3.8.0)
rspec-core (= 3.8.0)
rubocop (= 1.29.1)
rubocop-github (= 0.17.0)
rubocop-performance (= 1.13.3)
rugged (= 0.27.5)
rubocop (= 1.62.1)
rubocop-github (= 0.20.0)
rubocop-performance (= 1.20.2)
rugged (~> 1.7, >= 1.7.2)
simplecov (= 0.16.1)
simplecov-erb (= 1.0.1)
vcr (= 4.0.0)
Expand Down
8 changes: 4 additions & 4 deletions entitlements-gitrepo-auditor-plugin.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ Gem::Specification.new do |s|
s.add_development_dependency "rake", "= 13.0.6"
s.add_development_dependency "rspec", "= 3.8.0"
s.add_development_dependency "rspec-core", "= 3.8.0"
s.add_development_dependency "rubocop", "= 1.29.1"
s.add_development_dependency "rubocop-github", "= 0.17.0"
s.add_development_dependency "rubocop-performance", "= 1.13.3"
s.add_development_dependency "rugged", "= 0.27.5"
s.add_development_dependency "rubocop", "= 1.62.1"
s.add_development_dependency "rubocop-github", "= 0.20.0"
s.add_development_dependency "rubocop-performance", "= 1.20.2"
s.add_development_dependency "rugged", "~> 1.7", ">= 1.7.2"
s.add_development_dependency "simplecov", "= 0.16.1"
s.add_development_dependency "simplecov-erb", "= 1.0.1"
s.add_development_dependency "vcr", "= 4.0.0"
Expand Down
2 changes: 1 addition & 1 deletion lib/entitlements/auditor/gitrepo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ def member_strings_as_text(group)
end

member_array = if config["person_dn_format"]
group.member_strings.map { |ms| config["person_dn_format"].gsub("%KEY%", ms).downcase }
group.member_strings.map { |ms| config["person_dn_format"].gsub("%KEY%", ms).downcase }
else
group.member_strings.map(&:downcase)
end
Expand Down
2 changes: 1 addition & 1 deletion lib/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

module Entitlements
module Version
VERSION = "0.4.0"
VERSION = "0.4.1"
end
end
Loading

0 comments on commit 65a53df

Please sign in to comment.