graphql-pagination 0.2.1 → 0.2.2

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: 92f11de4543bf2fd6cc1230f900b118f46599eb1ebe31350012fbf157c005e52
4
- data.tar.gz: 062a8e0ca515b88ac2051774da11d9cc10de0441b8277f147536f21d21925d8f
3
+ metadata.gz: 5126cd4efa227e900819533d8174c3f5f79796155c89400aefd6fa4a62b097bf
4
+ data.tar.gz: a9161702e52430cc5486245c647dfe82c4c741372557e5709d06a93783f7e2ce
5
5
  SHA512:
6
- metadata.gz: a29bab8540afd11ad507f32a4567563220e977ae89d0abc720df1149b1c717bde6447d5c4deca221492b87e26e0fd3bf3a93c2dcf46a798b3cc185e727d1f5a4
7
- data.tar.gz: 507b23b971b9129e7da6b208f938fc0040c0d25336a92932de2ada3bb32fa15ef7fd30dc66642eeb7c26c7d3b8419f7281f771b50c744baabf59e62d3691dbf3
6
+ metadata.gz: 76d3e6b848b1ce9a3072812c692b6e9c395c0b80c0c6d60a853c4721f976a07b83f9d9b0204de9056926b13e8b114b8164a869d9555636b61d971f5f9f1d9403
7
+ data.tar.gz: 5b789bad2cea40103da4fe25a9cd7ab24caf6d73e3ebd6167e52aba5f78c9f725fa067b2fea089ff0e02084cc01af1d2b20bbb87ce22438e121ee62998e10d73
data/.gitignore CHANGED
@@ -1,50 +1,11 @@
1
- *.gem
2
- *.rbc
3
- /.config
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
4
  /coverage/
5
- /InstalledFiles
5
+ /doc/
6
6
  /pkg/
7
7
  /spec/reports/
8
- /spec/examples.txt
9
- /test/tmp/
10
- /test/version_tmp/
11
8
  /tmp/
12
9
 
13
- # Used by dotenv library to load environment variables.
14
- # .env
15
-
16
- ## Specific to RubyMotion:
17
- .dat*
18
- .repl_history
19
- build/
20
- *.bridgesupport
21
- build-iPhoneOS/
22
- build-iPhoneSimulator/
23
-
24
- ## Specific to RubyMotion (use of CocoaPods):
25
- #
26
- # We recommend against adding the Pods directory to your .gitignore. However
27
- # you should judge for yourself, the pros and cons are mentioned at:
28
- # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
29
- #
30
- # vendor/Pods/
31
-
32
- ## Documentation cache and generated files:
33
- /.yardoc/
34
- /_yardoc/
35
- /doc/
36
- /rdoc/
37
-
38
- ## Environment normalization:
39
- /.bundle/
40
- /vendor/bundle
41
- /lib/bundler/man/
42
-
43
- # for a library or gem, you might want to ignore these files since the code is
44
- # intended to run in multiple environments; otherwise, check them in:
45
- # Gemfile.lock
46
- # .ruby-version
47
- # .ruby-gemset
48
-
49
- # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
50
- .rvmrc
10
+ # rspec failure tracking
11
+ .rspec_status
@@ -0,0 +1,4 @@
1
+ fail_on_violations: true
2
+
3
+ rubocop:
4
+ config_file: .rubocop.yml
@@ -0,0 +1,62 @@
1
+ Gemspec/RequiredRubyVersion:
2
+ Include:
3
+ - 2.4
4
+ - 2.5
5
+ - 2.6
6
+
7
+ Lint/UnusedBlockArgument:
8
+ Enabled: false
9
+
10
+ Layout/AlignHash:
11
+ Enabled: false
12
+
13
+ Naming/FileName:
14
+ Enabled: false
15
+
16
+ Metrics/BlockLength:
17
+ Max: 30
18
+ Exclude:
19
+ - '**/*_spec.rb'
20
+
21
+ Metrics/LineLength:
22
+ Max: 140
23
+
24
+ Metrics/MethodLength:
25
+ Max: 20
26
+
27
+ Security/YAMLLoad:
28
+ Enabled: false
29
+
30
+ Style/BlockDelimiters:
31
+ EnforcedStyle: braces_for_chaining
32
+
33
+ Style/Documentation:
34
+ Enabled: false
35
+
36
+ Style/GuardClause:
37
+ Enabled: false
38
+
39
+ Style/EachWithObject:
40
+ Enabled: false
41
+
42
+ Style/MethodMissingSuper:
43
+ Enabled: false
44
+
45
+ Style/MissingRespondToMissing:
46
+ Enabled: false
47
+
48
+ Style/FrozenStringLiteralComment:
49
+ Enabled: false
50
+
51
+ Style/PercentLiteralDelimiters:
52
+ Enabled: false
53
+
54
+ Style/RescueStandardError:
55
+ Exclude:
56
+ - 'spec/*.rb'
57
+
58
+ Style/SymbolArray:
59
+ EnforcedStyle: brackets
60
+
61
+ Style/TrivialAccessors:
62
+ Enabled: false
@@ -3,5 +3,7 @@ sudo: false
3
3
  language: ruby
