graphql-pagination 1.1.1 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bb3c73bf0fa8d3efbadf8e202e640aa3b143902e04ced09ccfe03234de48ea03
4
- data.tar.gz: 3026f512e09729cbecb7b17ff64237573d5b544c56cf7f67b13eb780b5ce5cf6
3
+ metadata.gz: d715716106b2909150983a8bfdfac8e1a9d9b05d83c5b9862c2fc22b2db55489
4
+ data.tar.gz: 42e4ab3559c17d4c66a142af51797023e55732baa40f54f776f5707d7b34185f
5
5
  SHA512:
6
- metadata.gz: f542a291f10be3bf5d00b243e5f5bbfa3bc2660d5eb2acca4946d06a2e5b5e8a6de36130ed9fd217a6bf41428e34fe40ed740a5bb84ab002353bc16c14b8844c
7
- data.tar.gz: 765f0bbf03c61c8f1518795474f57f21176799675598cabc51a7705c184257423a7ffb96c22f0cb941b09acb6757ed5e24bb4b775189f6f20d5efc4c491ed4e7
6
+ metadata.gz: 0f3b71b35a6e209551664aac705224ad4a87dedd9cd94c5f919a5c7eacdc4136f2a6f21bcdbf8e63895e3ff97097f55458d3cf4cd04bfd70cad52f2a15946de7
7
+ data.tar.gz: 3fc4bd5ca7d35e3eff913bd15e44de5c679908c22ded3d3ce94bb7d1753e4211363ea2dd59e3e0d35e190d4358831dab6c40bd899f8707e82d8bf7ae135050ac
data/.bundler-version ADDED
@@ -0,0 +1 @@
1
+ 2.2.32
@@ -3,16 +3,14 @@ version: 1
3
3
  update_configs:
4
4
  - package_manager: "ruby:bundler"
5
5
  directory: "/"
6
- update_schedule: "monthly"
6
+ update_schedule: "daily"
7
7
  commit_message:
8
8
  prefix: "[dependabot]"
9
9
  allowed_updates:
10
10
  - match:
11
- update_type: "all"
11
+ dependency_type: "all"
12
+ update_type: "security"
12
13
  automerged_updates:
13
14
  - match:
