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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f899476d44c2e336ac2684b30445c89af46e2d2aad292943d590c76c5cd04ec4
4
- data.tar.gz: 65853b83fa441b71646d87b383d9455b794edd72c43afbdd935510042cb5f209
3
+ metadata.gz: 5a822ff7b331a58f0e98cdbf01a847d8d517b7ff501ddf463a4e28500e458160
4
+ data.tar.gz: cfb2dca848ab0b607c63ab6e2265cd657241b85b3b7a794278d63ebb838bec1d
5
5
  SHA512:
6
- metadata.gz: 8f3c38ab529a9171d0c091d5f724827095eb6336270046707c3d5826e567b0b7ea2873833980b7f70744f5cc5963090b87da38163a1b3128f232b39894a21866
7
- data.tar.gz: 232c275825e112651ea52efbdac0a4a0aafe1cfb309aeaa288b4da4577022bb801314f1d8667b7eae2a7bc96b850465cd2de2db19650ebea08277d6e23ee0045
6
+ metadata.gz: 977d6690f487260c1950cbf84e26e2d9e58a881cc7de9e7b297e53c99a18afe9d4e57ea51da28593f8ae70f1601d4234bc5df2c78230a6dff58e2deed5a9e94e
7
+ data.tar.gz: f8fcb0701baaf9c7177017f5724aacd9b133e9b2120956b29ff0e0d4edd6e2f0c755899a119b8e7f4a3ee789674a59cbb476bff12a7b5a88b5c574f6fcf6f424
@@ -24,9 +24,6 @@ jobs:
24
24
  git config user.email "<>"
25
25
 
26
26
  - name: Create release
27
- run: |
28
- gem_push=false bundle exec rake release
29
- gem build *.gemspec
30
- gem push *.gem
27
+ run: bundle exec rake release
31
28
  env:
32
29
  GEM_HOST_API_KEY: ${{secrets.RUBYGEMS_API_KEY}}
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,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", "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.
@@ -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 `## master (unreleased)` section subdivided into the following categories:
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
@@ -1,3 +1,3 @@
1
1
  module NulogyGraphqlApi
2
- VERSION = "2.1.3"
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.
@@ -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.1"
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.1.3
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: 2023-12-07 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
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2.1'
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.1'
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.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: "../"