order_query 0.5.3 → 0.5.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +8 -0
- data/Gemfile +1 -1
- data/README.md +1 -1
- data/lib/order_query/point.rb +8 -2
- data/lib/order_query/version.rb +1 -1
- data/spec/gemfiles/rails_7_2.gemfile +16 -0
- data/spec/gemfiles/rails_8_0.gemfile +20 -0
- metadata +11 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab6020e2cf5dafe5ec55bdfbddc5c90b1a300a2ea04d716fad781ba83589d9b8
|
4
|
+
data.tar.gz: bc30eb7a6372b9f57418f985e5984b3fc0a39bc2b3716e6d4c8e9913160bf6bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 528e0462f40ad0cb4838a3be2cc79381655ac41f9873b2b9998664390c59c0526f6ef82324b78a6fe8420c0040baaa4f845f316c6e5eb692aa02387f460129b5
|
7
|
+
data.tar.gz: 55b199de9fb390fe34f6f7ad79a365ea4b284bb3a8afe1656b3ad7b7069824b2f8e89b48a076f5fdc8ee70bf9c18e4f7eafc9d3b84aac66bfdcf27a5343cfce0
|
data/CHANGES.md
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
data/lib/order_query/point.rb
CHANGED
@@ -68,14 +68,14 @@ module OrderQuery
|
|
68
68
|
v = record.send(column.name)
|
69
69
|
if v.nil? && !column.nullable?
|
70
70
|
fail Errors::NonNullableColumnIsNullError,
|
71
|
-
"Column #{column.inspect} is NULL on record #{@record.
|
71
|
+
"Column #{column.inspect} is NULL on record #{@record.send(inspect_method)}. "\
|
72
72
|
'Set the `nulls` option to :first or :last.'
|
73
73
|
end
|
74
74
|
v
|
75
75
|
end
|
76
76
|
|
77
77
|
def inspect
|
78
|
-
"#<OrderQuery::Point @record=#{@record.
|
78
|
+
"#<OrderQuery::Point @record=#{@record.send(inspect_method)} @space=#{@space.inspect}>"
|
79
79
|
end
|
80
80
|
|
81
81
|
protected
|
@@ -85,5 +85,11 @@ module OrderQuery
|
|
85
85
|
def unless_record_eq(rec)
|
86
86
|
rec unless rec == @record
|
87
87
|
end
|
88
|
+
|
89
|
+
private
|
90
|
+
def inspect_method
|
91
|
+
Gem::Version.new(ActiveRecord::VERSION::STRING) >= Gem::Version.new("7.2.0") ? :full_inspect
|
92
|
+
: :inspect
|
93
|
+
end
|
88
94
|
end
|
89
95
|
end
|
data/lib/order_query/version.rb
CHANGED
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
source 'https://rubygems.org'
|
4
|
+
|
5
|
+
gemspec path: '../../'
|
6
|
+
|
7
|
+
gem 'activerecord', '~> 7.2.0'
|
8
|
+
gem 'activesupport', '~> 7.2.0'
|
9
|
+
|
10
|
+
platforms :mri, :rbx do
|
11
|
+
gem 'sqlite3', '~> 1.4'
|
12
|
+
gem 'pg', '>= 0.18', '< 2.0'
|
13
|
+
gem 'mysql2', '>= 0.4.4'
|
14
|
+
end
|
15
|
+
|
16
|
+
eval_gemfile '../../shared.gemfile'
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
source 'https://rubygems.org'
|
4
|
+
|
5
|
+
gemspec path: '../../'
|
6
|
+
|
7
|
+
gem 'activerecord', '~> 8.0.0'
|
8
|
+
gem 'activesupport', '~> 8.0.0'
|
9
|
+
|
10
|
+
platforms :mri, :rbx do
|
11
|
+
gem 'sqlite3', '~> 2.2'
|
12
|
+
gem 'pg', '>= 0.18', '< 2.0'
|
13
|
+
gem 'mysql2', '>= 0.4.4'
|
14
|
+
end
|
15
|
+
|
16
|
+
group :test, :development do
|
17
|
+
gem 'ostruct'
|
18
|
+
end
|
19
|
+
|
20
|
+
eval_gemfile '../../shared.gemfile'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: order_query
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gleb Mazovetskiy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-11-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: '5.0'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '8.1'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: '5.0'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '8.1'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: activesupport
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
version: '5.0'
|
40
40
|
- - "<"
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: '
|
42
|
+
version: '8.1'
|
43
43
|
type: :runtime
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -49,7 +49,7 @@ dependencies:
|
|
49
49
|
version: '5.0'
|
50
50
|
- - "<"
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version: '
|
52
|
+
version: '8.1'
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: rake
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|
@@ -121,6 +121,8 @@ files:
|
|
121
121
|
- spec/gemfiles/rails_6_1.gemfile
|
122
122
|
- spec/gemfiles/rails_7_0.gemfile
|
123
123
|
- spec/gemfiles/rails_7_1.gemfile
|
124
|
+
- spec/gemfiles/rails_7_2.gemfile
|
125
|
+
- spec/gemfiles/rails_8_0.gemfile
|
124
126
|
- spec/gemfiles/rubocop.gemfile
|
125
127
|
- spec/order_query_spec.rb
|
126
128
|
- spec/spec_helper.rb
|
@@ -145,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
145
147
|
- !ruby/object:Gem::Version
|
146
148
|
version: '0'
|
147
149
|
requirements: []
|
148
|
-
rubygems_version: 3.
|
150
|
+
rubygems_version: 3.5.3
|
149
151
|
signing_key:
|
150
152
|
specification_version: 4
|
151
153
|
summary: Find next / previous Active Record(s) in one query
|
@@ -157,6 +159,8 @@ test_files:
|
|
157
159
|
- spec/gemfiles/rails_6_1.gemfile
|
158
160
|
- spec/gemfiles/rails_7_0.gemfile
|
159
161
|
- spec/gemfiles/rails_7_1.gemfile
|
162
|
+
- spec/gemfiles/rails_7_2.gemfile
|
163
|
+
- spec/gemfiles/rails_8_0.gemfile
|
160
164
|
- spec/gemfiles/rubocop.gemfile
|
161
165
|
- spec/order_query_spec.rb
|
162
166
|
- spec/spec_helper.rb
|