Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Appraisal & Combustion; Rails 3, 6, & 7 Compat fixes #105

Merged
merged 51 commits into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
9b4524a
🧑‍💻 Default to No DEBUG=true
pboling Apr 24, 2024
a441d1c
👷 Setup Appraisal
pboling Apr 24, 2024
775d8f0
👷 Attempt to use custom RuboCop version
pboling Apr 24, 2024
98022ce
👷 Unspecify rubygems version for old Ruby + Rails combos
pboling Apr 24, 2024
8fe74b2
👷 Remove rubygems version for old Ruby + Rails combos
pboling Apr 24, 2024
812f187
👷 Specify old bundler version for old Ruby + Rails combos
pboling Apr 24, 2024
bcba087
👷 Experimental true for finicky bundler/rubygems combos
pboling Apr 24, 2024
1c39a85
🚨 Lint lock
pboling Apr 24, 2024
d7a996d
👷 RAILS_VERSION
pboling Apr 25, 2024
7024e25
👷 RAILS_MAJOR_MINOR
pboling Apr 25, 2024
a50d040
👷 Ancient Rails Support
pboling Apr 25, 2024
da4dc0e
👷 Fix names
pboling Apr 25, 2024
aec83d4
💚 Fix test
pboling Apr 25, 2024
9ba65ac
💚 Fix test
pboling Apr 25, 2024
abffda5
💚 Fix tests
pboling Apr 25, 2024
03f369c
💚 Fix env variables
pboling Apr 25, 2024
e6e9ee8
💚 Fix env variables
pboling Apr 25, 2024
97227c5
💚 Fix rdoc version
pboling Apr 25, 2024
bd55953
💚 Allow JSON Version for Rails 4 support
pboling Apr 25, 2024
81b4ed3
💚 consolidate on matrix.rails
pboling Apr 25, 2024
252582f
✨ Combustion Test Rails App
pboling Apr 25, 2024
80436b2
✨ Combustion Testing
pboling Apr 25, 2024
90e5fb2
👷 Combustion Testing
pboling Apr 25, 2024
d01844b
💚 Fix dependency version pins
pboling Apr 25, 2024
6245fbc
💚 Fix code coverage
pboling Apr 25, 2024
869455f
🔨 Regenerate Appraisals
pboling Apr 25, 2024
60350bf
➖ Min branch cov = 72%
pboling Apr 25, 2024
11b04bc
🔧 Fix path to gemspec
pboling Apr 25, 2024
8fb9c91
➖ rspec-rails
pboling Apr 25, 2024
8925274
➖ actionpack
pboling Apr 25, 2024
de55a08
✅ Add back Rails 3.0-, 3.1, 3.2
pboling Apr 25, 2024
58f4329
📌 rake v10 for ancient Appraisals
pboling Apr 25, 2024
535f862
📌 tzinfo v1 for ancient Rails
pboling Apr 25, 2024
8ce2ba0
📌 delivery_method :test for Rails 3
pboling Apr 25, 2024
cfe23bf
📌 undefined method `unparsed_value' for #<Mail::OptionalField> on Rai…
pboling Apr 25, 2024
8e79c63
📌 branch coverage @ 71%
pboling Apr 25, 2024
9b7c64a
📌 undefined method `unparsed_value' for #<Mail::OptionalField> on Rai…
pboling Apr 25, 2024
34a9110
💚 Fix test on Rails 3
pboling Apr 25, 2024
20bb3fa
💚 Fix typo
pboling Apr 25, 2024
7074380
🚨 Lint lock
pboling Apr 25, 2024
636adab
👷 Turn off experimental CI flags
pboling Apr 25, 2024
c8b1006
👷 prefer block_is_expected
pboling Apr 25, 2024
3f42d56
🔥 Remove bogus comment
pboling Apr 25, 2024
a167e45
🔥 Remove bogus comments
pboling Apr 25, 2024
cbd28fe
📝 Improve documentation
pboling Apr 25, 2024
5d18028
🚨 Disable RSpec/ExampleLength
pboling Apr 25, 2024
8f81cd4
📝 Documentation
pboling Apr 25, 2024
842e47a
🔧 89% coverage
pboling Apr 25, 2024
35bc9ee
🔖 Prepare release v2.0.6
pboling Apr 25, 2024
b2f8166
🚨 Lint lock
pboling Apr 25, 2024
134b8aa
📝 Improved documentation
pboling Apr 25, 2024
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
6 changes: 4 additions & 2 deletions .envrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
### External Testing Controls
export K_SOUP_COV_DO=true # Means you want code coverage
export K_SOUP_COV_MIN_BRANCH=71 # Means you want to enforce X% branch coverage
export K_SOUP_COV_MIN_LINE=90 # Means you want to enforce X% line coverage
export K_SOUP_COV_MIN_LINE=89 # 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
# Available formats are html, xml, rcov, lcov, json, tty
export K_SOUP_COV_MULTI_FORMATTERS="html,tty" # What coverage output formats do you want?
export MAX_ROWS=5 # Setting for simplecov-console gem for tty output, limits to the worst N rows of bad coverage
export DEBUG=true # allow byebug statements
# export DEBUG=true # allow byebug statements
export RAILS_VERSION="~> 7.1"
export RAILS_MAJOR_MINOR=7.1
82 changes: 82 additions & 0 deletions .github/workflows/ancient.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Rails 3 - 4.1 on EOL Ruby 2.3

