esse-pagy 0.0.1 → 0.0.2

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: 7ceea73edcb4eacd00a9864b43900232835379755d219c46c4754eda8c776f51
4
- data.tar.gz: 4d521b34747076bb87b9ca2eb997f09d1138f230c9eb6b1ebb006699c533d72e
3
+ metadata.gz: 5a5bc051ed525825e1e41fa010dd7192dc1417cd5988fc772a969060fd398b1c
4
+ data.tar.gz: 98cc1531ffb9d3e514584628b564bdbd4710d7cbd10bfff40708e26e0949238d
5
5
  SHA512:
6
- metadata.gz: 8039872c6747a680ae3c133cb084add0d0035cc8aabeacc69d5a5508c2f3423c3a8b2c0c4e6b51c9a0a6565a78ade5a2c968c52508f4f6b1f1fe8b1e78d4670e
7
- data.tar.gz: 25c887ea1f45cb9675faa2d96c22b243ff1c7648ae897a5a5a9b52e3832ddac5927b9fed06c5bd01cc845987b665ae9521ffbdbb6f6d014e2ac110d3582ee5ff
6
+ metadata.gz: 75905c59da32a8bd9c9c24abb1cc114f1ff338a5ac6c4611e70052d2ed8b66e483c6a822eacc6da15968fa91cfe1e7e603950a30ffcf60050448c44460275e38
7
+ data.tar.gz: d9c2fb8ba6f11e1d6d15612d9dac6a8b89fc31b945c0d0ec07b23814b58d2781f85c8d5d339de8d065f867944920c267abcadf04299a7eded8e0288bbc4e9b60
data/CHANGELOG.md CHANGED
@@ -4,6 +4,31 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## 0.0.2 - 2024-12-19
8
+
9
+ ### Added
10
+ * Enhanced test infrastructure with cross-version compatibility testing
11
+ * New `bin/rspec_all` script for testing across multiple Ruby and Pagy versions
12
+ * Support for testing with Ruby 2.7.8, 3.1.2, 3.2.2, and 3.3.5
13
+ * Support for testing with Pagy versions 5, 6, 7, 8, and 9
14
+ * Command-line options for targeted testing:
15
+ * `./bin/rspec_all` - Run all compatible combinations
16
+ * `./bin/rspec_all <ruby_version>` - Test specific Ruby version with all compatible Pagy versions
17
+ * `./bin/rspec_all <ruby_version> <pagy_version>` - Test specific combination
18
+ * Help system with `--help` and `-h` flags
19
+ * Comprehensive error handling with helpful error messages
20
+
21
+ ### Changed
22
+ * Improved test reliability by using compatibility matrix instead of testing all combinations
23
+ * Optimized test execution time by filtering out known incompatible version combinations
24
+ * Enhanced developer experience with better test output and error messages
25
+
26
+ ### Technical Details
27
+ * Ruby 2.7.x: Compatible with Pagy 5, 6
28
+ * Ruby 3.1.x: Compatible with Pagy 7
29
+ * Ruby 3.2.x: Compatible with Pagy 7, 8, 9
30
+ * Ruby 3.3.x: Compatible with Pagy 9
31
+
7
32
  ## 0.0.1 - 2023-11-14
8
33
  The first release of the esse-pagy plugin. This release includes the following features:
9
34
  * Add `pagy_search` method to the `Esse::Index` class.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- esse-pagy (0.0.1)
4
+ esse-pagy (0.0.2)
5
5
  esse (>= 0.2.4)
6
6
  pagy (>= 5)
7
7
 
data/README.md CHANGED
@@ -16,6 +16,15 @@ And then execute:
16
16
  $ bundle install
