nulogy_graphql_api 2.1.3 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/gem-push.yml +1 -4
- data/.ruby-version +1 -1
- data/.tool-versions +1 -0
- data/Appraisals +0 -4
- data/CHANGELOG.md +16 -0
- data/README.md +50 -6
- data/lib/nulogy_graphql_api/rspec/graphql_matchers.rb +8 -0
- data/lib/nulogy_graphql_api/version.rb +1 -1
- data/nulogy_graphql_api.gemspec +3 -3
- metadata +13 -13
- data/gemfiles/rails_6.gemfile +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a822ff7b331a58f0e98cdbf01a847d8d517b7ff501ddf463a4e28500e458160
|
4
|
+
data.tar.gz: cfb2dca848ab0b607c63ab6e2265cd657241b85b3b7a794278d63ebb838bec1d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 977d6690f487260c1950cbf84e26e2d9e58a881cc7de9e7b297e53c99a18afe9d4e57ea51da28593f8ae70f1601d4234bc5df2c78230a6dff58e2deed5a9e94e
|
7
|
+
data.tar.gz: f8fcb0701baaf9c7177017f5724aacd9b133e9b2120956b29ff0e0d4edd6e2f0c755899a119b8e7f4a3ee789674a59cbb476bff12a7b5a88b5c574f6fcf6f424
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
3.1.4
|
data/.tool-versions
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby 3.1.4
|
data/Appraisals
CHANGED
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,22 @@
|
|
4
4
|
|
5
5
|
_none_
|
6
6
|
|
7
|
+
## 3.0.1 (2024-01-30)
|
8
|
+
|
9
|
+
* Add `include_graphql_error` RSpec matcher
|
10
|
+
|
11
|
+
## 3.0.0 (2024-01-30)
|
12
|
+
|
13
|
+
**Changes**
|
14
|
+
* **(Breaking)** Drop support for Rails 6.0
|
15
|
+
* **(Breaking)** Drop support for Ruby 2.7
|
16
|
+
|
17
|
+
## 2.2.0 (2024-01-15)
|
18
|
+
|
19
|
+
**Changes**
|
20
|
+
* Pin graphql to major version 2. Permit minor version upgrades of graphql
|
21
|
+
without forcing the project to release a new version.
|
22
|
+
|
7
23
|
## 2.1.3 (2023-12-06)
|
8
24
|
|
9
25
|
**Changes**
|
data/README.md
CHANGED
@@ -9,7 +9,7 @@ Help Nulogy applications be compliant with the [Standard on Error-handling in Gr
|
|
9
9
|
Add this line to your application's Gemfile:
|
10
10
|
|
11
11
|
```ruby
|
12
|
-
gem "nulogy_graphql_api", "
|
12
|
+
gem "nulogy_graphql_api", "3.0.1"
|
13
13
|
```
|
14
14
|
|
15
15
|
And then execute:
|
@@ -253,9 +253,7 @@ end
|
|
253
253
|
|
254
254
|
#### Custom matchers
|
255
255
|
|
256
|
-
|
257
|
-
|
258
|
-
`have_graphql_data` for checking the response `data`
|
256
|
+
Use `have_graphql_data` for checking the response `data`.
|
259
257
|
|
260
258
|
```ruby
|
261
259
|
expect(response).to have_graphql_data(
|
@@ -265,12 +263,20 @@ expect(response).to have_graphql_data(
|
|
265
263
|
)
|
266
264
|
```
|
267
265
|
|
268
|
-
`have_graphql_error` for
|
266
|
+
Use `have_graphql_error` for matching exactly on the response `errors`. <br/>
|
267
|
+
The match succeeds when the `errors` array contains a single entry with the specified message.
|
269
268
|
|
270
269
|
```ruby
|
271
270
|
expect(response).to have_graphql_error("Error message")
|
272
271
|
```
|
273
272
|
|
273
|
+
Use `include_graphql_error` for matching inclusively on the response `errors`. <br/>
|
274
|
+
The match succeeds when the `errors` array includes an entry with the specified message.
|
275
|
+
|
276
|
+
```ruby
|
277
|
+
expect(response).to include_graphql_error("Error message")
|
278
|
+
```
|
279
|
+
|
274
280
|
## Development
|
275
281
|
|
276
282
|
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
@@ -289,7 +295,7 @@ The Directly Responsible Individual (DRI) for this project is Daniel Silva.
|
|
289
295
|
|
290
296
|
When you are happy with your changes:
|
291
297
|
|
292
|
-
1. Add description of changes to the top of the [CHANGELOG](./CHANGELOG.md) file, under the
|
298
|
+
1. Add description of changes to the top of the [CHANGELOG](./CHANGELOG.md) file, under the `master (unreleased)` section subdivided into the following categories:
|
293
299
|
- New Features
|
294
300
|
- Bug Fixes
|
295
301
|
- Changes
|
@@ -298,6 +304,44 @@ When you are happy with your changes:
|
|
298
304
|
1. Create a Pull Request.
|
299
305
|
1. Notify #nulogy-graphql-api Slack channel to get the DRI review and merge your changes.
|
300
306
|
|
307
|
+
### Merging Pull Requests
|
308
|
+
|
309
|
+
Add a comment to the PR with the command `/integrate`. This will trigger the [Integrate](https://github.com/nulogy/nulogy_graphql_api/actions) GitHub action that runs checks (Rubocop, RSpec) and merges the code into the base branch.
|
310
|
+
|
311
|
+
### Releasing a new version
|
312
|
+
|
313
|
+
1. Take a look at the changes listed under `master (unreleased)` at the top of the [CHANGELOG](./CHANGELOG.md) in order to define the new version according to the rules of [Semantic Versioning](https://semver.org/).
|
314
|
+
|
315
|
+
|
316
|
+
2. Change the `version.rb` file.
|
317
|
+
|
318
|
+
```ruby
|
319
|
+
module NulogyGraphqlApi
|
320
|
+
VERSION = "2.1.3"
|
321
|
+
end
|
322
|
+
```
|
323
|
+
|
324
|
+
|
325
|
+
3. Add a title to the list of changes with the new version following the format: `X.Y.Z (YYYY-MM-DD)`. Keep the `master (unreleased)` title and add _none_ underneath it. This is how the top of the changelog should look like:
|
326
|
+
|
327
|
+
```text
|
328
|
+
## master (unreleased)
|
329
|
+
|
330
|
+
_none_
|
331
|
+
|
332
|
+
## 2.1.3 (2023-12-06)
|
333
|
+
|
334
|
+
**Changes**
|
335
|
+
* Support appraisal 2.5.x
|
336
|
+
* Support rake 13.1.x
|
337
|
+
* Support rspec 3.12.x
|
338
|
+
```
|
339
|
+
|
340
|
+
4. Commit these changes. Suggested commit message: `Release new version`.
|
341
|
+
|
342
|
+
|
343
|
+
5. Go to the [Release](https://github.com/nulogy/nulogy_graphql_api/actions/workflows/gem-push.yml) GitHub action and run a new workflow. The new version will be pushed to [rubygems](https://rubygems.org/gems/nulogy_graphql_api).
|
344
|
+
|
301
345
|
## License
|
302
346
|
|
303
347
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
@@ -34,5 +34,13 @@ module NulogyGraphqlApi
|
|
34
34
|
})
|
35
35
|
end
|
36
36
|
end
|
37
|
+
|
38
|
+
RSpec::Matchers.define :include_graphql_error do |message|
|
39
|
+
match do |actual_response|
|
40
|
+
expect(actual_response.fetch(:errors, nil)).to include(a_hash_including(
|
41
|
+
message: include(message)
|
42
|
+
))
|
43
|
+
end
|
44
|
+
end
|
37
45
|
end
|
38
46
|
end
|
data/nulogy_graphql_api.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
"rubygems_mfa_required" => "true"
|
19
19
|
}
|
20
20
|
|
21
|
-
spec.required_ruby_version = Gem::Requirement.new(">=
|
21
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 3.0.0")
|
22
22
|
|
23
23
|
# Specify which files should be added to the gem when it is released.
|
24
24
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
@@ -29,9 +29,9 @@ Gem::Specification.new do |spec|
|
|
29
29
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
30
30
|
spec.require_paths = ["lib"]
|
31
31
|
|
32
|
-
spec.add_dependency "graphql", "~> 2
|
32
|
+
spec.add_dependency "graphql", "~> 2"
|
33
33
|
spec.add_dependency "graphql-schema_comparator", "~> 1.2"
|
34
|
-
spec.add_dependency "rails", ">= 6.
|
34
|
+
spec.add_dependency "rails", ">= 6.1", "< 8.0"
|
35
35
|
spec.add_dependency "rainbow", "~> 3.0"
|
36
36
|
|
37
37
|
spec.add_development_dependency "appraisal", "~> 2.5"
|
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:
|
4
|
+
version: 3.0.1
|
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: 2024-01-30 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: '2
|
19
|
+
version: '2'
|
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: '2
|
26
|
+
version: '2'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: graphql-schema_comparator
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,7 +44,7 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '6.
|
47
|
+
version: '6.1'
|
48
48
|
- - "<"
|
49
49
|
- !ruby/object:Gem::Version
|
50
50
|
version: '8.0'
|
@@ -54,7 +54,7 @@ dependencies:
|
|
54
54
|
requirements:
|
55
55
|
- - ">="
|
56
56
|
- !ruby/object:Gem::Version
|
57
|
-
version: '6.
|
57
|
+
version: '6.1'
|
58
58
|
- - "<"
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: '8.0'
|
@@ -198,7 +198,7 @@ dependencies:
|
|
198
198
|
- - "~>"
|
199
199
|
- !ruby/object:Gem::Version
|
200
200
|
version: '1.4'
|
201
|
-
description:
|
201
|
+
description:
|
202
202
|
email:
|
203
203
|
- danielsi@nulogy.com
|
204
204
|
executables: []
|
@@ -213,6 +213,7 @@ files:
|
|
213
213
|
- ".rubocop.directories.yml"
|
214
214
|
- ".rubocop.yml"
|
215
215
|
- ".ruby-version"
|
216
|
+
- ".tool-versions"
|
216
217
|
- Appraisals
|
217
218
|
- CHANGELOG.md
|
218
219
|
- CODE_OF_CONDUCT.md
|
@@ -222,7 +223,6 @@ files:
|
|
222
223
|
- Rakefile
|
223
224
|
- bin/console
|
224
225
|
- bin/setup
|
225
|
-
- gemfiles/rails_6.gemfile
|
226
226
|
- gemfiles/rails_6_1.gemfile
|
227
227
|
- gemfiles/rails_7.gemfile
|
228
228
|
- lib/nulogy_graphql_api.rb
|
@@ -252,7 +252,7 @@ metadata:
|
|
252
252
|
source_code_uri: https://github.com/nulogy/nulogy_graphql_api
|
253
253
|
bug_tracker_uri: https://github.com/nulogy/nulogy_graphql_api/issues
|
254
254
|
rubygems_mfa_required: 'true'
|
255
|
-
post_install_message:
|
255
|
+
post_install_message:
|
256
256
|
rdoc_options: []
|
257
257
|
require_paths:
|
258
258
|
- lib
|
@@ -260,15 +260,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
260
260
|
requirements:
|
261
261
|
- - ">="
|
262
262
|
- !ruby/object:Gem::Version
|
263
|
-
version:
|
263
|
+
version: 3.0.0
|
264
264
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
265
265
|
requirements:
|
266
266
|
- - ">="
|
267
267
|
- !ruby/object:Gem::Version
|
268
268
|
version: '0'
|
269
269
|
requirements: []
|
270
|
-
rubygems_version: 3.
|
271
|
-
signing_key:
|
270
|
+
rubygems_version: 3.5.5
|
271
|
+
signing_key:
|
272
272
|
specification_version: 4
|
273
273
|
summary: Standard tooling for building GraphQL apis
|
274
274
|
test_files: []
|