nulogy_graphql_api 0.5.3 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +117 -0
- data/CHANGELOG.md +15 -11
- data/README.md +20 -1
- data/lib/nulogy_graphql_api/rspec.rb +2 -2
- data/lib/nulogy_graphql_api/rspec/graphql_helpers.rb +2 -2
- data/lib/nulogy_graphql_api/tasks/schema_changes_checker.rb +1 -1
- data/lib/nulogy_graphql_api/version.rb +1 -1
- data/nulogy_graphql_api.gemspec +4 -4
- metadata +15 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4b83dfdf7475f2630a23b11b79d071783253eec60759d0b9011c36334413f298
|
4
|
+
data.tar.gz: aef54c3d57c7b7e666758c041682660521e872ee509942d7c5549274836ea57b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 12941fe223139d12da5e571ea7d320d7f55db4cdf53ffe0d0870e60bf1438b01c83c4dc04f91d08ba4aba91dbb617cfa67f873e102d5671a91d8449b0bbe4257
|
7
|
+
data.tar.gz: c339bc9011ce92e493a7e83d4e0a295b10d663b2027933e6530e97be6407fcd2971d75e9b8e849c87671768e30ec07678e892484e0c6ec86f3519039182d8c3f
|
data/.rubocop.yml
CHANGED
@@ -6,6 +6,9 @@ inherit_from:
|
|
6
6
|
AllCops:
|
7
7
|
TargetRubyVersion: 2.6
|
8
8
|
|
9
|
+
Gemspec/DateAssignment:
|
10
|
+
Enabled: true
|
11
|
+
|
9
12
|
Layout/EmptyLinesAroundAttributeAccessor:
|
10
13
|
Enabled: true
|
11
14
|
|
@@ -38,18 +41,72 @@ Layout/MultilineOperationIndentation:
|
|
38
41
|
Layout/SpaceAroundMethodCallOperator:
|
39
42
|
Enabled: false
|
40
43
|
|
44
|
+
Layout/SpaceBeforeBrackets:
|
45
|
+
Enabled: true
|
46
|
+
|
47
|
+
Lint/AmbiguousAssignment:
|
48
|
+
Enabled: true
|
49
|
+
|
50
|
+
Lint/DeprecatedConstants:
|
51
|
+
Enabled: true
|
52
|
+
|
41
53
|
Lint/DeprecatedOpenSSLConstant:
|
42
54
|
Enabled: true
|
43
55
|
|
56
|
+
Lint/DuplicateBranch:
|
57
|
+
Enabled: true
|
58
|
+
|
59
|
+
Lint/DuplicateElsifCondition:
|
60
|
+
Enabled: true
|
61
|
+
|
62
|
+
Lint/DuplicateRegexpCharacterClassElement:
|
63
|
+
Enabled: true
|
64
|
+
|
65
|
+
Lint/EmptyBlock:
|
66
|
+
Enabled: true
|
67
|
+
|
68
|
+
Lint/EmptyClass:
|
69
|
+
Enabled: true
|
70
|
+
|
71
|
+
Lint/LambdaWithoutLiteralBlock:
|
72
|
+
Enabled: true
|
73
|
+
|
44
74
|
Lint/MixedRegexpCaptureTypes:
|
45
75
|
Enabled: true
|
46
76
|
|
77
|
+
Lint/NoReturnInBeginEndBlocks:
|
78
|
+
Enabled: true
|
79
|
+
|
80
|
+
Lint/NumberedParameterAssignment:
|
81
|
+
Enabled: true
|
82
|
+
|
83
|
+
Lint/OrAssignmentToConstant:
|
84
|
+
Enabled: true
|
85
|
+
|
47
86
|
Lint/RaiseException:
|
48
87
|
Enabled: false
|
49
88
|
|
89
|
+
Lint/RedundantDirGlobSort:
|
90
|
+
Enabled: true
|
91
|
+
|
50
92
|
Lint/StructNewOverride:
|
51
93
|
Enabled: false
|
52
94
|
|
95
|
+
Lint/SymbolConversion:
|
96
|
+
Enabled: true
|
97
|
+
|
98
|
+
Lint/ToEnumArguments:
|
99
|
+
Enabled: true
|
100
|
+
|
101
|
+
Lint/TripleQuotes:
|
102
|
+
Enabled: true
|
103
|
+
|
104
|
+
Lint/UnexpectedBlockArity:
|
105
|
+
Enabled: true
|
106
|
+
|
107
|
+
Lint/UnmodifiedReduceAccumulator:
|
108
|
+
Enabled: true
|
109
|
+
|
53
110
|
Metrics:
|
54
111
|
Enabled: false
|
55
112
|
|
@@ -74,18 +131,57 @@ RSpec/MessageSpies:
|
|
74
131
|
RSpec/NotToNot:
|
75
132
|
EnforcedStyle: to_not
|
76
133
|
|
134
|
+
Style/AccessorGrouping:
|
135
|
+
Enabled: true
|
136
|
+
|
137
|
+
Style/ArgumentsForwarding:
|
138
|
+
Enabled: true
|
139
|
+
|
140
|
+
Style/ArrayCoercion:
|
141
|
+
Enabled: true
|
142
|
+
|
143
|
+
Style/BisectedAttrAccessor:
|
144
|
+
Enabled: true
|
145
|
+
|
146
|
+
Style/CaseLikeIf:
|
147
|
+
Enabled: true
|
148
|
+
|
149
|
+
Style/CollectionCompact:
|
150
|
+
Enabled: true
|
151
|
+
|
152
|
+
Style/DocumentDynamicEvalDefinition:
|
153
|
+
Enabled: true
|
154
|
+
|
155
|
+
Style/EndlessMethod:
|
156
|
+
Enabled: true
|
157
|
+
|
77
158
|
Style/ExponentialNotation:
|
78
159
|
Enabled: false
|
79
160
|
|
161
|
+
Style/HashAsLastArrayItem:
|
162
|
+
Enabled: true
|
163
|
+
|
164
|
+
Style/HashConversion:
|
165
|
+
Enabled: true
|
166
|
+
|
80
167
|
Style/HashEachMethods:
|
81
168
|
Enabled: false
|
82
169
|
|
170
|
+
Style/HashExcept:
|
171
|
+
Enabled: true
|
172
|
+
|
173
|
+
Style/HashLikeCase:
|
174
|
+
Enabled: true
|
175
|
+
|
83
176
|
Style/HashTransformKeys:
|
84
177
|
Enabled: false
|
85
178
|
|
86
179
|
Style/HashTransformValues:
|
87
180
|
Enabled: false
|
88
181
|
|
182
|
+
Style/IfWithBooleanLiteralBranches:
|
183
|
+
Enabled: true
|
184
|
+
|
89
185
|
Style/BlockDelimiters:
|
90
186
|
Enabled: false
|
91
187
|
|
@@ -110,9 +206,24 @@ Style/GuardClause:
|
|
110
206
|
Style/MutableConstant:
|
111
207
|
Enabled: false
|
112
208
|
|
209
|
+
Style/NegatedIfElseCondition:
|
210
|
+
Enabled: true
|
211
|
+
|
113
212
|
Style/RaiseArgs:
|
114
213
|
Enabled: false
|
115
214
|
|
215
|
+
Style/RedundantArgument:
|
216
|
+
Enabled: true
|
217
|
+
|
218
|
+
Style/RedundantAssignment:
|
219
|
+
Enabled: true
|
220
|
+
|
221
|
+
Style/RedundantFetchBlock:
|
222
|
+
Enabled: true
|
223
|
+
|
224
|
+
Style/RedundantFileExtensionInRequire:
|
225
|
+
Enabled: true
|
226
|
+
|
116
227
|
Style/RedundantRegexpCharacterClass:
|
117
228
|
Enabled: true
|
118
229
|
|
@@ -131,6 +242,12 @@ Style/SlicingWithRange:
|
|
131
242
|
Style/StringLiterals:
|
132
243
|
EnforcedStyle: double_quotes
|
133
244
|
|
245
|
+
Style/SwapValues:
|
246
|
+
Enabled: true
|
247
|
+
|
248
|
+
Style/NilLambda:
|
249
|
+
Enabled: true
|
250
|
+
|
134
251
|
Style/SymbolArray:
|
135
252
|
Enabled: false
|
136
253
|
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,10 @@
|
|
2
2
|
|
3
3
|
## master (unreleased)
|
4
4
|
|
5
|
+
**Changes**
|
6
|
+
|
7
|
+
* **(Potentially Breaking)** Bump graphql gem version to 1.12.5
|
8
|
+
|
5
9
|
## 0.5.3 (2020-08-11)
|
6
10
|
|
7
11
|
* Add `BaseMutation`.
|
@@ -12,17 +16,17 @@
|
|
12
16
|
|
13
17
|
## 0.5.0 (2020-08-05)
|
14
18
|
|
15
|
-
**
|
19
|
+
**Changes**
|
16
20
|
|
17
|
-
* Add `context` to the Rake task that generates the schema file.
|
21
|
+
* **(Breaking)** Add `context` to the Rake task that generates the schema file.
|
18
22
|
This changes the way the schema is parsed. Please refer to the README file to see an example of how to use `context`.
|
19
23
|
|
20
24
|
## 0.4.0 (2020-07-06)
|
21
25
|
|
22
|
-
**
|
26
|
+
**Changes**
|
23
27
|
|
24
|
-
* Remove the GraphqlApiController
|
25
|
-
* Add the ErrorHandling controller concern
|
28
|
+
* **(Breaking)** Remove the GraphqlApiController
|
29
|
+
* **(Breaking)** Add the ErrorHandling controller concern
|
26
30
|
|
27
31
|
## 0.3.1 (2020-07-03)
|
28
32
|
|
@@ -30,20 +34,20 @@ This changes the way the schema is parsed. Please refer to the README file to se
|
|
30
34
|
|
31
35
|
## 0.3.0 (2020-06-25)
|
32
36
|
|
33
|
-
**
|
37
|
+
**Changes**
|
34
38
|
|
35
|
-
* Remove spec helpers related to subscriptions
|
39
|
+
* **(Breaking)** Remove spec helpers related to subscriptions
|
36
40
|
|
37
41
|
## 0.2.0 (2020-06-24)
|
38
42
|
|
39
|
-
**
|
43
|
+
**Changes**
|
40
44
|
|
41
|
-
* Rename `GraphqlExecutor.call` to `execute`
|
42
|
-
* Change `schema` parameter on `execute_graphql` test helper to positional
|
45
|
+
* **(Breaking)** Rename `GraphqlExecutor.call` to `execute`
|
46
|
+
* **(Breaking)** Change `schema` parameter on `execute_graphql` test helper to positional
|
43
47
|
|
44
48
|
## 0.1.1 (2020-06-24)
|
45
49
|
|
46
|
-
**
|
50
|
+
**Changes**
|
47
51
|
|
48
52
|
* RSpec custom matchers
|
49
53
|
* RSpec helpers
|
data/README.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# NulogyGraphqlApi
|
2
2
|
|
3
|
+
## Intent
|
4
|
+
|
5
|
+
Help Nulogy applications be compliant with the [Standard on Error-handling in GraphQL](https://trello.com/c/N5cHt4Gp/7-error-handling-in-graphql-apis).
|
6
|
+
|
3
7
|
## Installation
|
4
8
|
|
5
9
|
Add this line to your application's Gemfile:
|
@@ -275,7 +279,22 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
275
279
|
|
276
280
|
## Contributing
|
277
281
|
|
278
|
-
|
282
|
+
We treat this project as an internal "open source" project. Everyone at Nulogy is welcome to submit Pull Requests.
|
283
|
+
|
284
|
+
### Submitting Pull Requests
|
285
|
+
|
286
|
+
The Directly Responsible Individual (DRI) for this project is Daniel Silva.
|
287
|
+
|
288
|
+
When you are happy with your changes:
|
289
|
+
|
290
|
+
1. Add description of changes to the top of the [CHANGELOG](./CHANGELOG.md) file, under the `## master (unreleased)` section subdivided into the following categories:
|
291
|
+
- New Features
|
292
|
+
- Bug Fixes
|
293
|
+
- Changes
|
294
|
+
- *prepend these with* **(Breaking)***,* **(Potentially Breaking)** *or just leave it blank in case neither applies*
|
295
|
+
|
296
|
+
1. Create a Pull Request.
|
297
|
+
1. Notify #nulogy-graphql-api Slack channel to get the DRI review and merge your changes.
|
279
298
|
|
280
299
|
## License
|
281
300
|
|
@@ -1,4 +1,4 @@
|
|
1
1
|
# relative-require all rspec files
|
2
|
-
Dir[File.dirname(__FILE__)
|
3
|
-
require "nulogy_graphql_api/rspec
|
2
|
+
Dir["#{File.dirname(__FILE__)}/rspec/*.rb"].each do |file|
|
3
|
+
require "nulogy_graphql_api/rspec/#{File.basename(file, File.extname(file))}"
|
4
4
|
end
|
@@ -16,8 +16,8 @@ module NulogyGraphqlApi
|
|
16
16
|
def request_graphql(url, query, variables: {}, headers: {})
|
17
17
|
params = { query: query, variables: variables }.to_json
|
18
18
|
default_headers = {
|
19
|
-
|
20
|
-
|
19
|
+
CONTENT_TYPE: "application/json",
|
20
|
+
HTTP_AUTHORIZATION: basic_auth_token(default_user.login)
|
21
21
|
}
|
22
22
|
|
23
23
|
post url, params: params, headers: default_headers.merge(headers)
|
data/nulogy_graphql_api.gemspec
CHANGED
@@ -28,15 +28,15 @@ Gem::Specification.new do |spec|
|
|
28
28
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
29
29
|
spec.require_paths = ["lib"]
|
30
30
|
|
31
|
-
spec.add_dependency "graphql", "~> 1.
|
31
|
+
spec.add_dependency "graphql", "~> 1.12.5"
|
32
32
|
spec.add_dependency "graphql-schema_comparator", "~> 1.0.0"
|
33
33
|
spec.add_dependency "rails", ">= 5.2.4", "< 6.1.0"
|
34
34
|
spec.add_dependency "rainbow", "~> 3.0.0"
|
35
35
|
|
36
|
-
spec.add_development_dependency "appraisal", "~> 2.
|
36
|
+
spec.add_development_dependency "appraisal", "~> 2.3.0"
|
37
37
|
spec.add_development_dependency "rspec-rails", "~> 3.9.0"
|
38
|
-
spec.add_development_dependency "rubocop", "~> 0
|
38
|
+
spec.add_development_dependency "rubocop", "~> 1.10.0"
|
39
39
|
spec.add_development_dependency "rubocop-performance", "~> 1.6"
|
40
|
-
spec.add_development_dependency "rubocop-rspec", "~>
|
40
|
+
spec.add_development_dependency "rubocop-rspec", "~> 2.2.0"
|
41
41
|
spec.add_development_dependency "sqlite3", "~> 1.4.2"
|
42
42
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nulogy_graphql_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Silva
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-02-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: graphql
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.
|
19
|
+
version: 1.12.5
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.
|
26
|
+
version: 1.12.5
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: graphql-schema_comparator
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -78,14 +78,14 @@ dependencies:
|
|
78
78
|
requirements:
|
79
79
|
- - "~>"
|
80
80
|
- !ruby/object:Gem::Version
|
81
|
-
version: 2.
|
81
|
+
version: 2.3.0
|
82
82
|
type: :development
|
83
83
|
prerelease: false
|
84
84
|
version_requirements: !ruby/object:Gem::Requirement
|
85
85
|
requirements:
|
86
86
|
- - "~>"
|
87
87
|
- !ruby/object:Gem::Version
|
88
|
-
version: 2.
|
88
|
+
version: 2.3.0
|
89
89
|
- !ruby/object:Gem::Dependency
|
90
90
|
name: rspec-rails
|
91
91
|
requirement: !ruby/object:Gem::Requirement
|
@@ -106,14 +106,14 @@ dependencies:
|
|
106
106
|
requirements:
|
107
107
|
- - "~>"
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version:
|
109
|
+
version: 1.10.0
|
110
110
|
type: :development
|
111
111
|
prerelease: false
|
112
112
|
version_requirements: !ruby/object:Gem::Requirement
|
113
113
|
requirements:
|
114
114
|
- - "~>"
|
115
115
|
- !ruby/object:Gem::Version
|
116
|
-
version:
|
116
|
+
version: 1.10.0
|
117
117
|
- !ruby/object:Gem::Dependency
|
118
118
|
name: rubocop-performance
|
119
119
|
requirement: !ruby/object:Gem::Requirement
|
@@ -134,14 +134,14 @@ dependencies:
|
|
134
134
|
requirements:
|
135
135
|
- - "~>"
|
136
136
|
- !ruby/object:Gem::Version
|
137
|
-
version:
|
137
|
+
version: 2.2.0
|
138
138
|
type: :development
|
139
139
|
prerelease: false
|
140
140
|
version_requirements: !ruby/object:Gem::Requirement
|
141
141
|
requirements:
|
142
142
|
- - "~>"
|
143
143
|
- !ruby/object:Gem::Version
|
144
|
-
version:
|
144
|
+
version: 2.2.0
|
145
145
|
- !ruby/object:Gem::Dependency
|
146
146
|
name: sqlite3
|
147
147
|
requirement: !ruby/object:Gem::Requirement
|
@@ -156,7 +156,7 @@ dependencies:
|
|
156
156
|
- - "~>"
|
157
157
|
- !ruby/object:Gem::Version
|
158
158
|
version: 1.4.2
|
159
|
-
description:
|
159
|
+
description:
|
160
160
|
email:
|
161
161
|
- danielsi@nulogy.com
|
162
162
|
executables: []
|
@@ -206,7 +206,7 @@ metadata:
|
|
206
206
|
changelog_uri: https://github.com/nulogy/nulogy_graphql_api/blob/master/CHANGELOG.md
|
207
207
|
source_code_uri: https://github.com/nulogy/nulogy_graphql_api
|
208
208
|
bug_tracker_uri: https://github.com/nulogy/nulogy_graphql_api/issues
|
209
|
-
post_install_message:
|
209
|
+
post_install_message:
|
210
210
|
rdoc_options: []
|
211
211
|
require_paths:
|
212
212
|
- lib
|
@@ -221,8 +221,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
221
221
|
- !ruby/object:Gem::Version
|
222
222
|
version: '0'
|
223
223
|
requirements: []
|
224
|
-
rubygems_version: 3.
|
225
|
-
signing_key:
|
224
|
+
rubygems_version: 3.2.9
|
225
|
+
signing_key:
|
226
226
|
specification_version: 4
|
227
227
|
summary: Standard tooling for building GraphQL apis
|
228
228
|
test_files: []
|