union_of 1.0.0.pre.rc.1 → 1.0.1

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: 4e5752ebe53ef7c334a17a993b25cb2c6022914ea4fd098e2556c1ec729f0db2
4
- data.tar.gz: ececada3388808b0d97247a69849c86039c91489dc14ba33695ea8029f858c88
3
+ metadata.gz: '013582567ec5890047fbb047929d1f0f60c96833fbbae50bb7b3e9c4a129dc19'
4
+ data.tar.gz: 8e1bc72667f7bfad2fe7cbb916bfa2e55d17a13db5d6cb8a72cfc94098376fcc
5
5
  SHA512:
6
- metadata.gz: 0b1d9166f9a4bc93a730e1e649acbd1bfd2a4ae7adbf36632359b8967b1bb7e7e7042721fb85c3be4422b9031161a9906f4a8e41e087290e6225fe4db7ddfe34
7
- data.tar.gz: 3338d36c00bab96d8e90c6255db89d7ea13b5cce6306d3b3463572b28f5c8c4dc5831b99e38cc4d3b7bc8b198c170269291a213cfbf2b08d777210ebd528fc26
6
+ metadata.gz: 68664c21fa3c8c546eb0fef4eaa51510240a23db67d7b5ebf498d8c10748a7d7fab45b0d744b336ef9a00e61bcd2d2acbe576de7c053286d3fc3a8624a8d85e5
7
+ data.tar.gz: 434c42dd62bdb056303651b780b17d5749ffd873ca7aa491554472d8c0041c6aa6a0ad7b4a3e60d5be81fc3f19a09b7bef583b30d524d0b43bd07177b370fb87
data/CHANGELOG.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # Changelog
2
2
 
3
- ## [Unreleased]
3
+ ## v1.0.1
4
+
5
+ Add support for Rails 8.
4
6
 
5
7
  ## v1.0.0
6
8
 
data/README.md CHANGED
@@ -171,9 +171,14 @@ We use Postgres in production, but we do not actively use MySQL or MariaDB, so
171
171
  there may be performance issues we are unaware of. If you stumble upon issues,
172
172
  please open an issue or a PR.
173
173
 
174
+ ## Acknowledgements
175
+
176
+ `union_of` was inspired by [`active_record_union`](https://github.com/brianhempel/active_record_union/).
177
+ For unions outside of associations, check it out.
178
+
174
179
  ## Is it any good?
175
180
 
176
- Yes.
181
+ [Yes.](https://news.ycombinator.com/item?id=3067434)
177
182
 
178
183
  ## Contributing
179
184
 
@@ -17,7 +17,7 @@ module UnionOf
17
17
  def union_reflections = union_sources.collect { active_record.reflect_on_association(_1) }
18
18
 
19
19
  def join_scope(table, foreign_table, foreign_klass, alias_tracker = nil)
20
- predicate_builder = predicate_builder(table)
20
+ predicate_builder = ActiveRecord::PredicateBuilder.new(ActiveRecord::TableMetadata.new(klass, table))
21
21
  scope_chain_items = join_scopes(table, predicate_builder)
22
22
  klass_scope = klass_join_scope(table, predicate_builder)
23
23
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module UnionOf
4
- VERSION = '1.0.0-rc.1'
4
+ VERSION = '1.0.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: union_of
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.pre.rc.1
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zeke Gabrielse
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-16 00:00:00.000000000 Z
11
+ date: 2025-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -149,11 +149,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
149
149
  version: '3.1'
150
150
  required_rubygems_version: !ruby/object:Gem::Requirement
151
151
  requirements:
152
- - - ">"
152
+ - - ">="
153
153
  - !ruby/object:Gem::Version
154
- version: 1.3.1
154
+ version: '0'
155
155
  requirements: []
156
- rubygems_version: 3.4.13
156
+ rubygems_version: 3.5.11
157
157
  signing_key:
158
158
  specification_version: 4
159
159
  summary: Create associations that combine multiple Active Record associations using