rack-graphql 3.5.0 → 3.6.0

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: 499d61ebe65ca554ac40efcfb74dffe22850ab8456e339444f65a171f95b9809
4
- data.tar.gz: 2107b50e6fbaecde8ee25440686a9ac0121fa4625ef9aaeddc3c347144520b73
3
+ metadata.gz: c46f2f63b1726129a28420ce5f39cfb2f18506211f84ae943754538cc6d1f118
4
+ data.tar.gz: 37b047710445593ba3d227e3db9a4e2ab2827215a8cffaa0c2b261e76cc0b603
5
5
  SHA512:
6
- metadata.gz: ea8390fe89e7a32d17c017f63a4ba08971dc652dc1aef67f0895494e8c72c26802fc3da15ed7ce5c279585875b6151de4241f4b56091c2c7e2d2cfbf9f620e8b
7
- data.tar.gz: 4ab5cb0f925617682347476cb7b26f840ed8bb594aa7800718f664fccb711555335cf1b7c3f7216849cdd2158493aafff3f39c9903a0b54e442a83b1eb24a68e
6
+ metadata.gz: 011405a88de241e90a2eb6e1408c998dd17898c28519fa963495ae4d824b61cfe536e89d11c610a6b4eeafb455b20d0e2f985af18c7802f3729e6a1047479f54
7
+ data.tar.gz: 40bfbc8a432baa9d22b13b88cc4262d33c36043a245060d71ca879b34c2e9a7731d65b5afd77787445534636fa7f3407cecb7c465e230a7f877b408745dc1b80
data/.bundler-version CHANGED
@@ -1 +1 @@
1
- 2.5.6
1
+ 2.5.9
@@ -11,7 +11,7 @@ jobs:
11
11
  runs-on: ubuntu-latest
12
12
  strategy:
13
13
  matrix:
14
- ruby-version: [3.1, 3.2, 3.3]
14
+ ruby-version: [3.2, 3.3]
15
15
 
16
16
  steps:
17
17
  - uses: actions/checkout@v3
data/CHANGELOG.md CHANGED
@@ -1,7 +1,11 @@
1
1
  # CHANGELOG
2
2
 
3
- ## 3.3.1 - 2024-02-29
4
- - make ruby 3.1 a minimum version
3
+ ## 3.6.0 - 2024-04-26
4
+ - drop ruby 3.1 support
5
+ - pass context.headers to the http reponse
6
+
7
+ ## 3.5.0 - 2024-02-29
8
+ - make ruby 3.1 as a minimum ruby version, add ruby 3.3 support
5
9
 
6
10
  ## 3.3.0 - 2023-11-23
7
11
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rack-graphql (3.5.0)
4
+ rack-graphql (3.6.0)
5
5
  graphql (~> 2.0)
6
6
  oj
7
7
  rack (>= 2.2.6)
@@ -12,30 +12,29 @@ GEM
12
12
  ast (2.4.2)
13
13
  awesome_print (1.9.2)
14
14
  base64 (0.2.0)
15
- bigdecimal (3.1.6)
15
+ bigdecimal (3.1.7)
16
16
  coderay (1.1.3)
17
17
  diff-lcs (1.5.1)
18
- graphql (2.2.11)
18
+ graphql (2.3.1)
19
19
  base64
20
- json (2.7.1)
20
+ json (2.7.2)
21
21
  language_server-protocol (3.17.0.3)
22
- method_source (1.0.0)
22
+ method_source (1.1.0)
23
23
  oj (3.16.3)
24
24
  bigdecimal (>= 3.0)
25
25
  parallel (1.24.0)
26
26
  parser (3.3.0.5)
27
27
  ast (~> 2.4.1)
28
28
  racc
29
- prism (0.24.0)
30
29
  pry (0.14.2)
31
30
  coderay (~> 1.1)
32
31
  method_source (~> 1.0)
33
32
  racc (1.7.3)
34
- rack (3.0.9.1)
33
+ rack (3.0.10)
35
34
  rack-test (2.1.0)
36
35
  rack (>= 1.3)
37
36
  rainbow (3.1.1)
38
- rake (13.1.0)
37
+ rake (13.2.1)
39
38
  regexp_parser (2.9.0)
40
39
  rexml (3.2.6)
41
40
  rspec (3.13.0)
@@ -51,7 +50,7 @@ GEM
51
50
  diff-lcs (>= 1.2.0, < 2.0)
52
51
  rspec-support (~> 3.13.0)
53
52
  rspec-support (3.13.1)
54
- rubocop (1.61.0)
53
+ rubocop (1.63.3)
55
54
  json (~> 2.3)
56
55
  language_server-protocol (>= 3.17.0)
57
56
  parallel (~> 1.10)
@@ -59,22 +58,24 @@ GEM
59
58
  rainbow (>= 2.2.2, < 4.0)
60
59
  regexp_parser (>= 1.8, < 3.0)
61
60
  rexml (>= 3.2.5, < 4.0)
62
- rubocop-ast (>= 1.30.0, < 2.0)
61
+ rubocop-ast (>= 1.31.1, < 2.0)
63
62
  ruby-progressbar (~> 1.7)
64
63
  unicode-display_width (>= 2.4.0, < 3.0)
