From d04f17069a66a896bbb68b376ad98f4f2d8b6bd0 Mon Sep 17 00:00:00 2001 From: Geremia Taglialatela Date: Wed, 10 Dec 2025 12:06:39 +0100 Subject: [PATCH 1/5] Improve CI --- .github/workflows/ruby.yml | 51 ++++++------------------- .gitignore | 77 ++++++++++++++++++++++++++++++-------- README.md | 3 +- 3 files changed, 73 insertions(+), 58 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 9fd8dc50..9c5eced1 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -17,7 +17,7 @@ jobs: strategy: matrix: ruby-version: ['2.1', '2.2', '2.3', '2.4', '2.5', '2.6', '3.0', '3.1'] - gemfile: ['rails_3.2', 'rails_4.0', 'rails_4.1', 'rails_4.2', 'rails_5.0', 'rails_5.1', 'rails_5.2', 'rails_6.0', 'rails_6.1', 'rails_7.0', 'rails_7.1', 'rails_7.2'] + gemfile: ['rails_3.2', 'rails_4.0', 'rails_4.1', 'rails_4.2', 'rails_5.0', 'rails_5.1', 'rails_5.2', 'rails_6.0', 'rails_6.1'] exclude: - ruby-version: '2.1' @@ -30,23 +30,11 @@ jobs: gemfile: rails_6.0 - ruby-version: '2.1' gemfile: rails_6.1 - - ruby-version: '2.1' - gemfile: rails_7.0 - - ruby-version: '2.1' - gemfile: rails_7.1 - - ruby-version: '2.1' - gemfile: rails_7.2 - ruby-version: '2.2' gemfile: rails_6.0 - ruby-version: '2.2' gemfile: rails_6.1 - - ruby-version: '2.2' - gemfile: rails_7.0 - - ruby-version: '2.2' - gemfile: rails_7.1 - - ruby-version: '2.2' - gemfile: rails_7.2 - ruby-version: '2.3' gemfile: rails_4.0 @@ -56,12 +44,6 @@ jobs: gemfile: rails_6.0 - ruby-version: '2.3' gemfile: rails_6.1 - - ruby-version: '2.3' - gemfile: rails_7.0 - - ruby-version: '2.3' - gemfile: rails_7.1 - - ruby-version: '2.3' - gemfile: rails_7.2 - ruby-version: '2.4' gemfile: rails_3.2 @@ -73,12 +55,6 @@ jobs: gemfile: rails_6.0 - ruby-version: '2.4' gemfile: rails_6.1 - - ruby-version: '2.4' - gemfile: rails_7.0 - - ruby-version: '2.4' - gemfile: rails_7.1 - - ruby-version: '2.4' - gemfile: rails_7.2 - ruby-version: '2.5' gemfile: rails_3.2 @@ -88,12 +64,6 @@ jobs: gemfile: rails_4.1 - ruby-version: '2.5' gemfile: rails_4.2 - - ruby-version: '2.5' - gemfile: rails_7.0 - - ruby-version: '2.5' - gemfile: rails_7.1 - - ruby-version: '2.5' - gemfile: rails_7.2 - ruby-version: '2.6' gemfile: rails_3.2 @@ -103,12 +73,6 @@ jobs: gemfile: rails_4.1 - ruby-version: '2.6' gemfile: rails_4.2 - - ruby-version: '2.6' - gemfile: rails_7.0 - - ruby-version: '2.6' - gemfile: rails_7.1 - - ruby-version: '2.6' - gemfile: rails_7.2 - ruby-version: '2.7' gemfile: rails_3.2 @@ -139,8 +103,6 @@ jobs: gemfile: rails_5.1 - ruby-version: '3.0' gemfile: rails_5.2 - - ruby-version: '3.0' - gemfile: rails_7.2 - ruby-version: '3.1' gemfile: rails_3.2 @@ -166,6 +128,11 @@ jobs: steps: - uses: actions/checkout@v6 + - uses: ankane/setup-postgres@v1 + with: + postgres-version: 12 + database: eaco + - name: Decide RubyGems id: setup-params run: | @@ -195,4 +162,8 @@ jobs: - name: Run specs run: | - bundle exec rake spec + bundle exec spec + + - name: Run Cucumber features + run: | + bundle exec cucumber -f pretty diff --git a/.gitignore b/.gitignore index 5221f81c..dfdea9c9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,21 +1,66 @@ *.gem *.rbc -.bundle -.config -.yardoc +/.config +/coverage/ +/InstalledFiles +/pkg/ +/spec/reports/ +/spec/examples.txt +/test/tmp/ +/test/version_tmp/ +/tmp/ + +# Used by dotenv library to load environment variables. +# .env + +# Ignore Byebug command history file. +.byebug_history + +## Specific to RubyMotion: +.dat* +.repl_history +build/ +*.bridgesupport +build-iPhoneOS/ +build-iPhoneSimulator/ + +## Specific to RubyMotion (use of CocoaPods): +# +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control +# +# vendor/Pods/ + +## Documentation cache and generated files: +/.yardoc/ +/_yardoc/ +/doc/ +/rdoc/ + +## Environment normalization: +/.bundle/ +/vendor/bundle +/lib/bundler/man/ + +# for a library or gem, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: Gemfile.lock -gemfiles/*.gemfile.lock -_yardoc -coverage -doc/ +.ruby-version +.ruby-gemset + +# unless supporting rvm < 1.11.0 or doing something fancy, ignore this: +.rvmrc + +# Used by RuboCop. Remote config files pulled in from inherit_from directive. +# .rubocop-https?--* + +# Custom +gemfiles/*.lock +gemfiles/.bundle +gemfiles/vendor +spec/config.yml +spec/debug.log + features/active_record.yml features/active_record.log -lib/bundler/man -pkg -rdoc -tmp -*.bundle -*.so -*.o -*.a -mkmf.log diff --git a/README.md b/README.md index 9c26fd21..a609cc1a 100644 --- a/README.md +++ b/README.md @@ -227,8 +227,7 @@ Run `rake`. This will run the specs and cucumber features and report coverage. Specs are run against the supported rails versions in turn. If you want to focus on a single release, use `appraisal rails-X.Y rake`, where `X.Y` can be -`3.2`, `4.0`, `4.1`, `4.2`, `5.0`, `5.1`, `5.2`, `6.0`, `6.1`, `7.0`, `7.1`, -or `7.2`. +`3.2`, `4.0`, `4.1`, `4.2`, `5.0`, `5.1`, `5.2`, `6.0`, and `6.1`. ## Contributing From 8dc44520ae58b4bb4d20946d2109ccde03b1340a Mon Sep 17 00:00:00 2001 From: Geremia Taglialatela Date: Wed, 10 Dec 2025 12:08:01 +0100 Subject: [PATCH 2/5] test --- .github/workflows/ruby.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 9c5eced1..c6a558c2 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -125,6 +125,8 @@ jobs: BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile EACO_AR_CONFIG: ./features/active_record.github.yml + continue-on-error: true + steps: - uses: actions/checkout@v6 @@ -162,7 +164,7 @@ jobs: - name: Run specs run: | - bundle exec spec + bundle exec rspec - name: Run Cucumber features run: | From 68f8bd31e0181cf0b339b14f907e534cd1c157ca Mon Sep 17 00:00:00 2001 From: Geremia Taglialatela Date: Wed, 10 Dec 2025 12:13:03 +0100 Subject: [PATCH 3/5] test --- .github/workflows/ruby.yml | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index c6a558c2..72a01945 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -16,25 +16,34 @@ jobs: strategy: matrix: - ruby-version: ['2.1', '2.2', '2.3', '2.4', '2.5', '2.6', '3.0', '3.1'] - gemfile: ['rails_3.2', 'rails_4.0', 'rails_4.1', 'rails_4.2', 'rails_5.0', 'rails_5.1', 'rails_5.2', 'rails_6.0', 'rails_6.1'] - - exclude: - - ruby-version: '2.1' - gemfile: rails_5.0 + include: - ruby-version: '2.1' - gemfile: rails_5.1 + gemfile: rails_3.2 + postgres-version: 9 - ruby-version: '2.1' - gemfile: rails_5.2 + gemfile: rails_4.0 + postgres-version: 9 - ruby-version: '2.1' - gemfile: rails_6.0 + gemfile: rails_4.1 + postgres-version: 9 - ruby-version: '2.1' - gemfile: rails_6.1 + gemfile: rails_4.2 + postgres-version: 9 - ruby-version: '2.2' - gemfile: rails_6.0 + gemfile: rails_3.2 - ruby-version: '2.2' - gemfile: rails_6.1 + gemfile: rails_4.0 + - ruby-version: '2.2' + gemfile: rails_4.1 + - ruby-version: '2.2' + gemfile: rails_4.2 + - ruby-version: '2.2' + gemfile: rails_5.0 + - ruby-version: '2.2' + gemfile: rails_5.1 + - ruby-version: '2.2' + gemfile: rails_5.2 - ruby-version: '2.3' gemfile: rails_4.0 @@ -132,7 +141,7 @@ jobs: - uses: ankane/setup-postgres@v1 with: - postgres-version: 12 + postgres-version: ${{ matrix.postgres-version }} database: eaco - name: Decide RubyGems From 26df1fccab3fca4bac1adb21391ba4d49b52fde2 Mon Sep 17 00:00:00 2001 From: Geremia Taglialatela Date: Wed, 10 Dec 2025 12:23:17 +0100 Subject: [PATCH 4/5] test --- .github/workflows/ruby.yml | 117 +++++++++++++++++++------------------ 1 file changed, 60 insertions(+), 57 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 72a01945..5db78cfd 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -28,107 +28,110 @@ jobs: postgres-version: 9 - ruby-version: '2.1' gemfile: rails_4.2 - postgres-version: 9 + postgres-version: 12 - ruby-version: '2.2' gemfile: rails_3.2 + postgres-version: 9 - ruby-version: '2.2' gemfile: rails_4.0 + postgres-version: 9 - ruby-version: '2.2' gemfile: rails_4.1 - ruby-version: '2.2' gemfile: rails_4.2 + postgres-version: 12 - ruby-version: '2.2' gemfile: rails_5.0 + postgres-version: 12 - ruby-version: '2.2' gemfile: rails_5.1 + postgres-version: 12 - ruby-version: '2.2' gemfile: rails_5.2 + postgres-version: 12 - ruby-version: '2.3' - gemfile: rails_4.0 + gemfile: rails_3.2 + postgres-version: 12 - ruby-version: '2.3' - gemfile: rails_4.1 + gemfile: rails_4.2 + postgres-version: 12 - ruby-version: '2.3' - gemfile: rails_6.0 + gemfile: rails_5.0 + postgres-version: 12 - ruby-version: '2.3' - gemfile: rails_6.1 + gemfile: rails_5.1 + postgres-version: 12 + - ruby-version: '2.3' + gemfile: rails_5.2 + postgres-version: 12 - ruby-version: '2.4' - gemfile: rails_3.2 - - ruby-version: '2.4' - gemfile: rails_4.0 + gemfile: rails_4.2 + postgres-version: 12 - ruby-version: '2.4' - gemfile: rails_4.1 + gemfile: rails_5.0 + postgres-version: 12 - ruby-version: '2.4' - gemfile: rails_6.0 + gemfile: rails_5.1 + postgres-version: 12 - ruby-version: '2.4' - gemfile: rails_6.1 + gemfile: rails_5.2 + postgres-version: 12 - ruby-version: '2.5' - gemfile: rails_3.2 + gemfile: rails_5.0 + postgres-version: 12 - ruby-version: '2.5' - gemfile: rails_4.0 + gemfile: rails_5.1 + postgres-version: 12 - ruby-version: '2.5' - gemfile: rails_4.1 + gemfile: rails_5.2 + postgres-version: 12 - ruby-version: '2.5' - gemfile: rails_4.2 + gemfile: rails_6.0 + postgres-version: 12 + - ruby-version: '2.5' + gemfile: rails_6.1 + postgres-version: 12 - ruby-version: '2.6' - gemfile: rails_3.2 + gemfile: rails_5.0 + postgres-version: 12 - ruby-version: '2.6' - gemfile: rails_4.0 + gemfile: rails_5.1 + postgres-version: 12 - ruby-version: '2.6' - gemfile: rails_4.1 + gemfile: rails_5.2 + postgres-version: 12 - ruby-version: '2.6' - gemfile: rails_4.2 + gemfile: rails_6.0 + postgres-version: 12 + - ruby-version: '2.6' + gemfile: rails_6.1 + postgres-version: 12 - ruby-version: '2.7' - gemfile: rails_3.2 - - ruby-version: '2.7' - gemfile: rails_4.0 - - ruby-version: '2.7' - gemfile: rails_4.1 - - ruby-version: '2.7' - gemfile: rails_4.2 - - ruby-version: '2.7' - gemfile: rails_5.0 + gemfile: rails_5.2 + postgres-version: 12 - ruby-version: '2.7' - gemfile: rails_5.1 + gemfile: rails_6.0 + postgres-version: 12 - ruby-version: '2.7' - gemfile: rails_5.2 + gemfile: rails_6.1 + postgres-version: 12 - ruby-version: '3.0' - gemfile: rails_3.2 - - ruby-version: '3.0' - gemfile: rails_4.0 - - ruby-version: '3.0' - gemfile: rails_4.1 - - ruby-version: '3.0' - gemfile: rails_4.2 - - ruby-version: '3.0' - gemfile: rails_5.0 - - ruby-version: '3.0' - gemfile: rails_5.1 + gemfile: rails_6.0 + postgres-version: 12 - ruby-version: '3.0' - gemfile: rails_5.2 + gemfile: rails_6.1 + postgres-version: 12 - ruby-version: '3.1' - gemfile: rails_3.2 - - ruby-version: '3.1' - gemfile: rails_4.0 - - ruby-version: '3.1' - gemfile: rails_4.1 - - ruby-version: '3.1' - gemfile: rails_4.2 - - ruby-version: '3.1' - gemfile: rails_5.0 - - ruby-version: '3.1' - gemfile: rails_5.1 - - ruby-version: '3.1' - gemfile: rails_5.2 - - ruby-version: '3.1' - gemfile: rails_6.0 + gemfile: rails_6.1 + postgres-version: 12 env: BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile From 669beb8036a8d930ad2660b30b5cf308aa3c2fbb Mon Sep 17 00:00:00 2001 From: Geremia Taglialatela Date: Wed, 10 Dec 2025 13:51:32 +0100 Subject: [PATCH 5/5] test --- .github/workflows/{ruby.yml => ci.yml} | 29 +++++++++++++------------- Appraisals | 5 +++++ README.md | 2 +- gemfiles/rails_4.2.gemfile | 2 ++ gemfiles/rails_5.0.gemfile | 1 + gemfiles/rails_5.1.gemfile | 1 + gemfiles/rails_5.2.gemfile | 1 + 7 files changed, 25 insertions(+), 16 deletions(-) rename .github/workflows/{ruby.yml => ci.yml} (90%) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ci.yml similarity index 90% rename from .github/workflows/ruby.yml rename to .github/workflows/ci.yml index 5db78cfd..9a12ece2 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: Ruby specs +name: CI on: push: @@ -11,33 +11,38 @@ permissions: jobs: test: - name: Ruby specs + name: Ruby ${{ matrix.ruby-version }}, ${{ matrix.gemfile }}, PG ${{ matrix.postgres-version }} runs-on: ubuntu-latest strategy: matrix: + ruby-version: ['3.1'] + gemfile: [rails_6.1] + postgres-version: ['12'] + include: - ruby-version: '2.1' gemfile: rails_3.2 - postgres-version: 9 + postgres-version: 10 - ruby-version: '2.1' gemfile: rails_4.0 - postgres-version: 9 + postgres-version: 10 - ruby-version: '2.1' gemfile: rails_4.1 - postgres-version: 9 + postgres-version: 10 - ruby-version: '2.1' gemfile: rails_4.2 postgres-version: 12 - ruby-version: '2.2' gemfile: rails_3.2 - postgres-version: 9 + postgres-version: 10 - ruby-version: '2.2' gemfile: rails_4.0 - postgres-version: 9 + postgres-version: 10 - ruby-version: '2.2' gemfile: rails_4.1 + postgres-version: 10 - ruby-version: '2.2' gemfile: rails_4.2 postgres-version: 12 @@ -53,7 +58,7 @@ jobs: - ruby-version: '2.3' gemfile: rails_3.2 - postgres-version: 12 + postgres-version: 10 - ruby-version: '2.3' gemfile: rails_4.2 postgres-version: 12 @@ -129,16 +134,10 @@ jobs: gemfile: rails_6.1 postgres-version: 12 - - ruby-version: '3.1' - gemfile: rails_6.1 - postgres-version: 12 - env: BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile EACO_AR_CONFIG: ./features/active_record.github.yml - continue-on-error: true - steps: - uses: actions/checkout@v6 @@ -174,7 +173,7 @@ jobs: bundler-cache: true rubygems: ${{ steps.setup-params.outputs.version }} - - name: Run specs + - name: Run Specs run: | bundle exec rspec diff --git a/Appraisals b/Appraisals index da9c798b..5c9b211a 100644 --- a/Appraisals +++ b/Appraisals @@ -18,24 +18,29 @@ appraise 'rails-4.1' do end appraise 'rails-4.2' do + gem 'bigdecimal', '< 2' + gem 'loofah', '~> 2.20.0' gem 'rails', '~> 4.2.0' gem 'pg', '~> 0.21' gem 'term-ansicolor', '~> 1.7.0' end appraise 'rails-5.0' do + gem 'loofah', '~> 2.20.0' gem 'rails', '~> 5.0.0' gem 'pg', '~> 0.21' gem 'term-ansicolor', '~> 1.7.0' end appraise 'rails-5.1' do + gem 'loofah', '~> 2.20.0' gem 'rails', '~> 5.1.0' gem 'pg', '~> 0.21' gem 'term-ansicolor', '~> 1.7.0' end appraise 'rails-5.2' do + gem 'loofah', '~> 2.20.0' gem 'rails', '~> 5.2.0' gem 'term-ansicolor', '~> 1.7.0' end diff --git a/README.md b/README.md index a609cc1a..5e4b40ac 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Eaco -[![Ruby specs](https://github.com/ifad/eaco/actions/workflows/ruby.yml/badge.svg)](https://github.com/ifad/eaco/actions/workflows/ruby.yml) +[![CI](https://github.com/ifad/eaco/actions/workflows/ci.yml/badge.svg)](https://github.com/ifad/eaco/actions/workflows/ci.yml) [![Coverage Status](https://coveralls.io/repos/ifad/eaco/badge.svg)](https://coveralls.io/github/ifad/eaco) [![Maintainability](https://qlty.sh/gh/ifad/projects/eaco/maintainability.svg)](https://qlty.sh/gh/ifad/projects/eaco) [![Inline docs](https://inch-ci.org/github/ifad/eaco.svg?branch=master)](https://inch-ci.org/github/ifad/eaco) diff --git a/gemfiles/rails_4.2.gemfile b/gemfiles/rails_4.2.gemfile index 0247ad6a..9ad0c05a 100644 --- a/gemfiles/rails_4.2.gemfile +++ b/gemfiles/rails_4.2.gemfile @@ -2,6 +2,8 @@ source "https://rubygems.org" +gem "bigdecimal", "< 2" +gem "loofah", "~> 2.20.0" gem "rails", "~> 4.2.0" gem "pg", "~> 0.21" gem "term-ansicolor", "~> 1.7.0" diff --git a/gemfiles/rails_5.0.gemfile b/gemfiles/rails_5.0.gemfile index 98c8fbb9..e485333a 100644 --- a/gemfiles/rails_5.0.gemfile +++ b/gemfiles/rails_5.0.gemfile @@ -2,6 +2,7 @@ source "https://rubygems.org" +gem "loofah", "~> 2.20.0" gem "rails", "~> 5.0.0" gem "pg", "~> 0.21" gem "term-ansicolor", "~> 1.7.0" diff --git a/gemfiles/rails_5.1.gemfile b/gemfiles/rails_5.1.gemfile index 18bc3a8b..d88dddcb 100644 --- a/gemfiles/rails_5.1.gemfile +++ b/gemfiles/rails_5.1.gemfile @@ -2,6 +2,7 @@ source "https://rubygems.org" +gem "loofah", "~> 2.20.0" gem "rails", "~> 5.1.0" gem "pg", "~> 0.21" gem "term-ansicolor", "~> 1.7.0" diff --git a/gemfiles/rails_5.2.gemfile b/gemfiles/rails_5.2.gemfile index edea7e0f..4b79e2a0 100644 --- a/gemfiles/rails_5.2.gemfile +++ b/gemfiles/rails_5.2.gemfile @@ -2,6 +2,7 @@ source "https://rubygems.org" +gem "loofah", "~> 2.20.0" gem "rails", "~> 5.2.0" gem "term-ansicolor", "~> 1.7.0"