on:
push:
branches:
- 'main'
- '*-stable'
- '*-dev'
tags:
- '!*' # Do not execute on tags
pull_request:
branches:
- '*'
# Allow manually triggering the workflow.
workflow_dispatch:

# Cancels all previous workflow runs for the same branch that have not yet completed.
concurrency:
# The concurrency group contains the workflow name and the branch name.
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true

jobs:
test:
name: Specs - Ruby ${{ matrix.ruby }} & Rails ${{ matrix.rails }} ${{ matrix.name_extra || '' }}
if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')"
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
# rspec-rails uses RAILS_VERSION internally
RAILS_VERSION: "~> ${{ matrix.rails }}"
# Our spec suite (not runtime code) uses RAILS_MAJOR_MINOR internally
RAILS_MAJOR_MINOR: ${{ matrix.rails }}
strategy:
fail-fast: false
matrix:
include:
- ruby: "2.3"
appraisal: "rails-4-1"
bundler: '1.17.3'
gemfile: vanilla
rails: "4.1"
- ruby: "2.3"
appraisal: "rails-4-0"
bundler: '1.17.3'
gemfile: vanilla
rails: "4.0"
- ruby: "2.3"
appraisal: "rails-3-2"
bundler: '1.17.3'
gemfile: vanilla
rails: "3.2"
- ruby: "2.3"
appraisal: "rails-3-1"
bundler: '1.17.3'
gemfile: vanilla
rails: "3.1"
- ruby: "2.3"
appraisal: "rails-3-0"
bundler: '1.17.3'
gemfile: vanilla
rails: "3.0"
runs-on: ubuntu-20.04
continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Ruby & RubyGems
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
rubygems: ${{ matrix.rubygems }}
bundler: ${{ matrix.bundler }}
bundler-cache: false
# This will use the BUNDLE_GEMFILE set to matrix.gemfile (i.e. vanilla)
# We need to do this first to get appraisal installed.
# NOTE: This does not use the root Gemfile at all.
- name: Bundle for Appraisal ${{ matrix.appraisal }} (Rails v${{ matrix.rails}})
run: bundle _1.17.3_ install
- name: Install Appraisal ${{ matrix.appraisal }} (Rails v${{ matrix.rails}}) dependencies
run: bundle _1.17.3_ exec appraisal ${{ matrix.appraisal }} bundle _1.17.3_ install
- name: Run tests ${{ matrix.appraisal }} (Rails v${{ matrix.rails}})
run: bundle _1.17.3_ exec appraisal ${{ matrix.appraisal }} bundle _1.17.3_ exec rake test
6 changes: 3 additions & 3 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Ruby - Coverage

env:
K_SOUP_COV_MIN_BRANCH: 73
K_SOUP_COV_MIN_LINE: 90
K_SOUP_COV_MIN_BRANCH: 71
K_SOUP_COV_MIN_LINE: 89
K_SOUP_COV_MIN_HARD: true

on:
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Ruby & Bundle
- name: Setup Ruby & RubyGems
uses: ruby/setup-ruby@v1
with:
ruby-version: "${{ matrix.ruby }}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/heads.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Ruby & Bundle
- name: Setup Ruby & RubyGems
uses: ruby/setup-ruby@v1
with:
ruby-version: "${{ matrix.ruby }}"
Expand Down
136 changes: 115 additions & 21 deletions .github/workflows/legacy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Legacy Ruby Support
name: Rails 4.2, 5, 6, 7 on EOL Ruby 2.5 - 3.0

on:
push:
Expand All @@ -17,43 +17,137 @@ on:
# Cancels all previous workflow runs for the same branch that have not yet completed.
concurrency:
# The concurrency group contains the workflow name and the branch name.
group: ${{ github.workflow }}-${{ github.ref }}
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true

