graphql_rails 1.2.4 → 1.2.6

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: 4fde3149c0119edc09198e27b61c428ed666ea2bb4582b428142db31a58749c4
4
- data.tar.gz: d9faa17f35d1ac01400b829983d6a2b16230c62971bb6ed0178b9a6bf4b1c0bd
3
+ metadata.gz: 4f7c503110a2423bb3e0b90154f9d0c4f6daeabc3315a1c49c1a832a29366ff2
4
+ data.tar.gz: bfc7779f2678094724d0d1c3368edaa792665493a32d5112c5864998879fe96c
5
5
  SHA512:
6
- metadata.gz: ee735c639cf392c7a4261db07791bb953942977fd4c001fcb101fd3e4a7009db58fb27520d0227e2b3254fdbc5d2dc52043d892597e99d4526ad18fc8919de30
7
- data.tar.gz: 80e3a427bb04a91332230460638d7f866afc843dbebfd9e9211454869154c32459e9c1d3c2dcaa97e06bd767792bc6ff742b871ded561094354bc4beab2517a1
6
+ metadata.gz: 740f486bb00615a7b83a78a8d5dc6d72d7d57dc0a42385178d1cc87875e264f0370f3131ca1e327f8d510f2126b7956915ead75374b06c81e99c96f98b6d57b9
7
+ data.tar.gz: df08d0a84e9f505d25922d460677ddf2d34e5333258d111e9ee95090747612ccbb789d4f44d88f9cb1779a2afd4bbe4765b1ecabb1e88e2d75b777a05f94f3a4
@@ -0,0 +1,18 @@
1
+ name: Ruby
2
+ on: [push, pull_request]
3
+ jobs:
4
+ specs:
5
+ strategy:
6
+ matrix:
7
+ ruby-version: ['2.6', '2.7', '3.0']
8
+
9
+ runs-on: ubuntu-latest
10
+ env:
11
+ CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
12
+ steps:
13
+ - uses: actions/checkout@v2
14
+ - uses: ruby/setup-ruby@v1
15
+ with:
16
+ ruby-version: ${{ matrix.ruby-version }}
17
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
18
+ - run: bundle exec rake
data/.hound.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  rubocop:
2
2
  config_file: .rubocop.yml
3
- version: 0.91.0
3
+ version: 1.5.2
4
4
  fail_on_violations: true
data/.rubocop.yml CHANGED
@@ -35,6 +35,7 @@ Style/ClassAndModuleChildren:
35
35
  - spec/**/*_spec.rb
36
36
 
37
37
  AllCops:
38
+ NewCops: disable # TODO: enable
38
39
  TargetRubyVersion: 2.7
39
40
  Exclude:
