graphql-pagination 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 759b7deb680989e10d889fd2c2322e9cee30a625f1ba78e8763e6a6b0fdd6580
4
- data.tar.gz: f93129e2a0fece0deb2b8198f93e5a2dba32bab1d0393bc9a44366b617252b17
3
+ metadata.gz: 2ea955b90a7643f1fbbe2ec88c466e1417b7f9f9d0aecae8c86e3072ea787b26
4
+ data.tar.gz: 005f943ce8ca3788992052752f1a5e616f0a502640054e46d6f051347048b6c1
5
5
  SHA512:
6
- metadata.gz: 382a11132e260880f4fca1c0b4ec6e6a32ce513d4edc28aa417429a04c000a9a7e8c21bc6d45dcc7916483db195d50c50aadc6f5d1afefad5b15f4d3a109670d
7
- data.tar.gz: 13dfe242a70379402e7b118c73b910c61a280ae87712a50079d49cce993d0a0e1b86488280cf99c2a38d6c2f38a2fe3e9628c5f83a74bc9ab98348e2e7c2c589
6
+ metadata.gz: 6aaa55de384cc91b9e31069e5c3bc2e9970081ba6c04fd95df5dad2ebe391a72d7f050bbb518ebab3b9525a2260eeb931805759d73bb1c705e7c4e6a1043c74f
7
+ data.tar.gz: 5904d27c1e2c34aec87cecee6770c0187508f25851e8f0f4e2c1ad87c22593427d54d9a76bd5c425a1f088d8430ec332ad630a6724b6b17e9c02070b3e62cbec
@@ -0,0 +1,18 @@
1
+ version: 1
2
+
3
+ update_configs:
4
+ - package_manager: "ruby:bundler"
5
+ directory: "/"
6
+ update_schedule: "monthly"
7
+ commit_message:
8
+ prefix: "[dependabot]"
9
+ allowed_updates:
10
+ - match:
11
+ update_type: "all"
12
+ automerged_updates:
13
+ - match:
14
+ dependency_type: "development"
15
+ update_type: "all"
16
+ - match:
17
+ dependency_type: "production"
18
+ update_type: "all"
data/.travis.yml CHANGED
@@ -3,9 +3,8 @@ sudo: false
3
3
  language: ruby
4
4
  cache: bundler
5
5
  rvm:
6
- - 2.5.7
7
- - 2.6.5
8
- before_install: gem install bundler -v 2.1.1
6
+ - 2.6
7
+ before_install: gem install bundler
9
8
  script:
10
- - bundle exec rspec
11
- - bundle exec rubocop
9
+ - bundle exec rake spec
10
+ - bundle exec rake rubocop
data/Gemfile.lock CHANGED
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- graphql-pagination (1.0.0)
5
- graphql (~> 1.9.4)
4
+ graphql-pagination (1.1.0)
5
+ graphql (~> 1.9)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
@@ -20,53 +20,57 @@ GEM
20
20
  zeitwerk (~> 2.2)
21
21
  ast (2.4.0)
22
22
  coderay (1.1.2)
23
- concurrent-ruby (1.1.5)
23
+ concurrent-ruby (1.1.6)
24
24
  diff-lcs (1.3)
25
- graphql (1.9.17)
26
- i18n (1.7.0)
25
+ graphql (1.10.3)
26
+ i18n (1.8.2)
27
27
  concurrent-ruby (~> 1.0)
28
28
  jaro_winkler (1.5.4)
29
- kaminari-activerecord (1.1.1)
29
+ kaminari-activerecord (1.2.0)
30
30
  activerecord
31
- kaminari-core (= 1.1.1)
32
- kaminari-core (1.1.1)
31
+ kaminari-core (= 1.2.0)
32
+ kaminari-core (1.2.0)
33
33
  method_source (0.9.2)
34
- minitest (5.13.0)
34
+ minitest (5.14.0)
35
35
  parallel (1.19.1)
36
- parser (2.6.5.0)
36
+ parser (2.7.0.3)
37
37
  ast (~> 2.4.0)
38
38
  pry (0.12.2)
39
39
  coderay (~> 1.1.0)
40
40
  method_source (~> 0.9.0)
41
41
  rainbow (3.0.0)
42
42
  rake (13.0.1)
43
+ rexml (3.2.4)
43
44
  rspec (3.9.0)
44
45
  rspec-core (~> 3.9.0)
45
46
  rspec-expectations (~> 3.9.0)
46
47
  rspec-mocks (~> 3.9.0)
47
- rspec-core (3.9.0)
48
- rspec-support (~> 3.9.0)
48
+ rspec-core (3.9.1)
49
+ rspec-support (~> 3.9.1)
49
50
  rspec-expectations (3.9.0)
50
51
  diff-lcs (>= 1.2.0, < 2.0)
51
52
  rspec-support (~> 3.9.0)
52
- rspec-mocks (3.9.0)
53
+ rspec-mocks (3.9.1)
53
54
  diff-lcs (>= 1.2.0, < 2.0)
54
55
  rspec-support (~> 3.9.0)
55
- rspec-support (3.9.0)
56
- rubocop (0.78.0)
56
+ rspec-support (3.9.2)
57
+ rubocop (0.80.0)
57
58
  jaro_winkler (~> 1.5.1)
58
59
  parallel (~> 1.10)
59
- parser (>= 2.6)
60
+ parser (>= 2.7.0.1)
60
61
  rainbow (>= 2.2.2, < 4.0)
62
+ rexml
61
63
  ruby-progressbar (~> 1.7)
62
64
  unicode-display_width (>= 1.4.0, < 1.7)
63
- rubocop-performance (1.5.1)
65
+ rubocop-performance (1.5.2)
64
66
  rubocop (>= 0.71.0)
