fast_page 0.1.6 → 0.1.7
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 +4 -4
- data/.rubocop.yml +9 -0
- data/.ruby-version +1 -1
- data/Gemfile.lock +84 -55
- data/lib/fast_page/active_record_methods.rb +15 -1
- data/lib/fast_page/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d9026ee2d3e54a0db3531e738a3d919fe3936986de4c3faeaefa6c0a04b9bdf
|
4
|
+
data.tar.gz: a15c6e9369edf03db3615b4ef963fbb8af704532fd9acc47224ca57031db4976
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f1a38734953ee14a46986ba2780d57f8f23d946b68453b4935149594c0c91a7671484011f29c9c08bdd80bb8ee6d5f447b15fc7ebcfec8984a740a69e713bc8
|
7
|
+
data.tar.gz: b8e5c22956c7ec2e0f9eb044879e488aaa94e3426e98725230c3948fb338f63c8fd071f07ce0717a06eccc0418c5f6732e7d9fcd8f059263c17746c4a0c7c03a
|
data/.rubocop.yml
CHANGED
@@ -1,6 +1,15 @@
|
|
1
1
|
AllCops:
|
2
2
|
TargetRubyVersion: 2.4
|
3
3
|
|
4
|
+
Metrics/CyclomaticComplexity:
|
5
|
+
Enabled: false
|
6
|
+
|
7
|
+
Metrics/PerceivedComplexity:
|
8
|
+
Enabled: false
|
9
|
+
|
10
|
+
Metrics/ClassLength:
|
11
|
+
Enabled: false
|
12
|
+
|
4
13
|
Style/StringLiterals:
|
5
14
|
Enabled: true
|
6
15
|
EnforcedStyle: double_quotes
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.1
|
1
|
+
3.3.1
|
data/Gemfile.lock
CHANGED
@@ -1,39 +1,52 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
fast_page (0.1.
|
4
|
+
fast_page (0.1.6)
|
5
5
|
activerecord
|
6
6
|
activesupport
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
actionview (
|
12
|
-
activesupport (=
|
11
|
+
actionview (8.0.2)
|
12
|
+
activesupport (= 8.0.2)
|
13
13
|
builder (~> 3.1)
|
14
|
-
erubi (~> 1.
|
15
|
-
rails-dom-testing (~> 2.
|
16
|
-
rails-html-sanitizer (~> 1.
|
17
|
-
activemodel (
|
18
|
-
activesupport (=
|
19
|
-
activerecord (
|
20
|
-
activemodel (=
|
21
|
-
activesupport (=
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
14
|
+
erubi (~> 1.11)
|
15
|
+
rails-dom-testing (~> 2.2)
|
16
|
+
rails-html-sanitizer (~> 1.6)
|
17
|
+
activemodel (8.0.2)
|
18
|
+
activesupport (= 8.0.2)
|
19
|
+
activerecord (8.0.2)
|
20
|
+
activemodel (= 8.0.2)
|
21
|
+
activesupport (= 8.0.2)
|
22
|
+
timeout (>= 0.4.0)
|
23
|
+
activesupport (8.0.2)
|
24
|
+
base64
|
25
|
+
benchmark (>= 0.3)
|
26
|
+
bigdecimal
|
27
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
28
|
+
connection_pool (>= 2.2.5)
|
29
|
+
drb
|
30
|
+
i18n (>= 1.6, < 2)
|
31
|
+
logger (>= 1.4.2)
|
32
|
+
minitest (>= 5.1)
|
33
|
+
securerandom (>= 0.3)
|
34
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
35
|
+
uri (>= 0.13.1)
|
36
|
+
ast (2.4.3)
|
37
|
+
base64 (0.3.0)
|
38
|
+
benchmark (0.4.1)
|
39
|
+
bigdecimal (3.2.2)
|
40
|
+
builder (3.3.0)
|
30
41
|
coderay (1.1.3)
|
31
|
-
concurrent-ruby (1.
|
42
|
+
concurrent-ruby (1.3.5)
|
43
|
+
connection_pool (2.5.3)
|
32
44
|
crass (1.0.6)
|
33
|
-
|
34
|
-
|
45
|
+
drb (2.2.3)
|
46
|
+
erubi (1.13.1)
|
47
|
+
i18n (1.14.7)
|
35
48
|
concurrent-ruby (~> 1.0)
|
36
|
-
json (2.
|
49
|
+
json (2.12.2)
|
37
50
|
kaminari (1.2.2)
|
38
51
|
activesupport (>= 4.1.0)
|
39
52
|
kaminari-actionview (= 1.2.2)
|
@@ -46,54 +59,70 @@ GEM
|
|
46
59
|
activerecord
|
47
60
|
kaminari-core (= 1.2.2)
|
48
61
|
kaminari-core (1.2.2)
|
49
|
-
|
62
|
+
language_server-protocol (3.17.0.5)
|
63
|
+
lint_roller (1.1.0)
|
64
|
+
logger (1.7.0)
|
65
|
+
loofah (2.24.1)
|
50
66
|
crass (~> 1.0.2)
|
51
|
-
nokogiri (>= 1.
|
52
|
-
method_source (1.
|
53
|
-
minitest (5.
|
54
|
-
nokogiri (1.
|
67
|
+
nokogiri (>= 1.12.0)
|
68
|
+
method_source (1.1.0)
|
69
|
+
minitest (5.25.5)
|
70
|
+
nokogiri (1.18.8-arm64-darwin)
|
55
71
|
racc (~> 1.4)
|
56
|
-
nokogiri (1.
|
72
|
+
nokogiri (1.18.8-x86_64-darwin)
|
73
|
+
racc (~> 1.4)
|
74
|
+
nokogiri (1.18.8-x86_64-linux-gnu)
|
57
75
|
racc (~> 1.4)
|
58
76
|
pagy (5.10.1)
|
59
77
|
activesupport
|
60
|
-
parallel (1.
|
61
|
-
parser (3.
|
78
|
+
parallel (1.27.0)
|
79
|
+
parser (3.3.8.0)
|
62
80
|
ast (~> 2.4.1)
|
63
|
-
|
81
|
+
racc
|
82
|
+
prism (1.4.0)
|
83
|
+
pry (0.15.2)
|
64
84
|
coderay (~> 1.1)
|
65
85
|
method_source (~> 1.0)
|
66
|
-
racc (1.
|
67
|
-
rails-dom-testing (2.0
|
68
|
-
activesupport (>=
|
86
|
+
racc (1.8.1)
|
87
|
+
rails-dom-testing (2.3.0)
|
88
|
+
activesupport (>= 5.0.0)
|
89
|
+
minitest
|
69
90
|
nokogiri (>= 1.6)
|
70
|
-
rails-html-sanitizer (1.
|
71
|
-
loofah (~> 2.
|
91
|
+
rails-html-sanitizer (1.6.2)
|
92
|
+
loofah (~> 2.21)
|
93
|
+
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
|
72
94
|
rainbow (3.1.1)
|
73
|
-
rake (13.0
|
74
|
-
regexp_parser (2.
|
75
|
-
|
76
|
-
rubocop (1.33.0)
|
95
|
+
rake (13.3.0)
|
96
|
+
regexp_parser (2.10.0)
|
97
|
+
rubocop (1.76.1)
|
77
98
|
json (~> 2.3)
|
99
|
+
language_server-protocol (~> 3.17.0.2)
|
100
|
+
lint_roller (~> 1.1.0)
|
78
101
|
parallel (~> 1.10)
|
79
|
-
parser (>= 3.
|
102
|
+
parser (>= 3.3.0.2)
|
80
103
|
rainbow (>= 2.2.2, < 4.0)
|
81
|
-
regexp_parser (>=
|
82
|
-
|
83
|
-
rubocop-ast (>= 1.19.1, < 2.0)
|
104
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
105
|
+
rubocop-ast (>= 1.45.0, < 2.0)
|
84
106
|
ruby-progressbar (~> 1.7)
|
85
|
-
unicode-display_width (>=
|
86
|
-
rubocop-ast (1.
|
87
|
-
parser (>= 3.
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
107
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
108
|
+
rubocop-ast (1.45.1)
|
109
|
+
parser (>= 3.3.7.2)
|
110
|
+
prism (~> 1.4)
|
111
|
+
ruby-progressbar (1.13.0)
|
112
|
+
securerandom (0.4.1)
|
113
|
+
sqlite3 (2.7.0-arm64-darwin)
|
114
|
+
sqlite3 (2.7.0-x86_64-darwin)
|
115
|
+
sqlite3 (2.7.0-x86_64-linux-gnu)
|
116
|
+
timeout (0.4.3)
|
117
|
+
tzinfo (2.0.6)
|
118
|
+
concurrent-ruby (~> 1.0)
|
119
|
+
unicode-display_width (3.1.4)
|
120
|
+
unicode-emoji (~> 4.0, >= 4.0.4)
|
121
|
+
unicode-emoji (4.0.4)
|
122
|
+
uri (1.0.3)
|
95
123
|
|
96
124
|
PLATFORMS
|
125
|
+
arm64-darwin-23
|
97
126
|
x86_64-darwin-21
|
98
127
|
x86_64-linux
|
99
128
|
|
@@ -11,7 +11,15 @@ module FastPage
|
|
11
11
|
@values[:limit] = limit_value + 1 if limit_value
|
12
12
|
id_scope = dup
|
13
13
|
id_scope = id_scope.except(:includes) unless references_eager_loaded_tables?
|
14
|
-
|
14
|
+
|
15
|
+
# Check if ORDER BY contains aliases that might not exist in a pluck query
|
16
|
+
ids = if order_references_select_aliases?
|
17
|
+
# Use select approach to preserve SELECT clause aliases, then extract IDs
|
18
|
+
id_scope.select(primary_key).map { |record| record.send(primary_key) }
|
19
|
+
else
|
20
|
+
# Standard pluck approach works fine
|
21
|
+
id_scope.pluck(primary_key)
|
22
|
+
end
|
15
23
|
|
16
24
|
if limit_value
|
17
25
|
@values[:limit] = limit_value - 1
|
@@ -31,5 +39,11 @@ module FastPage
|
|
31
39
|
|
32
40
|
self
|
33
41
|
end
|
42
|
+
|
43
|
+
private
|
44
|
+
|
45
|
+
def order_references_select_aliases?
|
46
|
+
!select_values.empty? && select_values.any? { |select| select.to_s.match?(/\s+as\s+/i) }
|
47
|
+
end
|
34
48
|
end
|
35
49
|
end
|
data/lib/fast_page/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fast_page
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Coutermarsh
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-06-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -143,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
143
143
|
- !ruby/object:Gem::Version
|
144
144
|
version: '0'
|
145
145
|
requirements: []
|
146
|
-
rubygems_version: 3.
|
146
|
+
rubygems_version: 3.5.9
|
147
147
|
signing_key:
|
148
148
|
specification_version: 4
|
149
149
|
summary: Blazing fast pagination for ActiveRecord with deferred joins
|