17
17
  ```
18
18
 
19
+ ## Pagy Version Compatibility
20
+
21
+ This gem supports Pagy versions 5.x through 9.x, but with different Ruby version requirements:
22
+
23
+ | Pagy Version | Ruby Version Required |
24
+ |--------------|----------------------|
25
+ | 5.x, 6.x | >= 2.5.0 |
26
+ | 7.x, 8.x, 9.x| >= 3.1.0 |
27
+
19
28
  ## Usage
20
29
 
21
30
  ```ruby
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "pagy", "~> 5.0"
6
+ gem "esse", "~> 0.2.4"
7
+ gem "esse-rspec", "~> 0.0.1"
8
+
9
+ group :test do
10
+ gem "activesupport"
11
+ gem "rack"
12
+ gem "rake-manifest"
13
+ end
14
+
15
+ # Specify your gem's dependencies in esse-pagy.gemspec
16
+ gemspec path: ".."
@@ -0,0 +1,135 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ esse-pagy (0.0.2)
5
+ esse (>= 0.2.4)
6
+ pagy (>= 5)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ activesupport (7.1.2)
12
+ base64
13
+ bigdecimal
14
+ concurrent-ruby (~> 1.0, >= 1.0.2)
15
+ connection_pool (>= 2.2.5)
16
+ drb
17
+ i18n (>= 1.6, < 2)
18
+ minitest (>= 5.1)
19
+ mutex_m
20
+ tzinfo (~> 2.0)
21
+ ast (2.4.2)
22
+ base64 (0.2.0)
23
+ bigdecimal (3.1.4)
24
+ coderay (1.1.3)
25
+ concurrent-ruby (1.2.2)
26
+ connection_pool (2.4.1)
27
+ diff-lcs (1.5.0)
28
+ drb (2.2.0)
29
+ ruby2_keywords
30
+ esse (0.2.4)
31
+ multi_json
32
+ thor (>= 0.19)
33
+ esse-rspec (0.0.1)
34
+ esse (>= 0.2.4)
35
+ rspec (~> 3.12)
36
+ i18n (1.14.1)
37
+ concurrent-ruby (~> 1.0)
38
+ json (2.6.3)
39
+ language_server-protocol (3.17.0.3)
40
+ lint_roller (1.1.0)
41
+ method_source (1.0.0)
42
+ minitest (5.20.0)
43
+ multi_json (1.15.0)
44
+ mutex_m (0.2.0)
45
+ pagy (5.10.1)
46
+ activesupport
47
+ parallel (1.23.0)
48
+ parser (3.2.2.4)
49
+ ast (~> 2.4.1)
50
+ racc
51
+ pry (0.14.2)
52
+ coderay (~> 1.1)
53
+ method_source (~> 1.0)
54
+ racc (1.7.3)
55
+ rack (3.0.8)
56
+ rainbow (3.1.1)
57
+ rake-manifest (0.2.3)
58
+ regexp_parser (2.8.2)
59
+ rexml (3.2.6)
60
+ rspec (3.12.0)
61
+ rspec-core (~> 3.12.0)
62
+ rspec-expectations (~> 3.12.0)
63
+ rspec-mocks (~> 3.12.0)
64
+ rspec-core (3.12.2)
65
+ rspec-support (~> 3.12.0)
66
+ rspec-expectations (3.12.3)
67
+ diff-lcs (>= 1.2.0, < 2.0)
68
+ rspec-support (~> 3.12.0)
69
+ rspec-mocks (3.12.6)
70
+ diff-lcs (>= 1.2.0, < 2.0)
71
+ rspec-support (~> 3.12.0)
72
+ rspec-support (3.12.1)
73
+ rubocop (1.57.2)
74
+ json (~> 2.3)
75
+ language_server-protocol (>= 3.17.0)
76
+ parallel (~> 1.10)
77
+ parser (>= 3.2.2.4)
78
+ rainbow (>= 2.2.2, < 4.0)
79
+ regexp_parser (>= 1.8, < 3.0)
80
+ rexml (>= 3.2.5, < 4.0)
81
+ rubocop-ast (>= 1.28.1, < 2.0)
82
+ ruby-progressbar (~> 1.7)
83
+ unicode-display_width (>= 2.4.0, < 3.0)
84
+ rubocop-ast (1.30.0)
85
+ parser (>= 3.2.1.0)
86
+ rubocop-capybara (2.19.0)
87
+ rubocop (~> 1.41)
88
+ rubocop-factory_bot (2.24.0)
89
+ rubocop (~> 1.33)
90
+ rubocop-performance (1.19.1)
91
+ rubocop (>= 1.7.0, < 2.0)
92
+ rubocop-ast (>= 0.4.0)
93
+ rubocop-rspec (2.25.0)
94
+ rubocop (~> 1.40)
95
+ rubocop-capybara (~> 2.17)
96
+ rubocop-factory_bot (~> 2.22)
97
+ ruby-progressbar (1.13.0)
98
+ ruby2_keywords (0.0.5)
99
+ standard (1.32.0)
100
+ language_server-protocol (~> 3.17.0.2)
101
+ lint_roller (~> 1.0)
102
+ rubocop (~> 1.57.2)
103
+ standard-custom (~> 1.0.0)
104
+ standard-performance (~> 1.2)
105
+ standard-custom (1.0.2)
106
+ lint_roller (~> 1.0)
107
+ rubocop (~> 1.50)
108
+ standard-performance (1.2.1)
109
+ lint_roller (~> 1.1)
110
+ rubocop-performance (~> 1.19.1)
111
+ thor (1.3.0)
112
+ tzinfo (2.0.6)
113
+ concurrent-ruby (~> 1.0)
114
+ unicode-display_width (2.5.0)
115
+
116
+ PLATFORMS
117
+ x86_64-linux
118
+
119
+ DEPENDENCIES
120
+ activesupport
121
+ esse (~> 0.2.4)
122
+ esse-pagy!
123
+ esse-rspec (~> 0.0.1)
124
+ pagy (~> 5.0)
125
+ pry
126
+ rack
127
+ rake-manifest
128
+ rspec
129
+ rubocop
130
+ rubocop-performance
131
+ rubocop-rspec
132
+ standard
133
+
134
+ BUNDLED WITH
135
+ 2.3.26
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "pagy", "~> 6.0"
6
+ gem "esse", "~> 0.2.4"
7
+ gem "esse-rspec", "~> 0.0.1"
8
+
9
+ group :test do
10
+ gem "activesupport"
11
+ gem "rack"
12
+ gem "rake-manifest"
13
+ end
14
+
15
+ # Specify your gem's dependencies in esse-pagy.gemspec
16
+ gemspec path: ".."
@@ -0,0 +1,134 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ esse-pagy (0.0.2)
5
+ esse (>= 0.2.4)
6
+ pagy (>= 5)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ activesupport (7.1.2)
12
+ base64
13
+ bigdecimal
14
+ concurrent-ruby (~> 1.0, >= 1.0.2)
15
+ connection_pool (>= 2.2.5)
16
+ drb
17
+ i18n (>= 1.6, < 2)
18
+ minitest (>= 5.1)
19
+ mutex_m
20
+ tzinfo (~> 2.0)
21
+ ast (2.4.2)
22
+ base64 (0.2.0)
23
+ bigdecimal (3.1.4)
24
+ coderay (1.1.3)
25
+ concurrent-ruby (1.2.2)
26
+ connection_pool (2.4.1)
27
+ diff-lcs (1.5.0)
28
+ drb (2.2.0)
29
+ ruby2_keywords
30
+ esse (0.2.4)
31
+ multi_json
32
+ thor (>= 0.19)
33
+ esse-rspec (0.0.1)
34
+ esse (>= 0.2.4)
35
+ rspec (~> 3.12)
36
+ i18n (1.14.1)
37
+ concurrent-ruby (~> 1.0)
38
+ json (2.6.3)
39
+ language_server-protocol (3.17.0.3)
40
+ lint_roller (1.1.0)
41
+ method_source (1.0.0)
42
+ minitest (5.20.0)
43
+ multi_json (1.15.0)
44
+ mutex_m (0.2.0)
45
+ pagy (6.5.0)
46
+ parallel (1.23.0)
47
+ parser (3.2.2.4)
48
+ ast (~> 2.4.1)
49
+ racc
50
+ pry (0.14.2)
51
+ coderay (~> 1.1)
52
+ method_source (~> 1.0)
53
+ racc (1.7.3)
54
+ rack (3.0.8)
55
+ rainbow (3.1.1)
56
+ rake-manifest (0.2.3)
57
+ regexp_parser (2.8.2)
58
+ rexml (3.2.6)
59
+ rspec (3.12.0)
60
+ rspec-core (~> 3.12.0)
61
+ rspec-expectations (~> 3.12.0)
62
+ rspec-mocks (~> 3.12.0)
63
+ rspec-core (3.12.2)
64
+ rspec-support (~> 3.12.0)
65
+ rspec-expectations (3.12.3)
66
+ diff-lcs (>= 1.2.0, < 2.0)
67
+ rspec-support (~> 3.12.0)
68
+ rspec-mocks (3.12.6)
69
+ diff-lcs (>= 1.2.0, < 2.0)
70
+ rspec-support (~> 3.12.0)
71
+ rspec-support (3.12.1)
72
+ rubocop (1.57.2)
73
+ json (~> 2.3)
74
+ language_server-protocol (>= 3.17.0)
75
+ parallel (~> 1.10)
76
+ parser (>= 3.2.2.4)
77
+ rainbow (>= 2.2.2, < 4.0)
78
+ regexp_parser (>= 1.8, < 3.0)
79
+ rexml (>= 3.2.5, < 4.0)
80
+ rubocop-ast (>= 1.28.1, < 2.0)
81
+ ruby-progressbar (~> 1.7)
82
+ unicode-display_width (>= 2.4.0, < 3.0)
83
+ rubocop-ast (1.30.0)
84
+ parser (>= 3.2.1.0)
85
+ rubocop-capybara (2.19.0)
86
+ rubocop (~> 1.41)
87
+ rubocop-factory_bot (2.24.0)
88
+ rubocop (~> 1.33)
89
+ rubocop-performance (1.19.1)
90
+ rubocop (>= 1.7.0, < 2.0)
91
+ rubocop-ast (>= 0.4.0)
92
+ rubocop-rspec (2.25.0)
93
+ rubocop (~> 1.40)
94
+ rubocop-capybara (~> 2.17)
95
+ rubocop-factory_bot (~> 2.22)
96
+ ruby-progressbar (1.13.0)
97
+ ruby2_keywords (0.0.5)
98
+ standard (1.32.0)
99
+ language_server-protocol (~> 3.17.0.2)
100
+ lint_roller (~> 1.0)
101
+ rubocop (~> 1.57.2)
102
+ standard-custom (~> 1.0.0)
103
+ standard-performance (~> 1.2)
104
+ standard-custom (1.0.2)
105
+ lint_roller (~> 1.0)
106
+ rubocop (~> 1.50)
107
+ standard-performance (1.2.1)
108
+ lint_roller (~> 1.1)
109
+ rubocop-performance (~> 1.19.1)
110
+ thor (1.3.0)
111
+ tzinfo (2.0.6)
112
+ concurrent-ruby (~> 1.0)
113
+ unicode-display_width (2.5.0)
114
+
115
+ PLATFORMS
116
+ x86_64-linux
117
+
118
+ DEPENDENCIES
119
+ activesupport
120
+ esse (~> 0.2.4)
121
+ esse-pagy!
122
+ esse-rspec (~> 0.0.1)
123
+ pagy (~> 6.0)
124
+ pry
125
+ rack
126
+ rake-manifest
127
+ rspec
128
+ rubocop
129
+ rubocop-performance
130
+ rubocop-rspec
131
+ standard
132
+
133
+ BUNDLED WITH
134
+ 2.3.26
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "pagy", "~> 7.0"
6
+ gem "esse", "~> 0.2.4"
7
+ gem "esse-rspec", "~> 0.0.1"
8
+
9
+ group :test do
10
+ gem "activesupport"
11
+ gem "rack"
12
+ gem "rake-manifest"
13
+ end
14
+
15
+ # Specify your gem's dependencies in esse-pagy.gemspec
16
+ gemspec path: ".."
@@ -0,0 +1,135 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ esse-pagy (0.0.2)
5
+ esse (>= 0.2.4)
6
+ pagy (>= 5)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ activesupport (7.2.2.2)
12
+ base64
13
+ benchmark (>= 0.3)
14
+ bigdecimal
15
+ concurrent-ruby (~> 1.0, >= 1.3.1)
16
+ connection_pool (>= 2.2.5)
17
+ drb
18
+ i18n (>= 1.6, < 2)
19
+ logger (>= 1.4.2)
20
+ minitest (>= 5.1)
21
+ securerandom (>= 0.3)
22
+ tzinfo (~> 2.0, >= 2.0.5)
23
+ ast (2.4.3)
24
+ base64 (0.3.0)
25
+ benchmark (0.4.1)
26
+ bigdecimal (3.2.3)
27
+ coderay (1.1.3)
28
+ concurrent-ruby (1.3.5)
29
+ connection_pool (2.5.4)
30
+ diff-lcs (1.6.2)
31
+ drb (2.2.3)
32
+ esse (0.2.6)
33
+ multi_json
34
+ thor (>= 0.19)
35
+ esse-rspec (0.0.6)
36
+ esse (>= 0.2.4)
37
+ rspec (>= 3)
38
+ i18n (1.14.7)
39
+ concurrent-ruby (~> 1.0)
40
+ json (2.15.0)
41
+ language_server-protocol (3.17.0.5)
42
+ lint_roller (1.1.0)
43
+ logger (1.7.0)
44
+ method_source (1.1.0)
45
+ minitest (5.25.5)
46
+ multi_json (1.17.0)
47
+ pagy (7.0.11)
48
+ parallel (1.27.0)
49
+ parser (3.3.9.0)
50
+ ast (~> 2.4.1)
51
+ racc
52
+ prism (1.5.1)
53
+ pry (0.15.2)
54
+ coderay (~> 1.1)
55
+ method_source (~> 1.0)
56
+ racc (1.8.1)
57
+ rack (3.2.1)
58
+ rainbow (3.1.1)
59
+ rake-manifest (0.2.3)
60
+ regexp_parser (2.11.3)
61
+ rspec (3.13.1)
62
+ rspec-core (~> 3.13.0)
63
+ rspec-expectations (~> 3.13.0)
64
+ rspec-mocks (~> 3.13.0)
65
+ rspec-core (3.13.5)
66
+ rspec-support (~> 3.13.0)
67
+ rspec-expectations (3.13.5)
68
+ diff-lcs (>= 1.2.0, < 2.0)
69
+ rspec-support (~> 3.13.0)
70
+ rspec-mocks (3.13.5)
71
+ diff-lcs (>= 1.2.0, < 2.0)
72
+ rspec-support (~> 3.13.0)
73
+ rspec-support (3.13.6)
74
+ rubocop (1.81.0)
75
+ json (~> 2.3)
76
+ language_server-protocol (~> 3.17.0.2)
77
+ lint_roller (~> 1.1.0)
78
+ parallel (~> 1.10)
79
+ parser (>= 3.3.0.2)
80
+ rainbow (>= 2.2.2, < 4.0)
81
+ regexp_parser (>= 2.9.3, < 3.0)
82
+ rubocop-ast (>= 1.47.1, < 2.0)
83
+ ruby-progressbar (~> 1.7)
84
+ unicode-display_width (>= 2.4.0, < 4.0)
85
+ rubocop-ast (1.47.1)
86
+ parser (>= 3.3.7.2)
87
+ prism (~> 1.4)
88
+ rubocop-performance (1.25.0)
89
+ lint_roller (~> 1.1)
90
+ rubocop (>= 1.75.0, < 2.0)
91
+ rubocop-ast (>= 1.38.0, < 2.0)
92
+ rubocop-rspec (3.7.0)
93
+ lint_roller (~> 1.1)
94
+ rubocop (~> 1.72, >= 1.72.1)
95
+ ruby-progressbar (1.13.0)
96
+ securerandom (0.4.1)
97
+ standard (1.35.0.1)
98
+ language_server-protocol (~> 3.17.0.2)
99
+ lint_roller (~> 1.0)
100
+ rubocop (~> 1.62)
101
+ standard-custom (~> 1.0.0)
102
+ standard-performance (~> 1.3)
103
+ standard-custom (1.0.2)
104
+ lint_roller (~> 1.0)
105
+ rubocop (~> 1.50)
106
+ standard-performance (1.8.0)
107
+ lint_roller (~> 1.1)
108
+ rubocop-performance (~> 1.25.0)
109
+ thor (1.4.0)
110
+ tzinfo (2.0.6)
111
+ concurrent-ruby (~> 1.0)
112
+ unicode-display_width (3.2.0)
113
+ unicode-emoji (~> 4.1)
114
+ unicode-emoji (4.1.0)
115
+
116
+ PLATFORMS
117
+ x86_64-linux
118
+
119
+ DEPENDENCIES
120
+ activesupport
121
+ esse (~> 0.2.4)
122
+ esse-pagy!
123
+ esse-rspec (~> 0.0.1)
124
+ pagy (~> 7.0)
125
+ pry
126
+ rack
127
+ rake-manifest
128
+ rspec
129
+ rubocop
130
+ rubocop-performance
131
+ rubocop-rspec
132
+ standard
133
+
134
+ BUNDLED WITH
135
+ 2.4.13
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "pagy", "~> 8.0"
6
+ gem "esse", "~> 0.2.4"
7
+ gem "esse-rspec", "~> 0.0.1"
8
+
9
+ group :test do
10
+ gem "activesupport"
11
+ gem "rack"
12
+ gem "rake-manifest"
13
+ end
14
+
15
+ # Specify your gem's dependencies in esse-pagy.gemspec
16
+ gemspec path: ".."
@@ -0,0 +1,137 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ esse-pagy (0.0.2)
5
+ esse (>= 0.2.4)
6
+ pagy (>= 5)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ activesupport (8.0.3)
12
+ base64
13
+ benchmark (>= 0.3)
14
+ bigdecimal
15
+ concurrent-ruby (~> 1.0, >= 1.3.1)
16
+ connection_pool (>= 2.2.5)
17
+ drb
18
+ i18n (>= 1.6, < 2)
19
+ logger (>= 1.4.2)
20
+ minitest (>= 5.1)
21
+ securerandom (>= 0.3)
22
+ tzinfo (~> 2.0, >= 2.0.5)
23
+ uri (>= 0.13.1)
24
+ ast (2.4.3)
25
+ base64 (0.3.0)
26
+ benchmark (0.4.1)
27
+ bigdecimal (3.2.3)
28
+ coderay (1.1.3)
29
+ concurrent-ruby (1.3.5)
30
+ connection_pool (2.5.4)
31
+ diff-lcs (1.6.2)
32
+ drb (2.2.3)
33
+ esse (0.2.6)
34
+ multi_json
35
+ thor (>= 0.19)
36
+ esse-rspec (0.0.6)
37
+ esse (>= 0.2.4)
38
+ rspec (>= 3)
39
+ i18n (1.14.7)
40
+ concurrent-ruby (~> 1.0)
41
+ json (2.15.0)
42
+ language_server-protocol (3.17.0.5)
43
+ lint_roller (1.1.0)
44
+ logger (1.7.0)
45
+ method_source (1.1.0)
46
+ minitest (5.25.5)
47
+ multi_json (1.17.0)
48
+ pagy (8.6.3)
49
+ parallel (1.27.0)
50
+ parser (3.3.9.0)
51
+ ast (~> 2.4.1)
52
+ racc
53
+ prism (1.5.1)
54
+ pry (0.15.2)
55
+ coderay (~> 1.1)
56
+ method_source (~> 1.0)
57
+ racc (1.8.1)
58
+ rack (3.2.1)
59
+ rainbow (3.1.1)
60
+ rake-manifest (0.2.3)
61
+ regexp_parser (2.11.3)
62
+ rspec (3.13.1)
63
+ rspec-core (~> 3.13.0)
64
+ rspec-expectations (~> 3.13.0)
65
+ rspec-mocks (~> 3.13.0)
66
+ rspec-core (3.13.5)
67
+ rspec-support (~> 3.13.0)
68
+ rspec-expectations (3.13.5)
69
+ diff-lcs (>= 1.2.0, < 2.0)
70
+ rspec-support (~> 3.13.0)
71
+ rspec-mocks (3.13.5)
72
+ diff-lcs (>= 1.2.0, < 2.0)
73
+ rspec-support (~> 3.13.0)
74
+ rspec-support (3.13.6)
75
+ rubocop (1.81.0)
76
+ json (~> 2.3)
77
+ language_server-protocol (~> 3.17.0.2)
78
+ lint_roller (~> 1.1.0)
79
+ parallel (~> 1.10)
80
+ parser (>= 3.3.0.2)
81
+ rainbow (>= 2.2.2, < 4.0)
82
+ regexp_parser (>= 2.9.3, < 3.0)
83
+ rubocop-ast (>= 1.47.1, < 2.0)
84
+ ruby-progressbar (~> 1.7)
85
+ unicode-display_width (>= 2.4.0, < 4.0)
86
+ rubocop-ast (1.47.1)
87
+ parser (>= 3.3.7.2)
88
+ prism (~> 1.4)
89
+ rubocop-performance (1.25.0)
90
+ lint_roller (~> 1.1)
91
+ rubocop (>= 1.75.0, < 2.0)
92
+ rubocop-ast (>= 1.38.0, < 2.0)
93
+ rubocop-rspec (3.7.0)
94
+ lint_roller (~> 1.1)
95
+ rubocop (~> 1.72, >= 1.72.1)
96
+ ruby-progressbar (1.13.0)
97
+ securerandom (0.4.1)
98
+ standard (1.35.0.1)
99
+ language_server-protocol (~> 3.17.0.2)
100
+ lint_roller (~> 1.0)
101
+ rubocop (~> 1.62)
102
+ standard-custom (~> 1.0.0)
103
+ standard-performance (~> 1.3)
104
+ standard-custom (1.0.2)
105
+ lint_roller (~> 1.0)
106
+ rubocop (~> 1.50)
107
+ standard-performance (1.8.0)
108
+ lint_roller (~> 1.1)
109
+ rubocop-performance (~> 1.25.0)
110
+ thor (1.4.0)
111
+ tzinfo (2.0.6)
112
+ concurrent-ruby (~> 1.0)
113
+ unicode-display_width (3.2.0)
114
+ unicode-emoji (~> 4.1)
115
+ unicode-emoji (4.1.0)
116
+ uri (1.0.3)
117
+
118
+ PLATFORMS
119
+ x86_64-linux
120
+
121
+ DEPENDENCIES
122
+ activesupport
123
+ esse (~> 0.2.4)
124
+ esse-pagy!
125
+ esse-rspec (~> 0.0.1)
126
+ pagy (~> 8.0)
127
+ pry
128
+ rack
129
+ rake-manifest
130
+ rspec
131
+ rubocop
132
+ rubocop-performance
133
+ rubocop-rspec
134
+ standard
135
+
136
+ BUNDLED WITH
137
+ 2.3.26
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "pagy", "~> 9.0"
6
+ gem "esse", "~> 0.2.4"
7
+ gem "esse-rspec", "~> 0.0.1"
8
+
9
+ group :test do
10
+ gem "activesupport"
11
+ gem "rack"
12
+ gem "rake-manifest"
13
+ end
14
+
15
+ # Specify your gem's dependencies in esse-pagy.gemspec
16
+ gemspec path: ".."
@@ -0,0 +1,138 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ esse-pagy (0.0.2)
5
+ esse (>= 0.2.4)
6
+ pagy (>= 5)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ activesupport (8.0.3)
12
+ base64
13
+ benchmark (>= 0.3)
14
+ bigdecimal
15
+ concurrent-ruby (~> 1.0, >= 1.3.1)
16
+ connection_pool (>= 2.2.5)
17
+ drb
18
+ i18n (>= 1.6, < 2)
19
+ logger (>= 1.4.2)
20
+ minitest (>= 5.1)
21
+ securerandom (>= 0.3)
22
+ tzinfo (~> 2.0, >= 2.0.5)
23
+ uri (>= 0.13.1)
24
+ ast (2.4.3)
25
+ base64 (0.3.0)
26
+ benchmark (0.4.1)
27
+ bigdecimal (3.2.3)
28
+ coderay (1.1.3)
29
+ concurrent-ruby (1.3.5)
30
+ connection_pool (2.5.4)
31
+ diff-lcs (1.6.2)
32
+ drb (2.2.3)
33
+ esse (0.2.6)
34
+ multi_json
35
+ thor (>= 0.19)
36
+ esse-rspec (0.0.6)
37
+ esse (>= 0.2.4)
38
+ rspec (>= 3)
39
+ i18n (1.14.7)
40
+ concurrent-ruby (~> 1.0)
41
+ json (2.15.0)
42
+ language_server-protocol (3.17.0.5)
43
+ lint_roller (1.1.0)
44
+ logger (1.7.0)
45
+ method_source (1.1.0)
46
+ minitest (5.25.5)
47
+ multi_json (1.17.0)
48
+ pagy (9.4.0)
49
+ parallel (1.27.0)
50
+ parser (3.3.9.0)
51
+ ast (~> 2.4.1)
52
+ racc
53
+ prism (1.5.1)
54
+ pry (0.15.2)
55
+ coderay (~> 1.1)
56
+ method_source (~> 1.0)
57
+ racc (1.8.1)
58
+ rack (3.2.1)
59
+ rainbow (3.1.1)
60
+ rake-manifest (0.2.3)
61
+ regexp_parser (2.11.3)
62
+ rspec (3.13.1)
63
+ rspec-core (~> 3.13.0)
64
+ rspec-expectations (~> 3.13.0)
65
+ rspec-mocks (~> 3.13.0)
66
+ rspec-core (3.13.5)
67
+ rspec-support (~> 3.13.0)
68
+ rspec-expectations (3.13.5)
69
+ diff-lcs (>= 1.2.0, < 2.0)
70
+ rspec-support (~> 3.13.0)
71
+ rspec-mocks (3.13.5)
72
+ diff-lcs (>= 1.2.0, < 2.0)
73
+ rspec-support (~> 3.13.0)
74
+ rspec-support (3.13.6)
75
+ rubocop (1.81.0)
76
+ json (~> 2.3)
77
+ language_server-protocol (~> 3.17.0.2)
78
+ lint_roller (~> 1.1.0)
79
+ parallel (~> 1.10)
80
+ parser (>= 3.3.0.2)
81
+ rainbow (>= 2.2.2, < 4.0)
82
+ regexp_parser (>= 2.9.3, < 3.0)
83
+ rubocop-ast (>= 1.47.1, < 2.0)
84
+ ruby-progressbar (~> 1.7)
85
+ unicode-display_width (>= 2.4.0, < 4.0)
86
+ rubocop-ast (1.47.1)
87
+ parser (>= 3.3.7.2)
88
+ prism (~> 1.4)
89
+ rubocop-performance (1.25.0)
90
+ lint_roller (~> 1.1)
91
+ rubocop (>= 1.75.0, < 2.0)
92
+ rubocop-ast (>= 1.38.0, < 2.0)
93
+ rubocop-rspec (3.7.0)
94
+ lint_roller (~> 1.1)
95
+ rubocop (~> 1.72, >= 1.72.1)
96
+ ruby-progressbar (1.13.0)
97
+ securerandom (0.4.1)
98
+ standard (1.35.0.1)
99
+ language_server-protocol (~> 3.17.0.2)
100
+ lint_roller (~> 1.0)
101
+ rubocop (~> 1.62)
102
+ standard-custom (~> 1.0.0)
103
+ standard-performance (~> 1.3)
104
+ standard-custom (1.0.2)
105
+ lint_roller (~> 1.0)
106
+ rubocop (~> 1.50)
107
+ standard-performance (1.8.0)
108
+ lint_roller (~> 1.1)
109
+ rubocop-performance (~> 1.25.0)
110
+ thor (1.4.0)
111
+ tzinfo (2.0.6)
112
+ concurrent-ruby (~> 1.0)
113
+ unicode-display_width (3.2.0)
114
+ unicode-emoji (~> 4.1)
115
+ unicode-emoji (4.1.0)
116
+ uri (1.0.3)
117
+
118
+ PLATFORMS
119
+ ruby
120
+ x86_64-linux
121
+
122
+ DEPENDENCIES
123
+ activesupport
124
+ esse (~> 0.2.4)
125
+ esse-pagy!
126
+ esse-rspec (~> 0.0.1)
127
+ pagy (~> 9.0)
128
+ pry
129
+ rack
130
+ rake-manifest
131
+ rspec
132
+ rubocop
133
+ rubocop-performance
134
+ rubocop-rspec
135
+ standard
136
+
137
+ BUNDLED WITH
138
+ 2.5.23
data/lib/esse/pagy.rb CHANGED
@@ -34,8 +34,15 @@ module Esse
34
34
  def new_from_esse(query, vars = {})