65
- rubocop-ast (1.31.0)
64
+ rubocop-ast (1.31.2)
66
65
  parser (>= 3.3.0.4)
67
- prism (>= 0.24.0)
68
66
  rubocop-capybara (2.20.0)
69
67
  rubocop (~> 1.41)
70
68
  rubocop-factory_bot (2.25.1)
71
69
  rubocop (~> 1.41)
72
70
  rubocop-rake (0.6.0)
73
71
  rubocop (~> 1.0)
74
- rubocop-rspec (2.26.1)
72
+ rubocop-rspec (2.29.1)
75
73
  rubocop (~> 1.40)
76
74
  rubocop-capybara (~> 2.17)
77
75
  rubocop-factory_bot (~> 2.22)
76
+ rubocop-rspec_rails (~> 2.28)
77
+ rubocop-rspec_rails (2.28.3)
78
+ rubocop (~> 1.40)
78
79
  ruby-progressbar (1.13.0)
79
80
  unicode-display_width (2.5.0)
80
81
 
@@ -100,4 +101,4 @@ DEPENDENCIES
100
101
  rubocop-rspec
101
102
 
102
103
  BUNDLED WITH
103
- 2.5.6
104
+ 2.5.9
@@ -149,13 +149,15 @@ module RackGraphql
149
149
  end
150
150
 
151
151
  def response_headers(result = nil, status_code: DEFAULT_STATUS_CODE)
152
- {
153
- 'Access-Control-Expose-Headers' => [SUBSCRIPTION_ID_HEADER_NAME, STATUS_CODE_HEADER_NAME].join(', '),
154
- 'Content-Type' => 'application/json',
155
- STATUS_CODE_HEADER_NAME => status_code,
156
- }.tap do |headers|
157
- headers[SUBSCRIPTION_ID_HEADER_NAME] = result.context[:subscription_id] if result_subscription?(result)
152
+ headers = { STATUS_CODE_HEADER_NAME => status_code }
153
+ headers[SUBSCRIPTION_ID_HEADER_NAME] = result.context[:subscription_id] if result_subscription?(result)
154
+ result_collection = result.is_a?(Array) ? result : [result]
155
+ result_collection.each do |part|
156
+ headers.merge!(part.context[:headers]) if part.context[:headers].is_a?(Hash)
158
157
  end
158
+ headers["Access-Control-Expose-Headers"] = [SUBSCRIPTION_ID_HEADER_NAME, STATUS_CODE_HEADER_NAME].join(", ")
159
+ headers["Content-Type"] = "application/json"
160
+ headers
159
161
  end
160
162
 
161
163
  def response_status(result)
@@ -1,3 +1,3 @@
1
1
  module RackGraphql
2
- VERSION = '3.5.0'.freeze
2
+ VERSION = '3.6.0'.freeze
3
3
  end
data/rack-graphql.gemspec CHANGED
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
24
24
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
25
25
  spec.require_paths = ['lib']
26
26
 
27
- spec.required_ruby_version = Gem::Requirement.new('>= 3.1.0')
27
+ spec.required_ruby_version = Gem::Requirement.new('>= 3.2.0')
28
28
 
29
29
  spec.add_dependency 'graphql', '~> 2.0'
30
30
  spec.add_dependency 'oj'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-graphql
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.0
4
+ version: 3.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Krzysztof Knapik
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-02-29 00:00:00.000000000 Z
11
+ date: 2024-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: graphql
@@ -66,7 +66,6 @@ files:
66
66
  - ".github/ISSUE_TEMPLATE/story.md"
67
67
  - ".github/PULL_REQUEST_TEMPLATE.md"
68
68
  - ".github/workflows/auto-approve.yml"
69
- - ".github/workflows/auto-merge-dependencies.yml"
70
69
  - ".github/workflows/auto-merge.yml"
71
70
  - ".github/workflows/ci.yml"
72
71
  - ".gitignore"
@@ -101,14 +100,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
101
100
  requirements:
102
101
  - - ">="
103
102
  - !ruby/object:Gem::Version
104
- version: 3.1.0
103
+ version: 3.2.0
105
104
  required_rubygems_version: !ruby/object:Gem::Requirement
106
105
  requirements:
107
106
  - - ">="
108
107
  - !ruby/object:Gem::Version
109
108
  version: '0'
110
109
  requirements: []
111
- rubygems_version: 3.5.3
110
+ rubygems_version: 3.5.9
112
111
  signing_key:
113
112
  specification_version: 4
114
113
  summary: Rack middleware implementing graphql endpoint.
@@ -1,24 +0,0 @@
1
- name: automerge-dependencies
2
- on:
3
- pull_request_review:
4
- types:
5
- - submitted
6
- check_suite:
7
- types:
8
- - completed
9
- label:
10
- types:
11
- - created
12
- status: {}
13
- jobs:
14
- automerge:
15
- runs-on: ubuntu-latest
16
- steps:
17
- - name: automerge-dependencies
18
- uses: pascalgn/automerge-action@v0.16.2
19
- env:
20
- GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
21
- MERGE_METHOD: squash
22
- MERGE_DELETE_BRANCH: true
23
- MERGE_LABELS: "dependencies,!automerge blocked"
24
- MERGE_REMOVE_LABELS: ""