4
4
  cache: bundler
5
5
  rvm:
6
+ - 2.4.6
7
+ - 2.5.5
6
8
  - 2.6.3
7
9
  before_install: gem install bundler -v 2.0.1
data/Gemfile CHANGED
@@ -1,3 +1,3 @@
1
- source "https://rubygems.org"
1
+ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- graphql-pagination (0.2.1)
4
+ graphql-pagination (0.2.2)
5
5
  graphql (~> 1.9.4)
6
6
 
7
7
  GEM
@@ -19,21 +19,27 @@ GEM
19
19
  minitest (~> 5.1)
20
20
  tzinfo (~> 1.1)
21
21
  arel (9.0.0)
22
+ ast (2.4.0)
22
23
  coderay (1.1.2)
23
24
  concurrent-ruby (1.1.5)
24
25
  diff-lcs (1.3)
25
- graphql (1.9.4)
26
+ graphql (1.9.6)
26
27
  i18n (1.6.0)
27
28
  concurrent-ruby (~> 1.0)
29
+ jaro_winkler (1.5.2)
28
30
  kaminari-activerecord (1.1.1)
29
31
  activerecord
30
32
  kaminari-core (= 1.1.1)
31
33
  kaminari-core (1.1.1)
32
34
  method_source (0.9.2)
33
35
  minitest (5.11.3)
36
+ parallel (1.17.0)
37
+ parser (2.6.3.0)
38
+ ast (~> 2.4.0)
34
39
  pry (0.12.2)
35
40
  coderay (~> 1.1.0)
36
41
  method_source (~> 0.9.0)
42
+ rainbow (3.0.0)
37
43
  rake (12.3.2)
38
44
  rspec (3.8.0)
39
45
  rspec-core (~> 3.8.0)
@@ -41,28 +47,37 @@ GEM
41
47
  rspec-mocks (~> 3.8.0)
42
48
  rspec-core (3.8.0)
43
49
  rspec-support (~> 3.8.0)
44
- rspec-expectations (3.8.3)
50
+ rspec-expectations (3.8.4)
45
51
  diff-lcs (>= 1.2.0, < 2.0)
46
52
  rspec-support (~> 3.8.0)
47
- rspec-mocks (3.8.0)
53
+ rspec-mocks (3.8.1)
48
54
  diff-lcs (>= 1.2.0, < 2.0)
49
55
  rspec-support (~> 3.8.0)
50
- rspec-support (3.8.0)
56
+ rspec-support (3.8.2)
57
+ rubocop (0.71.0)
58
+ jaro_winkler (~> 1.5.1)
59
+ parallel (~> 1.10)
60
+ parser (>= 2.6)
61
+ rainbow (>= 2.2.2, < 4.0)
62
+ ruby-progressbar (~> 1.7)
63
+ unicode-display_width (>= 1.4.0, < 1.7)
64
+ ruby-progressbar (1.10.1)
51
65
  thread_safe (0.3.6)
52
66
  tzinfo (1.2.5)
53
67
  thread_safe (~> 0.1)
68
+ unicode-display_width (1.6.0)
54
69
 
55
70
  PLATFORMS
56
71
  ruby
57
72
 
58
73
  DEPENDENCIES
59
- bundler
60
74
  graphql-pagination!
61
75
  kaminari-activerecord
62
76
  kaminari-core
