This commit is contained in:
Grant Birkinbine 2024-03-18 10:25:47 -06:00 коммит произвёл GitHub
Родитель 9672545585 d99d088180
Коммит 0547095a39
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
20 изменённых файлов: 92 добавлений и 44 удалений

13
.github/workflows/acceptance.yml поставляемый
Просмотреть файл

@ -6,18 +6,19 @@ on:
- main
pull_request:
permissions:
contents: read
jobs:
# Detects changes to any of the source files for entitlements-app
changes:
runs-on: ubuntu-latest
permissions:
contents: read
outputs:
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'
@ -56,9 +57,7 @@ jobs:
name: runner / acceptance-tests
strategy:
matrix:
ruby: [ '2.7.5', '3.1.2' ]
permissions:
contents: read
ruby: [ '2.7.5', '3.1.2', '3.2.2', '3.3.0' ]
steps:
- uses: ruby/setup-ruby@250fcd6a742febb1123a77a841497ccaa8b9e939 # pin@v1.152.0
@ -74,7 +73,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

8
.github/workflows/build.yml поставляемый
Просмотреть файл

@ -15,11 +15,15 @@ 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
with:

11
.github/workflows/codeql-analysis.yml поставляемый
Просмотреть файл

@ -9,14 +9,15 @@ on:
schedule:
- cron: '25 4 * * 5'
permissions:
actions: read
contents: read
security-events: write
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
@ -25,7 +26,7 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL

9
.github/workflows/lint.yml поставляемый
Просмотреть файл

@ -6,19 +6,20 @@ on:
- main
pull_request:
permissions:
contents: read
jobs:
rubocop:
name: runner / rubocop
runs-on: ubuntu-latest
strategy:
matrix:
ruby: [ '2.7.5', '3.1.2' ]
permissions:
contents: read
ruby: [ '2.7.5', '3.1.2', '3.2.2', '3.3.0' ]
steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- uses: ruby/setup-ruby@250fcd6a742febb1123a77a841497ccaa8b9e939 # pin@v1.152.0
with:

2
.github/workflows/release.yml поставляемый
Просмотреть файл

@ -18,7 +18,7 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- uses: ruby/setup-ruby@250fcd6a742febb1123a77a841497ccaa8b9e939 # pin@v1.152.0
with:

9
.github/workflows/test.yml поставляемый
Просмотреть файл

@ -6,19 +6,20 @@ on:
- main
pull_request:
permissions:
contents: read
jobs:
rubocop:
name: runner / rspec
runs-on: ubuntu-latest
strategy:
matrix:
ruby: [ '2.7.5', '3.1.2' ]
permissions:
contents: read
ruby: [ '2.7.5', '3.1.2', '3.2.2', '3.3.0' ]
steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- uses: ruby/setup-ruby@250fcd6a742febb1123a77a841497ccaa8b9e939 # pin@v1.152.0
with:

2
.gitignore поставляемый
Просмотреть файл

@ -17,3 +17,5 @@ coverage/*
# Ignore JetBrains IDEs
.idea
tmp/

Просмотреть файл

@ -5,7 +5,7 @@ inherit_gem:
AllCops:
SuggestExtensions: false
DisplayCopNames: true
TargetRubyVersion: 3.1.2
TargetRubyVersion: 3.3.0
Exclude:
- 'bin/*'
- 'vendor/**/*'

Просмотреть файл

@ -1 +1 @@
3.1.2
3.3.0

Просмотреть файл

@ -94,7 +94,7 @@ GEM
rubocop (>= 1.7.0, < 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)
@ -126,7 +126,7 @@ DEPENDENCIES
rubocop (= 1.29.1)
rubocop-github (= 0.17.0)
rubocop-performance (= 1.13.3)
rugged (= 0.27.5)
rugged (~> 1.7, >= 1.7.2)
simplecov (= 0.16.1)
simplecov-erb (= 1.0.1)
vcr (= 4.0.0)

Просмотреть файл