35
35
  vars[:count] = query.response.total
36
36
  vars[:page] = (query.offset_value / query.limit_value.to_f).ceil + 1
37
- vars[:items] = query.limit_value
38
- ::Pagy.new(vars)
37
+ vars[:limit] = query.limit_value
38
+
39
+ if ::Pagy::VERSION.to_i < 9
40
+ # Convert :limit back to :items for older Pagy versions
41
+ vars[:items] = vars.delete(:limit)
42
+ ::Pagy.new(vars)
43
+ else
44
+ ::Pagy.new(**vars)
45
+ end
39
46
  end
40
47
  end
41
48
 
@@ -47,12 +54,20 @@ module Esse
47
54
  def pagy_esse(pagy_search_args, vars = {})
48
55
  cluster, indices, kwargs, block, *called = pagy_search_args
49
56
  vars = pagy_esse_get_vars(nil, vars)
57
+
50
58
  query = cluster.send(::Pagy::DEFAULT[:esse_search], *indices, **kwargs, &block)
51
- .limit(vars[:items])
52
- .offset(vars[:items] * (vars[:page] - 1))
59
+ .limit(vars[:limit])
60
+ .offset(vars[:limit] * (vars[:page] - 1))
53
61
  vars[:count] = query.response.total
54
62
 