14
- dependency_type: "development"
15
- update_type: "all"
16
- - match:
17
- dependency_type: "production"
18
- update_type: "all"
15
+ dependency_type: "all"
16
+ update_type: "security:patch"
@@ -0,0 +1,33 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to track an issue that has been identified
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Describe the bug**
11
+ A clear and concise description of what the bug is.
12
+
13
+ **To Reproduce**
14
+ Steps to reproduce the behavior:
15
+ 1. Go to '...'
16
+ 2. Click on '....'
17
+ 3. Scroll down to '....'
18
+ 4. See error
19
+
20
+ **Expected behavior**
21
+ A clear and concise description of what you expected to happen.
22
+
23
+ **Mutation/Query**
24
+
25
+ **URL and HTTP method (for non-GQL):**
26
+
27
+ **Sentry or Logs URL:**
28
+
29
+ **User/authentication details**
30
+ Impacted user name or service account
31
+
32
+ **Additional context**
33
+ Add any other context about the problem here.
@@ -0,0 +1 @@
1
+ blank_issues_enabled: false
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: New story
3
+ about: Add a new story for implementation
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Describe the solution**
11
+ A clear and concise description of what you want to happen.
12
+ When will this feature be done?
13
+
14
+ **Describe the users**
15
+ Who are we building this feature for?
16
+
17
+ **Additional context**
18
+ Add any other context or screenshots about the feature request here.
19
+ Link to any applicable documents describing the feature.
20
+
21
+ **Designs**
22
+ Link to any applicable designs on Invision.
@@ -0,0 +1,6 @@
1
+ ## Description, motivation and context
2
+ <!--- Describe your changes in detail -->
3
+ <!--- Why is this change required? What problem does it solve? -->
4
+
5
+ ## Related issue(s) or PR(s)
6
+ <!--- GH issue number -->
@@ -0,0 +1,16 @@
1
+ # automatically approve PRs submitted by Dependabot or Renofidev
2
+ # this will allow Dependabot to automatically merge dependency update PRs where CI passes
3
+ # from: https://github.com/hmarr/auto-approve-action
4
+ name: Auto approve dependency upgrades PRs
5
+
6
+ on:
7
+ pull_request
8
+
9
+ jobs:
10
+ auto-approve:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: hmarr/auto-approve-action@v2
14
+ if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]' || github.actor == 'renofidev'
15
+ with:
16
+ github-token: "${{ secrets.GITHUB_TOKEN }}"
@@ -0,0 +1,19 @@
1
+ name: automerge
2
+ on:
3
+ pull_request_review:
4
+ types:
5
+ - submitted
6
+ check_suite:
7
+ types:
8
+ - completed
9
+ status: {}
10
+ jobs:
11
+ automerge:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - name: automerge
15
+ uses: "pascalgn/automerge-action@v0.12.0"
16
+ env:
17
+ GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
18
+ MERGE_METHOD: squash
19
+ MERGE_DELETE_BRANCH: true
@@ -0,0 +1,28 @@
1
+ name: Ruby CI
2
+
3
+ on:
4
+ push:
5
+ branches: [ main ]
6
+ pull_request:
7
+ branches: [ main ]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ matrix:
14
+ ruby-version: ['2.7', '3.0']
15
+
16
+ steps:
17
+ - uses: actions/checkout@v2
18
+ - name: Set up Ruby
19
+ # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
20
+ # change this to (see https://github.com/ruby/setup-ruby#versioning):
21
+ # uses: ruby/setup-ruby@v1
22
+ uses: ruby/setup-ruby@473e4d8fe5dd94ee328fdfca9f8c9c7afc9dae5e
23
+ with:
24
+ ruby-version: ${{ matrix.ruby-version }}
25
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
26
+
27
+ - name: Run tests
28
+ run: bundle exec rake ci
data/Gemfile.lock CHANGED
@@ -1,80 +1,86 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- graphql-pagination (1.1.1)
5
- graphql (~> 1.9)
4
+ graphql-pagination (1.2.1)
5
+ graphql (~> 1.12)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- activemodel (6.0.2.2)
11
- activesupport (= 6.0.2.2)
12
- activerecord (6.0.2.2)
13
- activemodel (= 6.0.2.2)
14
- activesupport (= 6.0.2.2)
15
- activesupport (6.0.2.2)
10
+ activemodel (6.1.4.1)
11
+ activesupport (= 6.1.4.1)
12
+ activerecord (6.1.4.1)
13
+ activemodel (= 6.1.4.1)
14
+ activesupport (= 6.1.4.1)
15
+ activesupport (6.1.4.1)
16
16
  concurrent-ruby (~> 1.0, >= 1.0.2)
17
- i18n (>= 0.7, < 2)
18
- minitest (~> 5.1)
19
- tzinfo (~> 1.1)
20
- zeitwerk (~> 2.2)
21
- ast (2.4.0)
22
- coderay (1.1.2)
23
- concurrent-ruby (1.1.6)
24
- diff-lcs (1.3)
25
- graphql (1.10.5)
26
- i18n (1.8.2)
17
+ i18n (>= 1.6, < 2)
18
+ minitest (>= 5.1)
19
+ tzinfo (~> 2.0)
20
+ zeitwerk (~> 2.3)
21
+ ast (2.4.2)
22
+ coderay (1.1.3)
23
+ concurrent-ruby (1.1.9)
24
+ diff-lcs (1.4.4)
25
+ graphql (1.12.19)
26
+ i18n (1.8.11)
27
27
  concurrent-ruby (~> 1.0)
