Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Run any command in this library's bin/ without the bin/ prefix!
PATH_add bin

# Only add things to this file that should be shared with the team.

# **dotenv** (See end of file for .env.local integration)
# .env would override anything in this file, if enabled.
# .env is a DOCKER standard, and if we use it, it would be in deployed, or DOCKER, environments.
# Override and customize anything below in your own .env.local
# If you are using dotenv and not direnv,
# copy the following `export` statements to your own .env file.

### General Ruby ###
# Turn off Ruby Warnings about deprecated code
# export RUBYOPT="-W0"

### External Testing Controls
export K_SOUP_COV_DO=true # Means you want code coverage
# Available formats are html, xml, rcov, lcov, json, tty
export K_SOUP_COV_COMMAND_NAME="RSpec Coverage"
export K_SOUP_COV_FORMATTERS="html,tty"
export K_SOUP_COV_MIN_BRANCH=99 # Means you want to enforce X% branch coverage
export K_SOUP_COV_MIN_LINE=100 # Means you want to enforce X% line coverage
export K_SOUP_COV_MIN_HARD=true # Means you want the build to fail if the coverage thresholds are not met
export K_SOUP_COV_MULTI_FORMATTERS=true
export K_SOUP_COV_OPEN_BIN= # Means don't try to open coverage results in browser
export MAX_ROWS=1 # Setting for simplecov-console gem for tty output, limits to the worst N rows of bad coverage

# Internal Debugging Controls
export DEBUG=false # do not allow byebug statements (override in .env.local)

# .env would override anything in this file, if `dotenv` is uncommented below.
# .env is a DOCKER standard, and if we use it, it would be in deployed, or DOCKER, environments,
# and that is why we generally want to leave it commented out.
# dotenv

# .env.local will override anything in this file.
dotenv_if_exists .env.local
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ liberapay: pboling # Replace with a single Liberapay username
open_collective: # Replace with a single Open Collective username
patreon: galtzo # Replace with a single Patreon username
polar: pboling
thanks_dev: gh/pboling
thanks_dev: u/gh/pboling
tidelift: rubygems/oauth2 # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@ updates:
open-pull-requests-limit: 10
ignore:
- dependency-name: "rubocop-lts"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
4 changes: 2 additions & 2 deletions .github/workflows/heads.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ jobs:
- f1
- f2
rubygems:
- latest
- default
bundler:
- latest
- default
ruby:
- truffleruby+graalvm-head
- truffleruby-head
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/jruby-head.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ jobs:
- f1
- f2
rubygems:
- latest
- default
bundler:
- latest
- default
ruby:
- jruby-head
include:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
bundler:
- latest
ruby:
- "2.7"
- ruby
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,6 @@
# Version Managers
.ruby-version
.tool-versions

# Local config
.env.local
54 changes: 47 additions & 7 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
default:
image: ruby:3.2

variables:
BUNDLE_INSTALL_FLAGS: "--quiet --jobs=$(nproc) --retry=3"
BUNDLE_FROZEN: "false" # No lockfile!
K_SOUP_COV_DEBUG: true
K_SOUP_COV_DO: true
K_SOUP_COV_HARD: true
K_SOUP_COV_MIN_BRANCH: 98
K_SOUP_COV_MIN_LINE: 98
K_SOUP_COV_VERBOSE: true
K_SOUP_COV_FORMATTERS: "html,xml,rcov,lcov,json,tty"
K_SOUP_COV_MULTI_FORMATTERS: true
K_SOUP_COV_COMMAND_NAME: "RSpec Coverage"

workflow:
rules:
# For merge requests, create a pipeline.
Expand All @@ -16,8 +29,8 @@ workflow:
script:
- gem update --system > /dev/null 2>&1
- bundle config --local path vendor
- bundle install --quiet --jobs 4 --retry 3
- bundle exec rake test
- bundle install
- bundle exec rake
cache:
key: ${CI_JOB_IMAGE}
paths:
Expand All @@ -28,24 +41,51 @@ workflow:
stage: test
script:
# Because we support EOL Ruby still...
- gem install rubygems-update -v 3.4.22 > /dev/null 2>&1
- gem install rubygems-update -v ${RUBYGEMS_VERSION}
# Actually updates both RubyGems and Bundler!
- update_rubygems > /dev/null 2>&1
- update_rubygems
- bundle config --local path vendor
- bundle install --quiet --jobs 4 --retry 3
- bundle install
- bundle exec rake test
cache:
key: ${CI_JOB_IMAGE}
paths:
- vendor/ruby

ruby-current:
variables:
BUNDLE_GEMFILE: gemfiles/omnibus.gemfile
K_SOUP_COV_DO: true
<<: *test_definition-current
parallel:
matrix:
- RUBY_VERSION: ["3.0", "3.1", "3.2"]
- RUBY_VERSION: ["3.2", "3.3", "3.4"]

ruby-ruby3_1:
variables:
RUBYGEMS_VERSION: "3.6.9"
BUNDLE_GEMFILE: gemfiles/vanilla.gemfile
K_SOUP_COV_DO: false
<<: *test_definition-legacy
parallel:
matrix:
- RUBY_VERSION: ["3.1"]

ruby-ruby3_0:
variables:
RUBYGEMS_VERSION: "3.5.23"
BUNDLE_GEMFILE: gemfiles/vanilla.gemfile
K_SOUP_COV_DO: false
<<: *test_definition-legacy
parallel:
matrix:
- RUBY_VERSION: ["3.0"]

ruby-legacy:
ruby-ruby2_7:
variables:
RUBYGEMS_VERSION: "3.4.22"
BUNDLE_GEMFILE: gemfiles/vanilla.gemfile
K_SOUP_COV_DO: false
<<: *test_definition-legacy
parallel:
matrix:
Expand Down
2 changes: 1 addition & 1 deletion .rspec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
--format documentation
--require spec_helper
--color
--require spec_helper
--order random
32 changes: 4 additions & 28 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
inherit_from:
- .rubocop_todo.yml
- .rubocop_rspec.yml

inherit_gem:
rubocop-lts: rubocop-lts.yml

require:
# Try adding back once we reach rubocop-ruby2_3+
# - 'rubocop-md'
# Can be added once we reach rubocop-ruby2_3+
# - 'rubocop-packaging'
- 'rubocop-performance'
- 'rubocop-rake'
- 'rubocop-rspec'
inherit_from:
- .rubocop_rspec.yml

AllCops:
DisplayCopNames: true # Display the name of the failing cops
Expand All @@ -22,23 +12,15 @@ AllCops:
- '**/.irbrc'

Metrics/BlockLength:
ExcludedMethods:
- context
- describe
- it
- shared_context
- shared_examples
- shared_examples_for
- namespace
- draw
Enabled: false

Gemspec/RequiredRubyVersion:
Enabled: false

Metrics/BlockNesting:
Max: 2

Metrics/LineLength:
Layout/LineLength:
Enabled: false

Metrics/ParameterLists:
Expand All @@ -60,12 +42,6 @@ Lint/UnusedBlockArgument:
- 'vendor/**/*'
- '**/.irbrc'

RSpec/DescribeClass:
Exclude:
- 'spec/examples/*'

RSpec/NestedGroups:
Enabled: false

Style/ClassVars:
Enabled: false
Expand Down
Loading
Loading