rack-graphql 3.3.0 → 3.6.0

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: c5d4ffebb36635210874227b52711af8973b7d882843b19ea29be127bde361e7
4
- data.tar.gz: ebe79a3fc4bed9259a8d22f915701d9424376866abc082b8c7567afdb1754999
3
+ metadata.gz: c46f2f63b1726129a28420ce5f39cfb2f18506211f84ae943754538cc6d1f118
4
+ data.tar.gz: 37b047710445593ba3d227e3db9a4e2ab2827215a8cffaa0c2b261e76cc0b603
5
5
  SHA512:
6
- metadata.gz: ec6cb68ea5a1f5184428a1edee0b9c7349f8cafa14dde3f64ae627d5880506272982b945d77c8c0772ff9a5539dd70689a77aebed80a62825ce4f2dc41fa4fb3
7
- data.tar.gz: 16e0f39e00e0c1e956c61b4dc353a96f706d264b9d48ba4d297c51732e0fa2b2d28260b0ec4a8b162537fd709203b951c9249fef49432050093d1f58cb16e112
6
+ metadata.gz: 011405a88de241e90a2eb6e1408c998dd17898c28519fa963495ae4d824b61cfe536e89d11c610a6b4eeafb455b20d0e2f985af18c7802f3729e6a1047479f54
7
+ data.tar.gz: 40bfbc8a432baa9d22b13b88cc4262d33c36043a245060d71ca879b34c2e9a7731d65b5afd77787445534636fa7f3407cecb7c465e230a7f877b408745dc1b80
data/.bundler-version CHANGED
@@ -1 +1 @@
1
- 2.4.21
1
+ 2.5.9
@@ -1,19 +1,15 @@
1
- version: 1
1
+ version: 2
2
2
 
3
- update_configs:
4
- - package_manager: "ruby:bundler"
3
+ updates:
4
+ - package-ecosystem: "bundler"
5
5
  directory: "/"
6
- update_schedule: "daily"
7
- commit_message:
6
+ schedule:
7
+ interval: "weekly"
8
+ day: "monday"
9
+ time: "08:00"
10
+ timezone: "UTC"
11
+ commit-message:
8
12
  prefix: "[dependabot]"
9
- allowed_updates:
10
- - match:
11
- dependency_type: "all"
12
- update_type: "security"
13
- automerged_updates:
14
- - match:
15
- dependency_type: "all"
16
- update_type: "security:patch"
17
13
  labels:
18
14
  - "automerge"
19
15
  - "dependencies"
@@ -8,6 +8,6 @@ jobs:
8
8
  runs-on: ubuntu-latest
9
9
  steps:
10
10
  - uses: hmarr/auto-approve-action@v3
11
- if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]' || github.actor == 'renofidev' || contains(toJson(github), 'HOTFIX-AUTO-APPROVE')
11
+ if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]' || github.actor == 'renofidev' || contains(github.event.pull_request.labels.*.name, 'HOTFIX-AUTO-APPROVE') || contains(github.event.pull_request.labels.*.name, 'dependencies')
12
12
  with:
13
13
  github-token: "${{ secrets.GITHUB_TOKEN }}"
@@ -15,7 +15,7 @@ jobs:
15
15
  runs-on: ubuntu-latest
16
16
  steps:
17
17
  - name: automerge
18
- uses: pascalgn/automerge-action@v0.15.6
18
+ uses: pascalgn/automerge-action@v0.16.2
19
19
  env:
20
20
  GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
21
21
  MERGE_METHOD: squash
@@ -7,11 +7,11 @@ on:
7
7
  branches: [ main ]
8
8
 
9
9
  jobs:
10
- test:
10
+ ci_tests_ruby:
11
11
  runs-on: ubuntu-latest
12
12
  strategy:
13
13
  matrix:
14
- ruby-version: [3.1, 3.2]
14
+ ruby-version: [3.2, 3.3]
15
15
 
16
16
  steps:
17
17
  - uses: actions/checkout@v3
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # CHANGELOG
2
2
 
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
9
+
3
10
  ## 3.3.0 - 2023-11-23
4
11
 
5
12
  - add `request_epilogue` so actions like `ActiveRecord::Base.connection_handler.clear_active_connections!` can be passed manually
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rack-graphql (3.3.0)
4
+ rack-graphql (3.6.0)
5
5
  graphql (~> 2.0)
6
6
  oj
7
7
  rack (>= 2.2.6)
@@ -11,65 +11,71 @@ GEM
11
11
  specs:
12
12
  ast (2.4.2)
13
13
  awesome_print (1.9.2)
14
+ base64 (0.2.0)
15
+ bigdecimal (3.1.7)
14
16
  coderay (1.1.3)