28
- jaro_winkler (1.5.4)
29
- kaminari-activerecord (1.2.0)
28
+ kaminari-activerecord (1.2.1)
30
29
  activerecord
31
- kaminari-core (= 1.2.0)
32
- kaminari-core (1.2.0)
30
+ kaminari-core (= 1.2.1)
31
+ kaminari-core (1.2.1)
33
32
  method_source (1.0.0)
34
- minitest (5.14.0)
35
- parallel (1.19.1)
36
- parser (2.7.0.5)
37
- ast (~> 2.4.0)
38
- pry (0.13.0)
33
+ minitest (5.14.4)
34
+ parallel (1.21.0)
35
+ parser (3.0.2.0)
36
+ ast (~> 2.4.1)
37
+ pry (0.14.1)
39
38
  coderay (~> 1.1)
40
39
  method_source (~> 1.0)
41
40
  rainbow (3.0.0)
42
- rake (13.0.1)
43
- rexml (3.2.4)
44
- rspec (3.9.0)
45
- rspec-core (~> 3.9.0)
46
- rspec-expectations (~> 3.9.0)
47
- rspec-mocks (~> 3.9.0)
48
- rspec-core (3.9.1)
49
- rspec-support (~> 3.9.1)
50
- rspec-expectations (3.9.1)
41
+ rake (13.0.6)
42
+ regexp_parser (2.1.1)
43
+ rexml (3.2.5)
44
+ rspec (3.10.0)
45
+ rspec-core (~> 3.10.0)
46
+ rspec-expectations (~> 3.10.0)
47
+ rspec-mocks (~> 3.10.0)
48
+ rspec-core (3.10.1)
49
+ rspec-support (~> 3.10.0)
50
+ rspec-expectations (3.10.1)
51
51
  diff-lcs (>= 1.2.0, < 2.0)
52
- rspec-support (~> 3.9.0)
53
- rspec-mocks (3.9.1)
52
+ rspec-support (~> 3.10.0)
53
+ rspec-mocks (3.10.2)
54
54
  diff-lcs (>= 1.2.0, < 2.0)
55
- rspec-support (~> 3.9.0)
56
- rspec-support (3.9.2)
57
- rubocop (0.81.0)
58
- jaro_winkler (~> 1.5.1)
55
+ rspec-support (~> 3.10.0)
56
+ rspec-support (3.10.3)
57
+ rubocop (1.23.0)
59
58
  parallel (~> 1.10)
60
- parser (>= 2.7.0.1)
59
+ parser (>= 3.0.0.0)
61
60
  rainbow (>= 2.2.2, < 4.0)
61
+ regexp_parser (>= 1.8, < 3.0)
62
62
  rexml
63
+ rubocop-ast (>= 1.12.0, < 2.0)
63
64
  ruby-progressbar (~> 1.7)
64
- unicode-display_width (>= 1.4.0, < 2.0)
65
- rubocop-performance (1.5.2)
66
- rubocop (>= 0.71.0)
67
- rubocop-rspec (1.38.1)
68
- rubocop (>= 0.68.1)
69
- ruby-progressbar (1.10.1)
70
- thread_safe (0.3.6)
71
- tzinfo (1.2.7)
72
- thread_safe (~> 0.1)
73
- unicode-display_width (1.7.0)
74
- zeitwerk (2.3.0)
65
+ unicode-display_width (>= 1.4.0, < 3.0)
66
+ rubocop-ast (1.13.0)
67
+ parser (>= 3.0.1.1)
68
+ rubocop-rake (0.6.0)
69
+ rubocop (~> 1.0)
70
+ rubocop-rspec (2.6.0)
71
+ rubocop (~> 1.19)
72
+ ruby-progressbar (1.11.0)
73
+ tzinfo (2.0.4)
74
+ concurrent-ruby (~> 1.0)
75
+ unicode-display_width (2.1.0)
76
+ zeitwerk (2.5.1)
75
77
 