55
- pagy = ::Pagy.new(vars)
63
+ # Handle Pagy 9+ API changes
64
+ if ::Pagy::VERSION.to_i >= 9
65
+ pagy = ::Pagy.new(**vars)
66
+ else
67
+ legacy_vars = vars.dup
68
+ legacy_vars[:items] = legacy_vars.delete(:limit)
69
+ pagy = ::Pagy.new(legacy_vars)
70
+ end
56
71
  # with :last_page overflow we need to re-run the method in order to get the hits
57
72
  return pagy_esse(pagy_search_args, vars.merge(page: pagy.page)) \
58
73
  if defined?(::Pagy::OverflowExtra) && pagy.overflow? && pagy.vars[:overflow] == :last_page
@@ -64,7 +79,15 @@ module Esse
64
79
  # the _query argument is not available when the method is called
65
80
  def pagy_esse_get_vars(_query, vars)
66
81
  pagy_set_items_from_params(vars) if defined?(ItemsExtra)
67
- vars[:items] ||= ::Pagy::DEFAULT[:items]
82
+
83
+ # Convert :items to :limit for consistency, this is not needed for Pagy 9+
84
+ vars[:limit] = vars.delete(:items) if vars.key?(:items)
85
+ if ::Pagy::VERSION.to_i < 9
86
+ vars[:limit] ||= ::Pagy::DEFAULT[:items]
87
+ else
88
+ vars[:limit] ||= ::Pagy::DEFAULT[:limit]
89
+ end
90
+
68
91
  vars[:page] ||= (params[vars[:page_param] || ::Pagy::DEFAULT[:page_param]] || 1).to_i