15
- diff-lcs (1.5.0)
16
- graphql (2.1.6)
17
- racc (~> 1.4)
18
- json (2.6.3)
17
+ diff-lcs (1.5.1)
18
+ graphql (2.3.1)
19
+ base64
20
+ json (2.7.2)
19
21
  language_server-protocol (3.17.0.3)
20
- method_source (1.0.0)
21
- oj (3.16.1)
22
- parallel (1.23.0)
23
- parser (3.2.2.4)
22
+ method_source (1.1.0)
23
+ oj (3.16.3)
24
+ bigdecimal (>= 3.0)
25
+ parallel (1.24.0)
26
+ parser (3.3.0.5)
24
27
  ast (~> 2.4.1)
25
28
  racc
26
29
  pry (0.14.2)
27
30
  coderay (~> 1.1)
28
31
  method_source (~> 1.0)
29
32
  racc (1.7.3)
30
- rack (3.0.8)
33
+ rack (3.0.10)
31
34
  rack-test (2.1.0)
32
35
  rack (>= 1.3)
33
36
  rainbow (3.1.1)
34
- rake (13.1.0)
35
- regexp_parser (2.8.2)
37
+ rake (13.2.1)
38
+ regexp_parser (2.9.0)
36
39
  rexml (3.2.6)
37
- rspec (3.12.0)
38
- rspec-core (~> 3.12.0)
39
- rspec-expectations (~> 3.12.0)
40
- rspec-mocks (~> 3.12.0)
41
- rspec-core (3.12.2)
42
- rspec-support (~> 3.12.0)
43
- rspec-expectations (3.12.3)
40
+ rspec (3.13.0)
41
+ rspec-core (~> 3.13.0)
42
+ rspec-expectations (~> 3.13.0)
43
+ rspec-mocks (~> 3.13.0)
44
+ rspec-core (3.13.0)
45
+ rspec-support (~> 3.13.0)
46
+ rspec-expectations (3.13.0)
44
47
  diff-lcs (>= 1.2.0, < 2.0)
45
- rspec-support (~> 3.12.0)
46
- rspec-mocks (3.12.6)
48
+ rspec-support (~> 3.13.0)
49
+ rspec-mocks (3.13.0)
47
50
  diff-lcs (>= 1.2.0, < 2.0)
48
- rspec-support (~> 3.12.0)
49
- rspec-support (3.12.1)
50
- rubocop (1.57.2)
51
+ rspec-support (~> 3.13.0)
52
+ rspec-support (3.13.1)
53
+ rubocop (1.63.3)
51
54
  json (~> 2.3)
52
55
  language_server-protocol (>= 3.17.0)
53
56
  parallel (~> 1.10)
54
- parser (>= 3.2.2.4)
57
+ parser (>= 3.3.0.2)
55
58
  rainbow (>= 2.2.2, < 4.0)
56
59
  regexp_parser (>= 1.8, < 3.0)
57
60
  rexml (>= 3.2.5, < 4.0)
58
- rubocop-ast (>= 1.28.1, < 2.0)
61
+ rubocop-ast (>= 1.31.1, < 2.0)
59
62
  ruby-progressbar (~> 1.7)
60
63
  unicode-display_width (>= 2.4.0, < 3.0)
61
- rubocop-ast (1.30.0)
62
- parser (>= 3.2.1.0)
63
- rubocop-capybara (2.19.0)
64
+ rubocop-ast (1.31.2)
65
+ parser (>= 3.3.0.4)
66
+ rubocop-capybara (2.20.0)
67
+ rubocop (~> 1.41)
68
+ rubocop-factory_bot (2.25.1)
64
69
  rubocop (~> 1.41)
65
- rubocop-factory_bot (2.24.0)
66
- rubocop (~> 1.33)
67
70
  rubocop-rake (0.6.0)
68
71
  rubocop (~> 1.0)
69
- rubocop-rspec (2.25.0)
72
+ rubocop-rspec (2.29.1)
70
73
  rubocop (~> 1.40)
71
74
  rubocop-capybara (~> 2.17)
72
75
  rubocop-factory_bot (~> 2.22)
76
+ rubocop-rspec_rails (~> 2.28)
77
+ rubocop-rspec_rails (2.28.3)
78
+ rubocop (~> 1.40)
73
79
  ruby-progressbar (1.13.0)
74
80
  unicode-display_width (2.5.0)
75
81
 
@@ -95,4 +101,4 @@ DEPENDENCIES
95
101
  rubocop-rspec
96
102
 
97
103
  BUNDLED WITH
98
- 2.4.20
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.3.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 = '>= 3.1'
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.3.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: 2023-11-23 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'
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.4.22
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.15.6
19
- env:
20
- GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
21
- MERGE_METHOD: squash
22
- MERGE_DELETE_BRANCH: true
23
- MERGE_LABELS: dependencies
24
- MERGE_REMOVE_LABELS: ""