@ -3,7 +3,7 @@
require_relative "lib/version"
Gem::Specification.new do |s|
s.name = ENV["GEM_NAME"] ? ENV["GEM_NAME"] : "entitlements-app"
s.name = ENV["GEM_NAME"] || "entitlements-app"
s.version = Entitlements::Version::VERSION
s.summary = "git-managed LDAP group configurations"
s.description = "The Ruby Gem that Powers Entitlements - GitHub's Identity and Access Management System"
@ -27,7 +27,7 @@ Gem::Specification.new do |s|
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 "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"

Просмотреть файл

@ -26,7 +26,7 @@ jobs:
runs-on: ${{ matrix.os }}-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:

Просмотреть файл

@ -37,7 +37,7 @@ jobs:
runs-on: ${{ matrix.os }}-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:

Просмотреть файл

@ -26,7 +26,7 @@ jobs:
runs-on: ${{ matrix.os }}-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:

Просмотреть файл

@ -29,7 +29,7 @@ jobs:
runs-on: ${{ matrix.os }}-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:

Просмотреть файл

@ -1,14 +1,54 @@
#!/bin/bash
#! /usr/bin/env bash
set -e
# COLORS
OFF='\033[0m'
RED='\033[0;31m'
GREEN='\033[0;32m'
BLUE='\033[0;34m'
PURPLE='\033[0;35m'
set -e # Prevent any kind of script failures
# if any of the following env vars are set, use them for the APP_ENV value
if [ -n "$APP_ENV" ]; then
export APP_ENV="$APP_ENV"
elif [ -n "$ENV" ]; then
export APP_ENV="$ENV"
elif [ -n "$ENVIRONMENT" ]; then
export APP_ENV="$ENVIRONMENT"
elif [ -n "$RAILS_ENV" ]; then
export APP_ENV="$RAILS_ENV"
elif [ -n "$RACK_ENV" ]; then
export APP_ENV="$RACK_ENV"
fi
# set the working directory to the root of the project
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"
cd "$DIR"
export PATH=/usr/share/rbenv/shims:$PATH
export RBENV_VERSION="$(cat .ruby-version)"
rm -rf "${DIR}/.bundle"
# set the ruby version to the one specified in the .ruby-version file
[ -z "$RBENV_VERSION" ] && export RBENV_VERSION=$(cat "$DIR/.ruby-version")
# Using Deprecated Flags to avoid pulling from upstream
bundle install --local
# set the app environment to development if it's not set
[ -z "$APP_ENV" ] && export APP_ENV="development"
bundle binstubs rake rspec-core rubocop
# set the path to include the rbenv shims if they exist
[ -d "/usr/share/rbenv/shims" ] && export PATH=/usr/share/rbenv/shims:$PATH
TRASHDIR=$(mktemp -d /tmp/bootstrap.XXXXXXXXXXXXXXXXX)
cleanup() {
rm -rf "$TRASHDIR"
# Remove empty directory
rmdir "$DIR/vendor/cache" 2>/dev/null || true
}
trap cleanup EXIT
# Bootstrap gem dependencies.
if [ "$APP_ENV" == "production" ]; then
echo -e "💎 ${BLUE}Installing Gems for ${GREEN}production${BLUE}...${OFF}"
BUNDLE_WITHOUT=development bundle install --local
BUNDLE_WITHOUT=development bundle binstubs --all
else
echo -e "💎 ${BLUE}Installing Gems for ${PURPLE}development${BLUE}...${OFF}"
bundle install --local
bundle binstubs --all
fi

Просмотреть файл

@ -17,7 +17,7 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
pkg-config
# Install bundler
RUN gem install bundler
RUN gem install bundler -v 2.4.22
# Bootstrap files and caching for speed
COPY "vendor/cache/" "/data/entitlements-app/vendor/cache/"

Просмотреть файл

@ -12,7 +12,7 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
ldap-utils
# Install bundler
RUN gem install bundler
RUN gem install bundler -v 2.4.22
# Bootstrap files and caching for speed
COPY "vendor/cache/" "/data/entitlements-app/vendor/cache/"

Двоичные данные
vendor/cache/rugged-0.27.5.gem поставляемый

Двоичный файл не отображается.

Двоичные данные
vendor/cache/rugged-1.7.2.gem поставляемый Normal file

Двоичный файл не отображается.