jobs:
test:
name: Ruby ${{ matrix.ruby }} ${{ matrix.name_extra || '' }}
name: Specs - Ruby ${{ matrix.ruby }} & Rails ${{ matrix.rails }} ${{ matrix.name_extra || '' }}
if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')"
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
# rspec-rails uses RAILS_VERSION internally
RAILS_VERSION: "~> ${{ matrix.rails }}"
# Our spec suite (not runtime code) uses RAILS_MAJOR_MINOR internally
RAILS_MAJOR_MINOR: ${{ matrix.rails }}
strategy:
fail-fast: false
matrix:
experimental: [false]
rubygems:
- "2.7.11"
bundler:
- none
gemfile:
- vanilla
ruby:
- "3.0"
- "2.7"
- "2.6"
- "2.5"
- "2.4"
- "2.3"
include:
- ruby: "3.0"
appraisal: "rails-7-1"
rubygems: "3.3.27"
bundler: none
gemfile: vanilla
rails: "7.1"
- ruby: "3.0"
appraisal: "rails-7-0"
rubygems: "3.3.27"
bundler: none
gemfile: vanilla
rails: "7.0"
- ruby: "3.0"
appraisal: "rails-6-1"
rubygems: "3.3.27"
bundler: none
gemfile: vanilla
rails: "6.1"
- ruby: "2.7"
appraisal: "rails-7-1"
rubygems: "3.3.27"
bundler: none
gemfile: vanilla
rails: "7.1"
- ruby: "2.7"
appraisal: "rails-7-0"
rubygems: "3.3.27"
bundler: none
gemfile: vanilla
rails: "7.0"
- ruby: "2.7"
appraisal: "rails-6-1"
rubygems: "3.3.27"
bundler: none
gemfile: vanilla
rails: "6.1"
- ruby: "2.7"
appraisal: "rails-6-0"
rubygems: "3.3.27"
bundler: none
gemfile: vanilla
rails: "6.0"
- ruby: "2.7"
appraisal: "rails-5-2"
rubygems: "3.3.27"
bundler: none
gemfile: vanilla
rails: "5.2"
- ruby: "2.6"
appraisal: "rails-6-1"
rubygems: "3.3.27"
bundler: none
gemfile: vanilla
rails: "6.1"
- ruby: "2.6"
appraisal: "rails-6-0"
rubygems: "3.3.27"
bundler: none
gemfile: vanilla
rails: "6.0"
- ruby: "2.6"
appraisal: "rails-5-2"
rubygems: "3.3.27"
bundler: none
gemfile: vanilla
rails: "5.2"
- ruby: "2.5"
appraisal: "rails-6-1"
rubygems: "3.3.27"
bundler: none
gemfile: vanilla
rails: "6.1"
- ruby: "2.5"
appraisal: "rails-6-0"
rubygems: "3.3.27"
bundler: none
gemfile: vanilla
rails: "6.0"
- ruby: "2.5"
appraisal: "rails-5-2"
rubygems: "3.3.27"
bundler: none
gemfile: vanilla
rails: "5.2"
- ruby: "2.5"
appraisal: "rails-5-1"
rubygems: "3.3.27"
bundler: none
gemfile: vanilla
rails: "5.1"
- ruby: "2.5"
appraisal: "rails-4-2"
rubygems: "3.3.27"
bundler: none
gemfile: vanilla
rails: "4.2"
runs-on: ubuntu-20.04
continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Ruby & Bundle
- name: Setup Ruby & RubyGems
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
rubygems: ${{ matrix.rubygems }}
bundler: ${{ matrix.bundler }}
bundler-cache: true
- name: Run tests
run: bundle exec rake test
bundler-cache: false
# This will use the BUNDLE_GEMFILE set to matrix.gemfile (i.e. vanilla)
# We need to do this first to get appraisal installed.
# NOTE: This does not use the root Gemfile at all.
- name: Bundle for Appraisal ${{ matrix.appraisal }} (Rails v${{ matrix.rails}})
run: bundle
- name: Install Appraisal ${{ matrix.appraisal }} (Rails v${{ matrix.rails}}) dependencies
run: bundle exec appraisal ${{ matrix.appraisal }} bundle
- name: Run tests ${{ matrix.appraisal }} (Rails v${{ matrix.rails}})
run: bundle exec appraisal ${{ matrix.appraisal }} bundle exec rake test
3 changes: 1 addition & 2 deletions .github/workflows/style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jobs:
strategy:
fail-fast: false
matrix:
experimental: [true]
rubygems:
- latest
bundler:
Expand All @@ -38,7 +37,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Ruby & Bundle
- name: Setup Ruby & RubyGems
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
Expand Down
Loading
Loading