poly 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ba17496c0d7031f1877d3aa61200842efd24cb1381c12ecb597e5b4c80ac65d7
4
- data.tar.gz: 9bf0d37b9106badbf5672f3b1534e5c8e8161e3934ead590b56415a17196eda5
3
+ metadata.gz: '07925273fda2c3e5292b1f56d776f448d7542c1c28bc5f210e6738e2d682fa39'
4
+ data.tar.gz: a5797ce40826d0f0ee5f3a9835e38ebaae0e85219e6b7c0877effac315640d0b
5
5
  SHA512:
6
- metadata.gz: bf46bda44abfaccfb137c84cf1a6da3a6d3a6d0ad901e5354b3a3031769454777a90d03b2b09f0a5d5f81d4d26fd91458a58ea1de4cb083756fa4cfae6328684
7
- data.tar.gz: 62b7997d9a53c0ee472f745edaae46e78b6df6d54ff77af8ca4465bbb85afd642636c164863cf77eff4aaa537ed00c3779582203c935b34fa692853457c5b239
6
+ metadata.gz: '01933f6479724033886a320905e2149d8487d3a3dcee193550cebe7b8b9b38fa38a4b477b9c92ba2fd455d83087dccec3a70b664fed5e603489d91e48ef33114'
7
+ data.tar.gz: cade850271da454356ecce2ac07e316ccf5c4b36b6f03f164827c27f2af986abc4c4804b9198115cbf38502111bd32fef8e08f3eec8cbcbfb8e7323bb87d1577
data/CHANGELOG.md CHANGED
@@ -5,6 +5,44 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.3.0] - 2026-08-22
9
+
10
+ ### Changed
11
+
12
+ - **Lowered the supported ActiveRecord/ActiveSupport floor from `>= 7.1` to
13
+ `>= 6.1`.** No library code changed: a full scan of `lib/poly/*.rb` found no
14
+ Rails 7.1+ APIs, and the only ActiveRecord internals Poly touches
15
+ (`arel_table`, `reflect_on_all_associations`, `reflect_on_association`,
16
+ `base_class`) have been stable since well before 6.1. The previous floor was
17
+ an end-of-life policy choice, not a technical constraint. Lowered so
18
+ hellodancerrails (Rails 6.1.7.10 / Ruby 3.3.11) can adopt Midas, which
19
+ depends on Poly.
20
+ - CI gains a `6.1` cell on both the SQLite and PostgreSQL lanes, pinned to Ruby
21
+ 3.3 -- the pairing hellodancerrails actually runs. 6.1 predates Ruby 3.4
22
+ entirely, so that combination is excluded.
23
+
24
+ ### Fixed
25
+
26
+ - The PostgreSQL CI lane's `ruby/setup-ruby` step in `.gitea/workflows/ci.yml`
27
+ hardcoded `ruby-version: '3.4'` instead of reading `${{ matrix.ruby }}`, so
28
+ the matrix's Ruby axis was ignored on that lane.
29
+ - `spec/models/poly/migration_spec.rb` hardcoded
30
+ `ActiveRecord::Migration[7.1]`, which raises `Unknown migration version` on
31
+ Rails 6.1. Test migrations now build against `POLY_MIGRATION_VERSION`,
32
+ derived from the ActiveRecord actually under test.
33
+ - Shortened the `where:`-passthrough spec's table name, whose generated index
34
+ name (`index_poly_migration_where_indexes_on_resource_type_and_resource_id`,
35
+ 67 chars) exceeded Rails 6.1's SQLite 64-character limit -- and PostgreSQL's
36
+ 63-character limit on every version.
37
+
38
+ ### Development
39
+
40
+ - The `6.1` bundle lane pins `concurrent-ruby < 1.3.5` (1.3.5 dropped the
41
+ implicit `require 'logger'` that ActiveSupport 6.1 relies on) and
42
+ `sqlite3 ~> 1.4` (Rails 6.1's SQLite3Adapter requires it; sqlite3 2.x needs
43
+ Rails 7.2+). Both are Gemfile-only -- neither is a runtime requirement of the
44
+ gem.
45
+
8
46
  ## [1.2.0] - 2026-08-16
9
47
 
10
48
  ### Added
data/README.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Poly
2
2
 
3
+ [![Gem Version](https://img.shields.io/gem/v/poly)](https://rubygems.org/gems/poly)
4
+ [![CI](https://github.com/whittakertech/poly/actions/workflows/ci.yml/badge.svg)](https://github.com/whittakertech/poly/actions/workflows/ci.yml)
5
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue)](https://github.com/whittakertech/poly/blob/master/LICENSE)
6
+ [![Docs](https://img.shields.io/badge/docs-poly.whittakertech.com-blue)](https://poly.whittakertech.com)
7
+
3
8
  Type-safe joins, role identity, owner identity, and migration discipline for polymorphic `belongs_to` associations in Rails.
4
9
 
5
10
  ---
@@ -59,14 +64,20 @@ bundle install
59
64
  ## Requirements
60
65
 
61
66
  - Ruby >= 3.2
62
- - ActiveRecord >= 7.1
67
+ - ActiveRecord >= 6.1
68
+
69
+ Rails 6.1 is supported for legacy consumers and is exercised in CI on Ruby 3.3
70
+ only (6.1 predates Ruby 3.4). On 6.1 the SQLite3 adapter enforces a 64-character
71
+ index-name limit, so long table names may need an explicit `index_name:` on the
72
+ `poly_*_index` helpers -- PostgreSQL applies a 63-character limit on every
73
+ version, so this is good practice regardless.
63
74
 
64
75
  ---
65
76
 
66
77
  ## Supported Databases
67
78
 
68
79
  Poly is tested in CI against **SQLite** and **PostgreSQL** (both Ruby x
69
- ActiveRecord 7.1/7.2/8.x combinations -- see `.github/workflows/ci.yml`).
80
+ ActiveRecord 6.1/7.1/7.2/8.x combinations -- see `.github/workflows/ci.yml`).
70
81
 
71
82
  **MySQL is explicitly not supported.** `Poly::Migration#poly_prime_index`
72
83
  (see below) relies on a partial/conditional unique index --
data/Rakefile CHANGED
@@ -6,4 +6,9 @@ require 'bundler/gem_tasks'
6
6
  require 'rspec/core/rake_task'
7
7
  RSpec::Core::RakeTask.new(:spec)
8
8
 
9
+ require 'yard'
10
+ namespace :docs do
11
+ YARD::Rake::YardocTask.new(:api)
12
+ end
13
+
9
14
  task default: :spec
data/lib/poly/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Poly
4
- VERSION = '1.2.0'
4
+ VERSION = '1.3.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: poly
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lee Whittaker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-08-16 00:00:00.000000000 Z
11
+ date: 2026-08-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '7.1'
19
+ version: '6.1'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '7.1'
26
+ version: '6.1'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activesupport
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '7.1'
33
+ version: '6.1'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '7.1'
40
+ version: '6.1'
41
41
  description: Type-safe joins, role identity, owner stamping, and append-only golden-child
42
42
  history (Poly::Stack) for polymorphic belongs_to associations.
43
43
  email: