arel-helpers 2.16.0 → 2.17.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: 9f7cc8f15ab6d6994659334c52175a58e4246abb9c2cc17e35b08757c3a8b50d
4
- data.tar.gz: 7c934b7cdbfd8a43e2fcd45d63df5e6c4d9e75255b2cc88960906fe21c86b589
3
+ metadata.gz: aab615bd03832b10ba42c666d0245f83d6abe819133159ace8143643deffc12d
4
+ data.tar.gz: 2d16903c9273d56f2fffe07bd7e71e98afa0b2bd3647708cd6216f8864e31c9b
5
5
  SHA512:
6
- metadata.gz: 011c57f84f2d052ec07fab18eaf2b7360ff6d7ba13bd8e2a717ccab3a041fdc1b69a6c1b3bcddababf5246d50a243812804bd2c3c34811491b01171353f78964
7
- data.tar.gz: d00d1d849461689c8b454ac54724a7fe617a923eeba7d924d7dcabd830314af996eb746a2201fd88ff4cdfeddc44e3972a1a83df16f28f006f327ac292c4c2fb
6
+ metadata.gz: ca5556444c535231c921728f77d631d1b4a333daad6dc012f6bf27b31168dbbce954a892382d09a17a1f5348e4070f0973662c905999803dbea636f1c6462a74
7
+ data.tar.gz: 9fa974a71cd31a862669562617a5d1dc04b8c1d3cae14321c9343059ffa3868ba9831ca613fcabc22e5e05de62e66bfe88a86b255f4f0d7b682efef4b9fbe02c
data/arel-helpers.gemspec CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
12
12
 
13
13
  s.platform = Gem::Platform::RUBY
14
14
 
15
- s.add_dependency 'activerecord', '>= 3.1.0', '< 8.1'
15
+ s.add_dependency 'activerecord', '>= 3.1.0'
16
16
 
17
17
  s.add_development_dependency 'appraisal'
18
18
  s.add_development_dependency 'combustion', '~> 1.3'
@@ -1,5 +1,5 @@
1
1
  # encoding: UTF-8
2
2
 
3
3
  module ArelHelpers
4
- VERSION = '2.16.0'
4
+ VERSION = '2.17.0'
5
5
  end
data/lib/arel-helpers.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  # encoding: UTF-8
2
2
 
3
+ require 'logger'
3
4
  require 'active_record'
4
5
 
5
6
  begin
@@ -103,7 +103,11 @@ describe ArelHelpers do
103
103
  ArelHelpers.join_association(Post, :comments, Arel::Nodes::InnerJoin, aliases: [foo])
104
104
  ).to_sql
105
105
 
106
- expect(sql).to eq 'SELECT "posts".* FROM "posts" INNER JOIN "comments" "foo" ON "foo"."post_id" = "posts"."id"'
106
+ if ActiveRecord::VERSION::STRING < "8.1.0"
107
+ expect(sql).to eq 'SELECT "posts".* FROM "posts" INNER JOIN "comments" "foo" ON "foo"."post_id" = "posts"."id"'
108
+ else
109
+ expect(sql).to eq 'SELECT "posts".* FROM "posts" INNER JOIN "comments" AS "foo" ON "foo"."post_id" = "posts"."id"'
110
+ end
107
111
  end
108
112
  end
109
113
 
@@ -114,11 +118,19 @@ describe ArelHelpers do
114
118
  ArelHelpers.join_association(Post, %i[comments favorites], Arel::Nodes::InnerJoin, aliases: [foo, bar])
115
119
  ).to_sql
116
120
 
117
- expect(sql).to eq <<-SQL.squish
118
- SELECT "posts".* FROM "posts"
119
- INNER JOIN "comments" "foo" ON "foo"."post_id" = "posts"."id"
120
- INNER JOIN "favorites" "bar" ON "bar"."post_id" = "posts"."id"
121
- SQL
121
+ if ActiveRecord::VERSION::STRING < "8.1.0"
122
+ expect(sql).to eq <<-SQL.squish
123
+ SELECT "posts".* FROM "posts"
124
+ INNER JOIN "comments" "foo" ON "foo"."post_id" = "posts"."id"
125
+ INNER JOIN "favorites" "bar" ON "bar"."post_id" = "posts"."id"
126
+ SQL
127
+ else
128
+ expect(sql).to eq <<-SQL.squish
129
+ SELECT "posts".* FROM "posts"
130
+ INNER JOIN "comments" AS "foo" ON "foo"."post_id" = "posts"."id"
131
+ INNER JOIN "favorites" AS "bar" ON "bar"."post_id" = "posts"."id"
132
+ SQL
133
+ end
122
134
  end
123
135
  end
124
136
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arel-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.16.0
4
+ version: 2.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cameron Dutro
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2025-01-18 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: activerecord
@@ -17,9 +16,6 @@ dependencies:
17
16
  - - ">="
18
17
  - !ruby/object:Gem::Version
19
18
  version: 3.1.0
20
- - - "<"
21
- - !ruby/object:Gem::Version
22
- version: '8.1'
23
19
  type: :runtime
24
20
  prerelease: false
25
21
  version_requirements: !ruby/object:Gem::Requirement
@@ -27,9 +23,6 @@ dependencies:
27
23
  - - ">="
28
24
  - !ruby/object:Gem::Version
29
25
  version: 3.1.0
30
- - - "<"
31
- - !ruby/object:Gem::Version
32
- version: '8.1'
33
26
  - !ruby/object:Gem::Dependency
34
27
  name: appraisal
35
28
  requirement: !ruby/object:Gem::Requirement
@@ -144,7 +137,6 @@ homepage: https://github.com/camertron/arel-helpers
144
137
  licenses:
145
138
  - MIT
146
139
  metadata: {}
147
- post_install_message:
148
140
  rdoc_options: []
149
141
  require_paths:
150
142
  - lib
@@ -159,8 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
159
151
  - !ruby/object:Gem::Version
160
152
  version: '0'
161
153
  requirements: []
162
- rubygems_version: 3.5.16
163
- signing_key:
154
+ rubygems_version: 3.6.7
164
155
  specification_version: 4
165
156
  summary: Useful tools to help construct database queries with ActiveRecord and Arel.
166
157
  test_files: []