63
77
  pry
64
78
  rake
65
79
  rspec
80
+ rubocop
66
81
 
67
82
  BUNDLED WITH
68
83
  2.0.1
data/LICENSE CHANGED
@@ -3,7 +3,7 @@ MIT License
3
3
  Copyright (c) 2019 RenoFi
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
6
+ of this software and associated documentation files (the 'Software'), to deal
7
7
  in the Software without restriction, including without limitation the rights
8
8
  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
9
  copies of the Software, and to permit persons to whom the Software is
@@ -12,7 +12,7 @@ furnished to do so, subject to the following conditions:
12
12
  The above copyright notice and this permission notice shall be included in all
13
13
  copies or substantial portions of the Software.
14
14
 
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
16
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
17
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
18
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
data/README.md CHANGED
@@ -1,7 +1,5 @@
1
-
2
- [![Gem Version](https://badge.fury.io/rb/graphql-pagination.png)][gem_version]
3
-
4
- [gem_version]: https://rubygems.org/gems/a9n
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)
5
3
 
6
4
  # graphql-pagination
7
5
 
@@ -53,23 +51,23 @@ Value returned by query resolver must be a kaminari object or implements its pag
53
51
 
54
52
  ```json
55
53
  {
56
- "data": {
57
- "checklists": {
58
- "collection": [
54
+ 'data': {
55
+ 'checklists': {
56
+ 'collection': [
59
57
  {
60
- "id": "93938bb3-7a6c-4d35-9961-cbb2d4c9e9ac",
61
- "name": "Apple"
58
+ 'id': '93938bb3-7a6c-4d35-9961-cbb2d4c9e9ac',
59
+ 'name': 'Apple'
62
60
  },
63
61
  {
64
- "id": "b1ee93b2-579a-4107-8454-119bba5afb63",
65
- "name": "Mango"
62
+ 'id': 'b1ee93b2-579a-4107-8454-119bba5afb63',
63
+ 'name': 'Mango'
66
64
  }
67
65
  ],
68
- "metadata": {
69
- "totalPages": 25,
70
- "totalCount": 50,
71
- "currentPage": 2,
72
- "limitValue": 2
66
+ 'metadata': {
67
+ 'totalPages': 25,
68
+ 'totalCount': 50,
69
+ 'currentPage': 2,
70
+ 'limitValue': 2
73
71
  }
74
72
  }
75
73
  }
data/Rakefile CHANGED
@@ -1,5 +1,5 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
1
+ require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
3
3
 
4
4
  RSpec::Core::RakeTask.new(:spec)
5
5
 
@@ -1,7 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require "bundler/setup"
4
- require "graphql-pagination"
3
+ require 'bundler/setup'
4
+ require 'rack_graphql'
5
+ require 'pry'
6
+ require 'irb'
5
7
 
6
- require "irb"
7
8
  IRB.start(__FILE__)
@@ -1,34 +1,34 @@
1
- lib = File.expand_path("../lib", __FILE__)
1
+ lib = File.expand_path('lib', __dir__)
2
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
- require "graphql_pagination/version"
3
+ require 'graphql_pagination/version'
4
4
 
5
5
  Gem::Specification.new do |spec|
6
- spec.name = "graphql-pagination"
7
- spec.version = GraphqlPagination::VERSION
8
- spec.authors = ["Krzysztof Knapik", "RenoFi Engineering Team"]
9
- spec.email = ["knapo@knapo.net", "engineering@renofi.com"]
6
+ spec.name = 'graphql-pagination'
7
+ spec.version = GraphqlPagination::VERSION
8
+ spec.authors = ['Krzysztof Knapik', 'RenoFi Engineering Team']
9
+ spec.email = ['knapo@knapo.net', 'engineering@renofi.com']
10
10
 
11
- spec.summary = %q{Page-based kaminari pagination for graphql.}
12
- spec.description = %q{Page-based kaminari pagination for graphql returning collection and pagination metadata.}
13
- spec.homepage = "https://github.com/RenoFi/graphql-pagination"
14
- spec.license = "MIT"
11
+ spec.summary = 'Page-based kaminari pagination for graphql.'
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'
15
15
 
16
- spec.metadata["homepage_uri"] = "https://github.com/RenoFi/graphql-pagination"
17
- spec.metadata["source_code_uri"] = "https://github.com/RenoFi/graphql-pagination"
16
+ spec.metadata['homepage_uri'] = 'https://github.com/RenoFi/graphql-pagination'
17
+ spec.metadata['source_code_uri'] = 'https://github.com/RenoFi/graphql-pagination'
18
18
 
19
- spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
19
+ spec.files = Dir.chdir(__dir__) do
20
20
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
21
21
  end
22
- spec.bindir = "exe"
22
+ spec.bindir = 'exe'
23
23
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
24
- spec.require_paths = ["lib"]
24
+ spec.require_paths = ['lib']
25
25
 
26
- spec.add_dependency "graphql", "~> 1.9.4"
26
+ spec.add_dependency 'graphql', '~> 1.9.4'
27
27
 
28
- spec.add_development_dependency "kaminari-core"
29
- spec.add_development_dependency "kaminari-activerecord"
30
- spec.add_development_dependency "bundler"
31
- spec.add_development_dependency "rake"
32
- spec.add_development_dependency "rspec"
33
- spec.add_development_dependency "pry"
28
+ spec.add_development_dependency 'kaminari-activerecord'
29
+ spec.add_development_dependency 'kaminari-core'
30
+ spec.add_development_dependency 'pry'
31
+ spec.add_development_dependency 'rake'
32
+ spec.add_development_dependency 'rspec'
33
+ spec.add_development_dependency 'rubocop'
34
34
  end
@@ -1 +1 @@
1
- require_relative 'graphql_pagination'
1
+ require 'graphql_pagination'
@@ -1,12 +1,12 @@
1
- require "graphql_pagination/version"
2
- require "graphql"
3
- require "graphql/schema/object"
1
+ require 'graphql_pagination/version'
2
+ require 'graphql'
3
+ require 'graphql/schema/object'
4
4
 
5
5
  module GraphqlPagination
6
6
  end
7
7
 
8
- require "graphql_pagination/version"
9
- require "graphql_pagination/collection_type"
10
- require "graphql_pagination/collection_metadata_type"
8
+ require 'graphql_pagination/version'
9
+ require 'graphql_pagination/collection_type'
10
+ require 'graphql_pagination/collection_metadata_type'
11
11
 
12
12
  GraphQL::Schema::Object.extend GraphqlPagination::CollectionType
@@ -1,3 +1,3 @@
1
1
  module GraphqlPagination
2
- VERSION = "0.2.1"
2
+ VERSION = '0.2.2'.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: 0.2.1
4
+ version: 0.2.2
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-05-08 00:00:00.000000000 Z
12
+ date: 2019-06-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: graphql
@@ -26,7 +26,7 @@ dependencies:
26
26
  - !ruby/object:Gem::Version
27
27
  version: 1.9.4
28
28
  - !ruby/object:Gem::Dependency
29
- name: kaminari-core
29
+ name: kaminari-activerecord
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
32
  - - ">="
@@ -40,7 +40,7 @@ dependencies:
40
40
  - !ruby/object:Gem::Version
41
41
  version: '0'
42
42
  - !ruby/object:Gem::Dependency
43
- name: kaminari-activerecord
43
+ name: kaminari-core
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
46
  - - ">="
@@ -54,7 +54,7 @@ dependencies:
54
54
  - !ruby/object:Gem::Version
55
55
  version: '0'
56
56
  - !ruby/object:Gem::Dependency
57
- name: bundler
57
+ name: pry
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
60
  - - ">="
@@ -96,7 +96,7 @@ dependencies:
96
96
  - !ruby/object:Gem::Version
97
97
  version: '0'
98
98
  - !ruby/object:Gem::Dependency
99
- name: pry
99
+ name: rubocop
100
100
  requirement: !ruby/object:Gem::Requirement
101
101
  requirements:
102
102
  - - ">="
@@ -119,7 +119,9 @@ extensions: []
119
119
  extra_rdoc_files: []
120
120
  files:
121
121
  - ".gitignore"
122
+ - ".hound.yml"
122
123
  - ".rspec"
124
+ - ".rubocop.yml"
123
125
  - ".ruby-gemset"
124
126
  - ".ruby-version"
125
127
  - ".travis.yml"