graphql-kaminari_connection 1.0.0 → 1.1.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 +4 -4
- data/.github/workflows/release-gem.yml +22 -0
- data/.github/workflows/test.yml +11 -6
- data/.gitignore +1 -0
- data/.rubocop.yml +28 -2
- data/Appraisals +12 -0
- data/CHANGELOG.md +11 -0
- data/README.md +3 -3
- data/gemfiles/graphql_1.x.gemfile +7 -0
- data/gemfiles/graphql_2.x.gemfile +7 -0
- data/graphql-kaminari_connection.gemspec +5 -4
- data/lib/graphql/kaminari_connection/version.rb +1 -1
- metadata +39 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 84a0adf57a19fc7be916b16f6a60be88ba1ced805434f48b4281a88d91e5e28a
|
4
|
+
data.tar.gz: d021b78f93b1cd7d8217cdd8bef212d9449e2e0afdea95725d0736b32c131890
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3e5cad183e728d2161c6d2a593d034b132bd567295db9f4f768081defa8ce76e711657a89329554bed3f2ff1b54174cd5e8577277cc8578ce022a8d5158ab48
|
7
|
+
data.tar.gz: 91d92c8750a5450775285048b2bdbd571805a905621f7c93ef6d60336e0d5159543923320f17dbfe46ac3820a2d34bc68401065dc0fe12b07a700a9b2fe4baaa
|
@@ -0,0 +1,22 @@
|
|
1
|
+
name:
|
2
|
+
|
3
|
+
on:
|
4
|
+
workflow_dispatch:
|
5
|
+
|
6
|
+
jobs:
|
7
|
+
release-gem:
|
8
|
+
name: Release gem on RubyGems.org
|
9
|
+
runs-on: ubuntu-latest
|
10
|
+
|
11
|
+
permissions:
|
12
|
+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
|
13
|
+
contents: write # IMPORTANT: this permission is required for `rake release` to push the release tag
|
14
|
+
|
15
|
+
steps:
|
16
|
+
- uses: actions/checkout@v4
|
17
|
+
- name: Set up Ruby
|
18
|
+
uses: ruby/setup-ruby@v1
|
19
|
+
with:
|
20
|
+
bundler-cache: true
|
21
|
+
ruby-version: 3.1.6
|
22
|
+
- uses: rubygems/release-gem@v1
|
data/.github/workflows/test.yml
CHANGED
@@ -14,12 +14,17 @@ jobs:
|
|
14
14
|
strategy:
|
15
15
|
fail-fast: false
|
16
16
|
matrix:
|
17
|
-
ruby: [
|
18
|
-
|
17
|
+
ruby: [3.1.6, 3.2.6, 3.3.6]
|
18
|
+
gemfile:
|
19
|
+
- graphql_1.x
|
20
|
+
- graphql_2.x
|
21
|
+
env:
|
22
|
+
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
|
23
|
+
name: Ruby ${{ matrix.ruby }} - Gemfile ${{ matrix.gemfile }}
|
19
24
|
steps:
|
20
25
|
- name: Get branch names
|
21
26
|
id: branch-name
|
22
|
-
uses: tj-actions/branch-names@
|
27
|
+
uses: tj-actions/branch-names@v7.0.7
|
23
28
|
- uses: actions/checkout@v3
|
24
29
|
- uses: ruby/setup-ruby@v1
|
25
30
|
with:
|
@@ -30,12 +35,12 @@ jobs:
|
|
30
35
|
codeclimate:
|
31
36
|
runs-on: ubuntu-latest
|
32
37
|
steps:
|
33
|
-
- uses: tj-actions/branch-names@
|
38
|
+
- uses: tj-actions/branch-names@v7.0.7
|
34
39
|
id: branch-name
|
35
40
|
- uses: actions/checkout@v3
|
36
41
|
- uses: ruby/setup-ruby@v1
|
37
42
|
with:
|
38
|
-
ruby-version:
|
43
|
+
ruby-version: 3.1.6
|
39
44
|
bundler-cache: true
|
40
45
|
- name: Test & publish code coverage
|
41
46
|
if: "${{ env.CC_TEST_REPORTER_ID != '' }}"
|
@@ -58,7 +63,7 @@ jobs:
|
|
58
63
|
uses: ruby/setup-ruby@v1
|
59
64
|
with:
|
60
65
|
bundler-cache: true
|
61
|
-
ruby-version:
|
66
|
+
ruby-version: 3.1.6
|
62
67
|
|
63
68
|
- name: Run rubocop
|
64
69
|
run: bundle exec rubocop
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
@@ -1,6 +1,19 @@
|
|
1
|
+
# Merge default configurations on Exclude option
|
2
|
+
inherit_mode:
|
3
|
+
merge:
|
4
|
+
- Exclude
|
5
|
+
|
6
|
+
require:
|
7
|
+
- rubocop-rspec
|
8
|
+
|
1
9
|
AllCops:
|
2
|
-
TargetRubyVersion:
|
10
|
+
TargetRubyVersion: 3.1
|
3
11
|
NewCops: enable
|
12
|
+
Exclude:
|
13
|
+
- gemfiles/**/* # Ignores appraisal gemfiles
|
14
|
+
|
15
|
+
Gemspec/DevelopmentDependencies:
|
16
|
+
Enabled: false
|
4
17
|
|
5
18
|
Metrics/BlockLength:
|
6
19
|
Enabled: false
|
@@ -8,8 +21,21 @@ Metrics/BlockLength:
|
|
8
21
|
Metrics/MethodLength:
|
9
22
|
Enabled: false
|
10
23
|
|
11
|
-
|
24
|
+
Layout/LineLength:
|
12
25
|
Max: 120
|
13
26
|
|
27
|
+
RSpec/ExampleLength:
|
28
|
+
Enabled: false
|
29
|
+
|
30
|
+
RSpec/ExampleWording:
|
31
|
+
Enabled: false
|
32
|
+
|
33
|
+
RSpec/MultipleExpectations:
|
34
|
+
Enabled: false
|
35
|
+
|
36
|
+
RSpec/SpecFilePathFormat:
|
37
|
+
CustomTransform:
|
38
|
+
GraphQL: graphql
|
39
|
+
|
14
40
|
Style/Documentation:
|
15
41
|
Enabled: false
|
data/Appraisals
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# This configuration file is used by [appraisal gem](https://github.com/thoughtbot/appraisal)
|
4
|
+
# to test the gem against multiple versions of dependencies.
|
5
|
+
|
6
|
+
appraise 'graphql-1.x' do
|
7
|
+
gem 'graphql', '~> 1.9'
|
8
|
+
end
|
9
|
+
|
10
|
+
appraise 'graphql-2.x' do
|
11
|
+
gem 'graphql', '~> 2.0'
|
12
|
+
end
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
# v1.1.0
|
2
|
+
|
3
|
+
- Support graphql-ruby 2.x [#32](https://github.com/increments/graphql-kaminari_connection/pull/32)
|
4
|
+
- Support only currently living ruby versions [#33](https://github.com/increments/graphql-kaminari_connection/pull/33)
|
5
|
+
|
6
|
+
# v1.0.0
|
7
|
+
|
8
|
+
- Change support ruby version [#26](https://github.com/increments/graphql-kaminari_connection/pull/26)
|
9
|
+
- Work with graphql-ruby 1.9.0 [#20](https://github.com/increments/graphql-kaminari_connection/pull/20)
|
10
|
+
|
11
|
+
# v0.1.0
|
data/README.md
CHANGED
@@ -42,7 +42,7 @@ then set `.kaminari_connection` to field type and resolve it as a kaminari objec
|
|
42
42
|
|
43
43
|
```rb
|
44
44
|
class Types::Query < GraphQL::Schema::Object
|
45
|
-
field :articles, ArticleType.kaminari_connection
|
45
|
+
field :articles, **ArticleType.kaminari_connection
|
46
46
|
|
47
47
|
def articles(page: nil, per: nil)
|
48
48
|
Article.all.page(page).per(per)
|
@@ -89,7 +89,7 @@ You can define additional field arguments in its block:
|
|
89
89
|
|
90
90
|
```rb
|
91
91
|
class Types::Query < GraphQL::Schema::Object
|
92
|
-
field(:articles, ArticleType.kaminari_connection) do
|
92
|
+
field(:articles, **ArticleType.kaminari_connection) do
|
93
93
|
argument :scope, Types::ArticleScope, required: true
|
94
94
|
end
|
95
95
|
|
@@ -105,7 +105,7 @@ Give `{ without_count: true }` to `.kaminari_connection`:
|
|
105
105
|
|
106
106
|
```rb
|
107
107
|
class Types::Query < GraphQL::Schema::Object
|
108
|
-
field :articles, ArticleType.kaminari_connection(without_count: true)
|
108
|
+
field :articles, **ArticleType.kaminari_connection(without_count: true)
|
109
109
|
|
110
110
|
def articles(page: nil, per: nil)
|
111
111
|
Article.all.page(page).per(per).without_count
|
@@ -23,19 +23,20 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
24
24
|
spec.require_paths = ['lib']
|
25
25
|
|
26
|
-
spec.required_ruby_version = '>=
|
26
|
+
spec.required_ruby_version = '>= 3.1'
|
27
27
|
|
28
|
-
spec.add_dependency 'graphql', '
|
28
|
+
spec.add_dependency 'graphql', '>= 1.9', '< 3.0.0.a'
|
29
29
|
spec.add_dependency 'kaminari', '~> 1.1'
|
30
30
|
|
31
31
|
spec.add_development_dependency 'activerecord', '~> 6.0'
|
32
|
+
spec.add_development_dependency 'appraisal', '~> 2.5'
|
32
33
|
spec.add_development_dependency 'bundler', '~> 2.2'
|
33
34
|
spec.add_development_dependency 'codeclimate-test-reporter', '~> 1.0'
|
34
35
|
spec.add_development_dependency 'pry', '0.11.3'
|
35
36
|
spec.add_development_dependency 'rake', '~> 10.0'
|
36
37
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
37
|
-
spec.add_development_dependency 'rubocop', '~> 1.
|
38
|
-
spec.add_development_dependency 'rubocop-rspec', '~>
|
38
|
+
spec.add_development_dependency 'rubocop', '~> 1.69.2'
|
39
|
+
spec.add_development_dependency 'rubocop-rspec', '~> 3.3.0'
|
39
40
|
spec.add_development_dependency 'simplecov', '~> 0.13'
|
40
41
|
spec.add_development_dependency 'sqlite3', '~> 1.3'
|
41
42
|
spec.metadata['rubygems_mfa_required'] = 'true'
|
metadata
CHANGED
@@ -1,29 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: graphql-kaminari_connection
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yuku TAKAHASHI
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-12-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: graphql
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.9'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 3.0.0.a
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: '1.9'
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 3.0.0.a
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: kaminari
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -52,6 +58,20 @@ dependencies:
|
|
52
58
|
- - "~>"
|
53
59
|
- !ruby/object:Gem::Version
|
54
60
|
version: '6.0'
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: appraisal
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - "~>"
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '2.5'
|
68
|
+
type: :development
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - "~>"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '2.5'
|
55
75
|
- !ruby/object:Gem::Dependency
|
56
76
|
name: bundler
|
57
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -128,28 +148,28 @@ dependencies:
|
|
128
148
|
requirements:
|
129
149
|
- - "~>"
|
130
150
|
- !ruby/object:Gem::Version
|
131
|
-
version: 1.
|
151
|
+
version: 1.69.2
|
132
152
|
type: :development
|
133
153
|
prerelease: false
|
134
154
|
version_requirements: !ruby/object:Gem::Requirement
|
135
155
|
requirements:
|
136
156
|
- - "~>"
|
137
157
|
- !ruby/object:Gem::Version
|
138
|
-
version: 1.
|
158
|
+
version: 1.69.2
|
139
159
|
- !ruby/object:Gem::Dependency
|
140
160
|
name: rubocop-rspec
|
141
161
|
requirement: !ruby/object:Gem::Requirement
|
142
162
|
requirements:
|
143
163
|
- - "~>"
|
144
164
|
- !ruby/object:Gem::Version
|
145
|
-
version:
|
165
|
+
version: 3.3.0
|
146
166
|
type: :development
|
147
167
|
prerelease: false
|
148
168
|
version_requirements: !ruby/object:Gem::Requirement
|
149
169
|
requirements:
|
150
170
|
- - "~>"
|
151
171
|
- !ruby/object:Gem::Version
|
152
|
-
version:
|
172
|
+
version: 3.3.0
|
153
173
|
- !ruby/object:Gem::Dependency
|
154
174
|
name: simplecov
|
155
175
|
requirement: !ruby/object:Gem::Requirement
|
@@ -178,17 +198,20 @@ dependencies:
|
|
178
198
|
- - "~>"
|
179
199
|
- !ruby/object:Gem::Version
|
180
200
|
version: '1.3'
|
181
|
-
description:
|
201
|
+
description:
|
182
202
|
email:
|
183
203
|
- yuku@qiita.com
|
184
204
|
executables: []
|
185
205
|
extensions: []
|
186
206
|
extra_rdoc_files: []
|
187
207
|
files:
|
208
|
+
- ".github/workflows/release-gem.yml"
|
188
209
|
- ".github/workflows/test.yml"
|
189
210
|
- ".gitignore"
|
190
211
|
- ".rspec"
|
191
212
|
- ".rubocop.yml"
|
213
|
+
- Appraisals
|
214
|
+
- CHANGELOG.md
|
192
215
|
- CODE_OF_CONDUCT.md
|
193
216
|
- Gemfile
|
194
217
|
- LICENSE.txt
|
@@ -196,6 +219,8 @@ files:
|
|
196
219
|
- Rakefile
|
197
220
|
- bin/console
|
198
221
|
- bin/setup
|
222
|
+
- gemfiles/graphql_1.x.gemfile
|
223
|
+
- gemfiles/graphql_2.x.gemfile
|
199
224
|
- graphql-kaminari_connection.gemspec
|
200
225
|
- lib/graphql/kaminari_connection.rb
|
201
226
|
- lib/graphql/kaminari_connection/version.rb
|
@@ -204,7 +229,7 @@ licenses:
|
|
204
229
|
- MIT
|
205
230
|
metadata:
|
206
231
|
rubygems_mfa_required: 'true'
|
207
|
-
post_install_message:
|
232
|
+
post_install_message:
|
208
233
|
rdoc_options: []
|
209
234
|
require_paths:
|
210
235
|
- lib
|
@@ -212,15 +237,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
212
237
|
requirements:
|
213
238
|
- - ">="
|
214
239
|
- !ruby/object:Gem::Version
|
215
|
-
version: '
|
240
|
+
version: '3.1'
|
216
241
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
217
242
|
requirements:
|
218
243
|
- - ">="
|
219
244
|
- !ruby/object:Gem::Version
|
220
245
|
version: '0'
|
221
246
|
requirements: []
|
222
|
-
rubygems_version: 3.
|
223
|
-
signing_key:
|
247
|
+
rubygems_version: 3.3.27
|
248
|
+
signing_key:
|
224
249
|
specification_version: 4
|
225
250
|
summary: Kaminari based GraphQL pagination
|
226
251
|
test_files: []
|