67
+ rubocop-rspec (1.38.1)
68
+ rubocop (>= 0.68.1)
65
69
  ruby-progressbar (1.10.1)
66
70
  thread_safe (0.3.6)
67
- tzinfo (1.2.5)
71
+ tzinfo (1.2.6)
68
72
  thread_safe (~> 0.1)
69
- unicode-display_width (1.6.0)
73
+ unicode-display_width (1.6.1)
70
74
  zeitwerk (2.2.2)
71
75
 
72
76
  PLATFORMS
@@ -81,6 +85,7 @@ DEPENDENCIES
81
85
  rspec
82
86
  rubocop
83
87
  rubocop-performance
88
+ rubocop-rspec
84
89
 
85
90
  BUNDLED WITH
86
91
  2.0.2
@@ -3,15 +3,15 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
  require 'graphql_pagination/version'
4
4
 
5
5
  Gem::Specification.new do |spec|
6
- spec.name = 'graphql-pagination'
6
+ spec.name = 'graphql-pagination'
7
7
  spec.version = GraphqlPagination::VERSION
8
8
  spec.authors = ['Krzysztof Knapik', 'RenoFi Engineering Team']
9
- spec.email = ['knapo@knapo.net', 'engineering@renofi.com']
9
+ spec.email = ['knapo@knapo.net', 'engineering@renofi.com']
10
10
 
11
- spec.summary = 'Page-based kaminari pagination for graphql.'
11
+ spec.summary = 'Page-based kaminari pagination for graphql.'
12
12
  spec.description = 'Page-based kaminari pagination for graphql returning collection and pagination metadata.'
13
- spec.homepage = 'https://github.com/RenoFi/graphql-pagination'
14
- spec.license = 'MIT'
13
+ spec.homepage = 'https://github.com/RenoFi/graphql-pagination'
14
+ spec.license = 'MIT'
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'
@@ -19,13 +19,13 @@ Gem::Specification.new do |spec|
19
19
  spec.files = Dir.chdir(__dir__) do
20
20
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(bin/|spec/|\.rub)}) }
21
21
  end
22
- spec.bindir = 'exe'
23
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
+ spec.bindir = 'exe'
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 = '>= 2.5'
26
+ spec.required_ruby_version = '>= 2.6'
27
27
 
28
- spec.add_dependency 'graphql', '~> 1.9.4'
28
+ spec.add_dependency 'graphql', '~> 1.9'
29
29
 
30
30
  spec.add_development_dependency 'kaminari-activerecord'
31
31
  spec.add_development_dependency 'kaminari-core'
@@ -34,4 +34,5 @@ Gem::Specification.new do |spec|
34
34
  spec.add_development_dependency 'rspec'
35
35
  spec.add_development_dependency 'rubocop'
36
36
  spec.add_development_dependency 'rubocop-performance'
37
+ spec.add_development_dependency 'rubocop-rspec'
37
38
  end
@@ -1,8 +1,8 @@
1
1
  module GraphqlPagination
2
2
  class CollectionMetadataType < GraphQL::Schema::Object
3
3
  field :current_page, Integer, null: false
4
- field :limit_value, Integer, null: false
5
- field :total_count, Integer, null: false
6
- field :total_pages, Integer, null: false
4
+ field :limit_value, Integer, null: false
5
+ field :total_count, Integer, null: false
6
+ field :total_pages, Integer, null: false
7
7
  end
8
8
  end
@@ -1,6 +1,6 @@
1
1
  module GraphqlPagination
2
2
  module CollectionType
3
- def collection_type
3
+ def collection_type(metadata_type: GraphqlPagination::CollectionMetadataType)
4
4
  @collection_type ||= begin
5
5
  type_name = "#{graphql_name}Collection"
6
6
  source_type = self
@@ -8,7 +8,7 @@ module GraphqlPagination
8
8
  Class.new(GraphQL::Schema::Object) do
9
9
  graphql_name type_name
10
10
  field :collection, [source_type], null: false
11
- field :metadata, GraphqlPagination::CollectionMetadataType, null: false
11
+ field :metadata, metadata_type, null: false
12
12
 
13
13
  def collection
14
14
  object
@@ -1,3 +1,3 @@
1
1
  module GraphqlPagination
2
- VERSION = '1.0.0'.freeze
2
+ VERSION = '1.1.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphql-pagination
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Krzysztof Knapik
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2019-12-20 00:00:00.000000000 Z
12
+ date: 2020-02-28 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.4
20
+ version: '1.9'
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.4
27
+ version: '1.9'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: kaminari-activerecord
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -123,6 +123,20 @@ dependencies:
123
123
  - - ">="
124
124
  - !ruby/object:Gem::Version
125
125
  version: '0'
126
+ - !ruby/object:Gem::Dependency
127
+ name: rubocop-rspec
128
+ requirement: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - ">="
131
+ - !ruby/object:Gem::Version
132
+ version: '0'
133
+ type: :development
134
+ prerelease: false
135
+ version_requirements: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - ">="
138
+ - !ruby/object:Gem::Version
139
+ version: '0'
126
140
  description: Page-based kaminari pagination for graphql returning collection and pagination
127
141
  metadata.
128
142
  email:
@@ -132,6 +146,7 @@ executables: []
132
146
  extensions: []
133
147
  extra_rdoc_files: []
134
148
  files:
149
+ - ".dependabot/config.yml"
135
150
  - ".gitignore"
136
151
  - ".rspec"
137
152
  - ".travis.yml"
@@ -160,7 +175,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
160
175
  requirements:
161
176
  - - ">="
162
177
  - !ruby/object:Gem::Version
163
- version: '2.5'
178
+ version: '2.6'
164
179
  required_rubygems_version: !ruby/object:Gem::Requirement
165
180
  requirements:
166
181
  - - ">="