69
92
  vars
70
93
  end
data/mise.toml ADDED
@@ -0,0 +1,2 @@
1
+ [tools]
2
+ ruby = "2.7.8"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: esse-pagy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcos G. Zimmermann
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-11-15 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: esse
@@ -135,7 +135,18 @@ files:
135
135
  - Gemfile.lock
136
136
  - LICENSE
137
137
  - README.md
138
+ - gemfiles/Gemfile.pagy-5
139
+ - gemfiles/Gemfile.pagy-5.lock
140
+ - gemfiles/Gemfile.pagy-6
141
+ - gemfiles/Gemfile.pagy-6.lock
142
+ - gemfiles/Gemfile.pagy-7
143
+ - gemfiles/Gemfile.pagy-7.lock
144
+ - gemfiles/Gemfile.pagy-8
145
+ - gemfiles/Gemfile.pagy-8.lock
146
+ - gemfiles/Gemfile.pagy-9
147
+ - gemfiles/Gemfile.pagy-9.lock
138
148
  - lib/esse/pagy.rb
149
+ - mise.toml
139
150
  homepage: https://github.com/marcosgz/esse-pagy
140
151
  licenses:
141
152
  - MIT
@@ -158,7 +169,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
158
169
  - !ruby/object:Gem::Version
159
170
  version: '0'
160
171
  requirements: []
161
- rubygems_version: 3.1.6
172
+ rubygems_version: 3.4.22
162
173
  signing_key:
163
174
  specification_version: 4
164
175
  summary: Pagy extensions for Esse