40
41
  - bin/*
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.7.1
1
+ 3.0.1
data/Gemfile CHANGED
@@ -5,9 +5,9 @@ source 'https://rubygems.org'
5
5
  git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
6
6
 
7
7
  group :development do
8
- gem 'rubocop', '0.91.0'
9
- gem 'rubocop-performance', '~> 1.8', '>= 1.8.1'
10
- gem 'rubocop-rspec', '~> 1.44', '>= 1.44.1'
8
+ gem 'rubocop', '1.5.2'
9
+ gem 'rubocop-performance'
10
+ gem 'rubocop-rspec'
11
11
  end
12
12
 
13
13
  group :test do
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- graphql_rails (1.2.3)
4
+ graphql_rails (1.2.6)
5
5
  activesupport (>= 4)
6
6
  graphql (~> 1.12, >= 1.12.4)
7
7
 
@@ -63,7 +63,7 @@ GEM
63
63
  minitest (~> 5.1)
64
64
  tzinfo (~> 1.1)
65
65
  zeitwerk (~> 2.2, >= 2.2.2)
66
- ast (2.4.1)
66
+ ast (2.4.2)
67
67
  bson (4.11.0)
68
68
  builder (3.2.4)
69
69
  byebug (11.1.3)
@@ -78,7 +78,7 @@ GEM
78
78
  erubi (1.9.0)
79
79
  globalid (0.4.2)
80
80
  activesupport (>= 4.2.0)
81
- graphql (1.12.4)
81
+ graphql (1.12.10)
82
82
  i18n (1.8.5)
83
83
  concurrent-ruby (~> 1.0)
84
84
  json (2.3.1)
@@ -94,7 +94,7 @@ GEM
94
94
  nokogiri (~> 1)
95
95
  rake
96
96
  mini_mime (1.0.2)
97
- mini_portile2 (2.5.0)
97
+ mini_portile2 (2.6.1)
98
98
  minitest (5.14.2)
99
99
  mongo (2.13.1)
100
100
  bson (>= 4.8.2, < 5.0.0)
@@ -102,11 +102,11 @@ GEM
102
102
  activemodel (>= 5.1, < 6.1)
103
103
  mongo (>= 2.7.0, < 3.0.0)
104
104
  nio4r (2.5.4)
105
- nokogiri (1.11.1)
106
- mini_portile2 (~> 2.5.0)
105
+ nokogiri (1.12.5)
106
+ mini_portile2 (~> 2.6.1)
107
107
  racc (~> 1.4)
108
- parallel (1.19.2)
109
- parser (2.7.2.0)
108
+ parallel (1.20.1)
109
+ parser (3.0.1.1)
110
110
  ast (~> 2.4.1)
111
111
  pry (0.13.1)
112
112
  coderay (~> 1.1)
@@ -146,7 +146,7 @@ GEM
146
146
  thor (>= 0.20.3, < 2.0)
147
147
  rainbow (3.0.0)
148
148
  rake (13.0.1)
149
- regexp_parser (1.8.2)
149
+ regexp_parser (2.1.1)
150
150
  rexml (3.2.5)
151
151
  rspec (3.10.0)
152
152
  rspec-core (~> 3.10.0)
@@ -161,24 +161,24 @@ GEM
161
161
  diff-lcs (>= 1.2.0, < 2.0)
162
162
  rspec-support (~> 3.10.0)
163
163
  rspec-support (3.10.0)
164
- rubocop (0.91.0)
164
+ rubocop (1.5.2)
165
165
  parallel (~> 1.10)
166
- parser (>= 2.7.1.1)
166
+ parser (>= 2.7.1.5)
167
167
  rainbow (>= 2.2.2, < 4.0)
168
- regexp_parser (>= 1.7)
168
+ regexp_parser (>= 1.8, < 3.0)
169
169
  rexml
170
- rubocop-ast (>= 0.4.0, < 1.0)
170
+ rubocop-ast (>= 1.2.0, < 2.0)
171
171
  ruby-progressbar (~> 1.7)
172
172
  unicode-display_width (>= 1.4.0, < 2.0)
173
- rubocop-ast (0.8.0)
174
- parser (>= 2.7.1.5)
173
+ rubocop-ast (1.5.0)
174
+ parser (>= 3.0.1.1)
175
175
  rubocop-performance (1.8.1)
176
176
  rubocop (>= 0.87.0)
177
177
  rubocop-ast (>= 0.4.0)
178
- rubocop-rspec (1.44.1)
179
- rubocop (~> 0.87)
180
- rubocop-ast (>= 0.7.1)
181
- ruby-progressbar (1.10.1)
178
+ rubocop-rspec (2.3.0)
179
+ rubocop (~> 1.0)
180
+ rubocop-ast (>= 1.1.0)
181
+ ruby-progressbar (1.11.0)
182
182
  simplecov (0.19.1)
183
183
  docile (~> 1.1)
184
184
  simplecov-html (~> 0.11)
@@ -213,9 +213,9 @@ DEPENDENCIES
213
213
  rails (~> 6)
214
214
  rake (~> 13.0)
215
215
  rspec (~> 3.0)
216
- rubocop (= 0.91.0)
217
- rubocop-performance (~> 1.8, >= 1.8.1)
218
- rubocop-rspec (~> 1.44, >= 1.44.1)
216
+ rubocop (= 1.5.2)
217
+ rubocop-performance
218
+ rubocop-rspec
219
219
  simplecov
220
220
 
221
221
  BUNDLED WITH
data/docs/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # GraphqlRails
2
2
 
3
- [![Build Status](https://travis-ci.org/samesystem/graphql_rails.svg?branch=master)](https://travis-ci.org/samesystem/graphql_rails)
3
+ ![Build Status](https://github.com/samesystem/graphql_rails/workflows/Ruby/badge.svg?branch=master)
4
4
  [![codecov](https://codecov.io/gh/samesystem/graphql_rails/branch/master/graph/badge.svg)](https://codecov.io/gh/samesystem/graphql_rails)
5
5
  [![Documentation](https://readthedocs.org/projects/ansicolortags/badge/?version=latest)](https://samesystem.github.io/graphql_rails)
6
6
 
@@ -3,9 +3,14 @@
3
3
  module GraphqlRails
4
4
  # contains configuration options related with inputs
5
5
  module InputConfigurable
6
- def permit(*no_type_attributes, **typed_attributes)
7
- no_type_attributes.each { |attribute| permit_input(attribute) }
8
- typed_attributes.each { |attribute, type| permit_input(attribute, type: type) }
6
+ def permit(*args)
7
+ args.each do |arg|
8
+ if arg.is_a? Hash
9
+ arg.each { |attribute, type| permit_input(attribute, type: type) }
10
+ else
11
+ permit_input(arg)
12
+ end
13
+ end
9
14
  self
10
15
  end
11
16
 
@@ -5,6 +5,14 @@ module GraphqlRails
5
5
  # contains methods which are shared between various configurations
6
6
  # expects `default_name` to be defined
7
7
  module Configurable
8
+ def initialize_copy(other)
9
+ super
10
+ @name = nil
11
+ @type_name = nil
12
+ @description = nil
13
+ @attributes = other.attributes.transform_values(&:dup)
14
+ end
15
+
8
16
  def attributes
9
17
  @attributes ||= {}
10
18
  end
@@ -22,7 +22,6 @@ module GraphqlRails
22
22
  @connection_type = nil
23
23
  @graphql_type = nil
24
24
  @input = other.instance_variable_get(:@input)&.transform_values(&:dup)
25
- @attributes = other.instance_variable_get(:@attributes)&.transform_values(&:dup)
26
25
  end
27
26
 
28
27
  def attribute(attribute_name, **attribute_options)
@@ -14,11 +14,6 @@ module GraphqlRails
14
14
  @input_name_suffix = input_name_suffix
15
15
  end
16
16
 
17
- def initialize_copy(other)
18
- super
19
- @attributes = other.instance_variable_get(:@attributes)&.transform_values(&:dup)
20
- end
21
-
22
17
  def graphql_input_type
23
18
  @graphql_input_type ||= BuildGraphqlInputType.call(
24
19
  name: name, description: description, attributes: attributes
@@ -9,8 +9,8 @@ module GraphqlRails
9
9
 
10
10
  attr_reader :name
11
11
 
12
- def self.call(*args)
13
- new(*args).call
12
+ def self.call(**args)
13
+ new(**args).call
14
14
  end
15
15
 
16
16
  def initialize(name:)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GraphqlRails
4
- VERSION = '1.2.4'
4
+ VERSION = '1.2.6'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphql_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.4
4
+ version: 1.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Povilas Jurčys
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-05-05 00:00:00.000000000 Z
11
+ date: 2021-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: graphql
@@ -128,19 +128,19 @@ dependencies:
128
128
  - - "~>"
129
129
  - !ruby/object:Gem::Version
130
130
  version: '6'
131
- description:
131
+ description:
132
132
  email:
133
133
  - po.jurcys@gmail.com
134
134
  executables: []
135
135
  extensions: []
136
136
  extra_rdoc_files: []
137
137
  files:
138
+ - ".github/workflows/ruby.yml"
138
139
  - ".gitignore"
139
140
  - ".hound.yml"
140
141
  - ".rspec"
141
142
  - ".rubocop.yml"
142
143
  - ".ruby-version"
143
- - ".travis.yml"
144
144
  - CHANGELOG.md
145
145
  - CODE_OF_CONDUCT.md
146
146
  - Gemfile
@@ -232,7 +232,7 @@ homepage: https://github.com/samesystem/graphql_rails
232
232
  licenses:
233
233
  - MIT
234
234
  metadata: {}
235
- post_install_message:
235
+ post_install_message:
236
236
  rdoc_options: []
237
237
  require_paths:
238
238
  - lib
@@ -247,8 +247,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
247
247
  - !ruby/object:Gem::Version
248
248
  version: '0'
249
249
  requirements: []
250
- rubygems_version: 3.1.2
251
- signing_key:
250
+ rubygems_version: 3.2.15
251
+ signing_key:
252
252
  specification_version: 4
253
253
  summary: Rails style structure for GraphQL API.
254
254
  test_files: []
data/.travis.yml DELETED
@@ -1,5 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- rvm:
4
- - 2.7.1
5
- before_install: gem install bundler -v 2.1.4