Skip to content

Commit 76981c8

Browse files
nncclaude
andcommitted
Add GitHub Actions CI and an ActiveSupport compatibility matrix
- CI (replaces Travis): a minimal Ruby × ActiveSupport covering matrix — each supported Ruby (3.1–4.0) paired with one supported ActiveSupport (7.0/7.1/7.2/8.0/8.1), plus an experimental ruby-head + Rails-main cell. Credential-free: runs `bundle exec rake test` (unit-only; tests stub all Xero HTTP). Per-cell ActiveSupport pinned via gemfiles/ + BUNDLE_GEMFILE. - Load ActiveSupport's deprecation framework before cherry-picking core_ext: some versions emit a deprecation at load time (AS 7.1 array, AS 8.2 time) referencing `ActiveSupport.deprecator` / `ActiveSupport::Deprecation`. Require `active_support/deprecation` (+ `active_support/deprecator`, absent before 7.1) first, rather than all of active_support. - Set `required_ruby_version >= 3.1` and the `activesupport` floor to `>= 7.0`. - Add CI and gem-version badges to the README. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 8595b4b commit 76981c8

13 files changed

Lines changed: 100 additions & 5 deletions

.github/workflows/ci.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
8+
permissions:
9+
contents: read
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
# Cancel superseded PR runs, but always let master runs finish (keeps the badge accurate).
14+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
15+
16+
jobs:
17+
test:
18+
name: Ruby ${{ matrix.ruby }} / AS ${{ matrix.activesupport }}
19+
runs-on: ubuntu-latest
20+
env:
21+
BUNDLE_GEMFILE: gemfiles/activesupport_${{ matrix.activesupport }}.gemfile
22+
strategy:
23+
fail-fast: false
24+
# Minimal covering set: every supported Ruby once, every supported
25+
# ActiveSupport once (AS 8.x requires Ruby >= 3.2).
26+
matrix:
27+
include:
28+
- { ruby: '3.1', activesupport: '7.0' }
29+
- { ruby: '3.2', activesupport: '7.1' }
30+
- { ruby: '3.3', activesupport: '7.2' }
31+
- { ruby: '3.4', activesupport: '8.0' }
32+
- { ruby: '4.0', activesupport: '8.1' }
33+
# Bleeding edge (next Ruby + Rails main); allowed to fail so it never reds the build.
34+
- { ruby: 'ruby-head', activesupport: 'head', experimental: true }
35+
continue-on-error: ${{ matrix.experimental == true }}
36+
steps:
37+
- uses: actions/checkout@v6
38+
- uses: ruby/setup-ruby@v1
39+
with:
40+
ruby-version: ${{ matrix.ruby }}
41+
bundler-cache: true
42+
- run: bundle exec rake test

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ pkg/
1212
.DS_Store
1313
.idea/
1414
Gemfile.lock
15+
gemfiles/*.lock
1516
tmp/
1617
*~
1718
TAGS

.travis.yml

Lines changed: 0 additions & 2 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4242
logging hooks now fire for 429 responses (they previously could not, because
4343
the `oauth2` gem raised before xeroizer's response layer ran). This keeps
4444
observability consistent across both `raise_errors` modes.
45-
- `activesupport` now requires `>= 5.2` (previously unconstrained, which let it
46-
resolve to ancient releases that fail to load on Ruby 3.2+).
45+
- `activesupport` now requires `>= 7.0` (previously unconstrained, which let it
46+
resolve to ancient, EOL releases that fail to load on modern Ruby).
47+
- Minimum supported Ruby is now 3.1 (`required_ruby_version >= 3.1`); RubyGems
48+
refuses to install the gem on older Rubies.
4749

4850
### Removed
4951

@@ -66,6 +68,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6668
- The gem now requires `active_support/core_ext/object/blank` and `.../object/try`
6769
explicitly; it used `blank?`/`present?`/`try` but only loaded them transitively,
6870
which broke on modern ActiveSupport outside Rails.
71+
- Loads ActiveSupport's deprecation framework before its core extensions,
72+
preventing a load-time crash on ActiveSupport versions that emit a deprecation
73+
from a cherry-picked file (e.g. 8.2).
6974
- `#attributes=` now raises the same clear `undefined method` error as `.build` when given an invalid attribute name. (#570)
7075
- Avoid an extra API call when accessing allocations from a credit note. (#554)
7176
- A `raw_body: true` request body is now computed once before the retry loop, so

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
Xeroizer API Library
22
====================
33

4+
[![CI](https://github.com/waynerobinson/xeroizer/actions/workflows/ci.yml/badge.svg)](https://github.com/waynerobinson/xeroizer/actions/workflows/ci.yml)
5+
[![Gem Version](https://img.shields.io/gem/v/xeroizer)](https://rubygems.org/gems/xeroizer)
6+
47
**Homepage**: [http://waynerobinson.github.com/xeroizer](http://waynerobinson.github.com/xeroizer)
58

69
**Git**: [git://github.com/waynerobinson/xeroizer.git](git://github.com/waynerobinson/xeroizer.git)

gemfiles/activesupport_7.0.gemfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# frozen_string_literal: true
2+
source "https://rubygems.org"
3+
4+
gem "activesupport", "~> 7.0.0"
5+
6+
gemspec path: "../"

gemfiles/activesupport_7.1.gemfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# frozen_string_literal: true
2+
source "https://rubygems.org"
3+
4+
gem "activesupport", "~> 7.1.0"
5+
6+
gemspec path: "../"

gemfiles/activesupport_7.2.gemfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# frozen_string_literal: true
2+
source "https://rubygems.org"
3+
4+
gem "activesupport", "~> 7.2.0"
5+
6+
gemspec path: "../"

gemfiles/activesupport_8.0.gemfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# frozen_string_literal: true
2+
source "https://rubygems.org"
3+
4+
gem "activesupport", "~> 8.0.0"
5+
6+
gemspec path: "../"

gemfiles/activesupport_8.1.gemfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# frozen_string_literal: true
2+
source "https://rubygems.org"
3+
4+
gem "activesupport", "~> 8.1.0"
5+
6+
gemspec path: "../"

0 commit comments

Comments
 (0)