nulogy_graphql_api 2.2.0 → 3.0.1

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: e3ef0420e5eced452c468681a47db0bf23f28066a1a8db5b71f264a82a752db3
4
- data.tar.gz: 2f6e5aacd8a918f3e5c23502180999e049e434171b20dff3c01187ef14dfa870
3
+ metadata.gz: 5a822ff7b331a58f0e98cdbf01a847d8d517b7ff501ddf463a4e28500e458160
4
+ data.tar.gz: cfb2dca848ab0b607c63ab6e2265cd657241b85b3b7a794278d63ebb838bec1d
5
5
  SHA512:
6
- metadata.gz: eb98d61ac93b589baf8c914c4e8b6cf9021d8a71b69b97474b44566da92b9a9b33a98df877801f9d847658900e63864185d13f69b0eb7454bf59613c83dc6081
7
- data.tar.gz: 22827e08ec2ea12acc34048d5bd892b7d95bcdf2a277b93b9a625e87ed9e56a70dab2bb6ca4e5875ad124a951c33088bd8605aac505bfdcff9d7be93e010764b
6
+ metadata.gz: 977d6690f487260c1950cbf84e26e2d9e58a881cc7de9e7b297e53c99a18afe9d4e57ea51da28593f8ae70f1601d4234bc5df2c78230a6dff58e2deed5a9e94e
7
+ data.tar.gz: f8fcb0701baaf9c7177017f5724aacd9b133e9b2120956b29ff0e0d4edd6e2f0c755899a119b8e7f4a3ee789674a59cbb476bff12a7b5a88b5c574f6fcf6f424
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.7.4
1
+ 3.1.4
data/.tool-versions ADDED
@@ -0,0 +1 @@
1
+ ruby 3.1.4
data/Appraisals CHANGED
@@ -1,7 +1,3 @@
1
- appraise "rails-6" do
2
- gem "rails", "6.0.3.7"
3
- end
4
-
5
1
  appraise "rails-6-1" do
6
2
  gem "rails", "6.1.4"
7
3
  end
data/CHANGELOG.md CHANGED
@@ -4,6 +4,16 @@
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
+
7
17
  ## 2.2.0 (2024-01-15)
8
18
 
9
19
  **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", "2.1.0"
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
- These are the custom matchers available:
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 checking the response `errors`
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.
@@ -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
@@ -1,3 +1,3 @@
1
1
  module NulogyGraphqlApi
2
- VERSION = "2.2.0"
2
+ VERSION = "3.0.1"
3
3
  end
@@ -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(">= 2.6.0")
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.
@@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
31
31
 
32
32
  spec.add_dependency "graphql", "~> 2"
33
33
  spec.add_dependency "graphql-schema_comparator", "~> 1.2"
34
- spec.add_dependency "rails", ">= 6.0", "< 8.0"
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: 2.2.0
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: 2024-01-15 00:00:00.000000000 Z
11
+ date: 2024-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: graphql
@@ -44,7 +44,7 @@ dependencies:
44
44
  requirements:
45
45
  - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '6.0'
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.0'
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: 2.6.0
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.1.6
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: []
@@ -1,7 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "rails", "6.0.3.7"
6
-
7
- gemspec path: "../"