76
78
  PLATFORMS
77
- ruby
79
+ aarch64-linux-musl
80
+ x86_64-darwin-18
81
+ x86_64-darwin-19
82
+ x86_64-darwin-20
83
+ x86_64-linux
78
84
 
79
85
  DEPENDENCIES
80
86
  graphql-pagination!
@@ -84,8 +90,8 @@ DEPENDENCIES
84
90
  rake
85
91
  rspec
86
92
  rubocop
87
- rubocop-performance
93
+ rubocop-rake
88
94
  rubocop-rspec
89
95
 
90
96
  BUNDLED WITH
91
- 2.1.4
97
+ 2.2.29
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  [![Gem Version](https://badge.fury.io/rb/graphql-pagination.svg)](https://rubygems.org/gems/graphql-pagination)
2
- [![Build Status](https://travis-ci.org/RenoFi/graphql-pagination.svg?branch=master)](https://travis-ci.org/RenoFi/graphql-pagination)
2
+ [![Build Status](https://github.com/RenoFi/graphql-pagination/actions/workflows/ci.yml/badge.svg)](https://github.com/RenoFi/graphql-pagination/actions/workflows/ci.yml?query=branch%3Amain)
3
3
 
4
4
  # graphql-pagination
5
5
 
@@ -22,7 +22,7 @@ Add `graphql-pagination` to your Gemfile, you can use `kaminari-activerecord` or
22
22
  argument :limit, Integer, required: false
23
23
  end
24
24
 
25
- def fruit(page: nil, limit: nil)
25
+ def fruits(page: nil, limit: nil)
26
26
  ::Fruit.page(page).per(limit)
27
27
  end
28
28
  ```
data/Rakefile CHANGED
@@ -5,4 +5,5 @@ require 'rubocop/rake_task'
5
5
  RSpec::Core::RakeTask.new(:spec)
6
6
  RuboCop::RakeTask.new
7
7
 
8
- task default: %i[rubocop spec]
8
+ task ci: %i[spec rubocop]
9
+ task default: %i[spec rubocop:auto_correct]
@@ -15,6 +15,7 @@ Gem::Specification.new do |spec|
15
15
 
16
16
  spec.metadata['homepage_uri'] = 'https://github.com/RenoFi/graphql-pagination'
17
17
  spec.metadata['source_code_uri'] = 'https://github.com/RenoFi/graphql-pagination'
18
+ spec.metadata['rubygems_mfa_required'] = 'true'
18
19
 
19
20
  spec.files = Dir.chdir(__dir__) do
20
21
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(bin/|spec/|\.rub)}) }
@@ -23,9 +24,9 @@ Gem::Specification.new do |spec|
23
24
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
24
25
  spec.require_paths = ['lib']
25
26
 
26
- spec.required_ruby_version = '>= 2.6'
27
+ spec.required_ruby_version = '>= 2.7'
27
28
 
28
- spec.add_dependency 'graphql', '~> 1.9'
29
+ spec.add_dependency 'graphql', '~> 1.12'
29
30
 
30
31
  spec.add_development_dependency 'kaminari-activerecord'
31
32
  spec.add_development_dependency 'kaminari-core'
@@ -33,6 +34,6 @@ Gem::Specification.new do |spec|
33
34
  spec.add_development_dependency 'rake'
34
35
  spec.add_development_dependency 'rspec'
35
36
  spec.add_development_dependency 'rubocop'
36
- spec.add_development_dependency 'rubocop-performance'
37
+ spec.add_development_dependency 'rubocop-rake'
37
38
  spec.add_development_dependency 'rubocop-rspec'
38
39
  end
@@ -1,7 +1,8 @@
1
1
  module GraphqlPagination
2
2
  module CollectionType
3
3
  def collection_type(metadata_type: GraphqlPagination::CollectionMetadataType)
4
- @collection_type ||= begin
4
+ @collection_types ||= {}
5
+ @collection_types[metadata_type] ||= begin
5
6
  type_name = "#{graphql_name}Collection"
6
7
  source_type = self
7
8
 
@@ -1,3 +1,3 @@
1
1
  module GraphqlPagination
2
- VERSION = '1.1.1'.freeze
2
+ VERSION = '1.2.1'.freeze
3
3
  end
@@ -5,7 +5,6 @@ require 'graphql/schema/object'
5
5
  module GraphqlPagination
6
6
  end
7
7
 
8
- require 'graphql_pagination/version'
9
8
  require 'graphql_pagination/collection_type'
10
9
  require 'graphql_pagination/collection_metadata_type'
11
10
 
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphql-pagination
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Krzysztof Knapik
8
8
  - RenoFi Engineering Team
9
- autorequire:
9
+ autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2020-04-03 00:00:00.000000000 Z
12
+ date: 2021-11-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: graphql
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: '1.9'
20
+ version: '1.12'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - "~>"
26
26
  - !ruby/object:Gem::Version
27
- version: '1.9'
27
+ version: '1.12'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: kaminari-activerecord
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -110,7 +110,7 @@ dependencies:
110
110
  - !ruby/object:Gem::Version
111
111
  version: '0'
112
112
  - !ruby/object:Gem::Dependency
113
- name: rubocop-performance
113
+ name: rubocop-rake
114
114
  requirement: !ruby/object:Gem::Requirement
115
115
  requirements:
116
116
  - - ">="
@@ -146,10 +146,17 @@ executables: []
146
146
  extensions: []
147
147
  extra_rdoc_files: []
148
148
  files:
149
+ - ".bundler-version"
149
150
  - ".dependabot/config.yml"
151
+ - ".github/ISSUE_TEMPLATE/bug_report.md"
152
+ - ".github/ISSUE_TEMPLATE/config.yml"
153
+ - ".github/ISSUE_TEMPLATE/story.md"
154
+ - ".github/PULL_REQUEST_TEMPLATE.md"
155
+ - ".github/workflows/auto-approve.yml"
156
+ - ".github/workflows/auto-merge.yml"
157
+ - ".github/workflows/ci.yml"
150
158
  - ".gitignore"
151
159
  - ".rspec"
152
- - ".travis.yml"
153
160
  - Gemfile
154
161
  - Gemfile.lock
155
162
  - LICENSE
@@ -167,7 +174,8 @@ licenses:
167
174
  metadata:
168
175
  homepage_uri: https://github.com/RenoFi/graphql-pagination
169
176
  source_code_uri: https://github.com/RenoFi/graphql-pagination
170
- post_install_message:
177
+ rubygems_mfa_required: 'true'
178
+ post_install_message:
171
179
  rdoc_options: []
172
180
  require_paths:
173
181
  - lib
@@ -175,15 +183,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
175
183
  requirements:
176
184
  - - ">="
177
185
  - !ruby/object:Gem::Version
178
- version: '2.6'
186
+ version: '2.7'
179
187
  required_rubygems_version: !ruby/object:Gem::Requirement
180
188
  requirements:
181
189
  - - ">="
182
190
  - !ruby/object:Gem::Version
183
191
  version: '0'
184
192
  requirements: []
185
- rubygems_version: 3.1.2
186
- signing_key:
193
+ rubygems_version: 3.2.23
194
+ signing_key:
187
195
  specification_version: 4
188
196
  summary: Page-based kaminari pagination for graphql.
189
197
  test_files: []
data/.travis.yml DELETED
@@ -1,11 +0,0 @@
1
- ---
2
- sudo: false
3
- language: ruby
4
- cache: bundler
5
- rvm:
6
- - 2.6
7
- - 2.7
8
- before_install: gem install bundler
9
- script:
10
- - bundle exec rake spec
11
- - bundle exec rake rubocop