rack-graphql 3.6.0 → 3.8.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: c46f2f63b1726129a28420ce5f39cfb2f18506211f84ae943754538cc6d1f118
4
- data.tar.gz: 37b047710445593ba3d227e3db9a4e2ab2827215a8cffaa0c2b261e76cc0b603
3
+ metadata.gz: 1dae49ce19bfc15635ecbc96b8577aac5670c9ff7c4d8a3d49b89f0e84d416d0
4
+ data.tar.gz: a758aacdbf0c85b4292cea6f58c3df71f6ac1c4e9cd7ed78fd509f0c36d6eb0b
5
5
  SHA512:
6
- metadata.gz: 011405a88de241e90a2eb6e1408c998dd17898c28519fa963495ae4d824b61cfe536e89d11c610a6b4eeafb455b20d0e2f985af18c7802f3729e6a1047479f54
7
- data.tar.gz: 40bfbc8a432baa9d22b13b88cc4262d33c36043a245060d71ca879b34c2e9a7731d65b5afd77787445534636fa7f3407cecb7c465e230a7f877b408745dc1b80
6
+ metadata.gz: d4b52740f5d98d7b3e6947737700f371040edd5dbb3bf3dabb8f134793a5dedd135edf33bf9d5682bd4dc1b0f164f1b21ea4774159a43e15752c1adc3d7ea682
7
+ data.tar.gz: 22be795ea42e466bcb2320c1b5ecfa6a2c78801dadb55e5c64b45849690561c16423fd344db368f8f2adb2bc83ecd4aeed7f8197dc972f345ca98f4db5b7a250
data/.bundler-version CHANGED
@@ -1 +1 @@
1
- 2.5.9
1
+ 2.6.3
@@ -0,0 +1,15 @@
1
+ version: 2
2
+
3
+ updates:
4
+ - package-ecosystem: "bundler"
5
+ directory: "/"
6
+ schedule:
7
+ interval: "weekly"
8
+ day: "monday"
9
+ time: "08:00"
10
+ timezone: "UTC"
11
+ commit-message:
12
+ prefix: "[dependabot]"
13
+ labels:
14
+ - "automerge"
15
+ - "dependencies"
@@ -1,13 +1,14 @@
1
1
  name: Auto approve dependency upgrades and hot-fix PRs
2
2
  on:
3
3
  pull_request_target:
4
- types: [labeled, unlabeled, edited, ready_for_review, review_requested, auto_merge_enabled]
5
-
4
+ types:
5
+ - labeled
6
+ - ready_for_review
6
7
  jobs:
7
8
  auto-approve:
8
9
  runs-on: ubuntu-latest
9
10
  steps:
10
11
  - uses: hmarr/auto-approve-action@v3
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
+ 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, 'self-approve') || contains(github.event.pull_request.labels.*.name, 'dependencies')
12
13
  with:
13
14
  github-token: "${{ secrets.GITHUB_TOKEN }}"
@@ -1,22 +1,31 @@
1
1
  name: automerge
2
2
  on:
3
+ pull_request_target:
4
+ types:
5
+ - labeled
3
6
  pull_request_review:
4
7
  types:
5
8
  - submitted
6
9
  check_suite:
7
10
  types:
8
11
  - completed
9
- label:
10
- types:
11
- - created
12
12
  status: {}
13
13
  jobs:
14
14
  automerge:
15
15
  runs-on: ubuntu-latest
16
16
  steps:
17
17
  - name: automerge
18
- uses: pascalgn/automerge-action@v0.16.2
18
+ uses: pascalgn/automerge-action@v0.16.4
19
+ env:
20
+ GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
21
+ MERGE_METHOD: squash
22
+ MERGE_DELETE_BRANCH: true
23
+ MERGE_LABELS: "automerge,!automerge blocked"
24
+ - name: automerge-dependencies
25
+ uses: pascalgn/automerge-action@v0.16.4
19
26
  env:
20
27
  GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
21
28
  MERGE_METHOD: squash
22
29
  MERGE_DELETE_BRANCH: true
30
+ MERGE_LABELS: "dependencies,!automerge blocked"
31
+ MERGE_REMOVE_LABELS: ""
@@ -11,7 +11,7 @@ jobs:
11
11
  runs-on: ubuntu-latest
12
12
  strategy:
13
13
  matrix:
14
- ruby-version: [3.2, 3.3]
14
+ ruby-version: [3.3, 3.4]
15
15
 
16
16
  steps:
17
17
  - uses: actions/checkout@v3
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 3.8.0 - 2025-02-05
4
+ - Ruby 3.4 support. Drop ruby 3.2 support.
5
+
6
+ ## 3.7.0 - 2024-11-08
7
+ - use json gem 2.8+ instead of oj
8
+
3
9
  ## 3.6.0 - 2024-04-26
4
10
  - drop ruby 3.1 support
5
11
  - pass context.headers to the http reponse
data/Gemfile.lock CHANGED
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rack-graphql (3.6.0)
4
+ rack-graphql (3.8.0)
5
5
  graphql (~> 2.0)
6
- oj
6
+ json (>= 2.8.0)
7
7
  rack (>= 2.2.6)
8
8
 
9
9
  GEM
@@ -12,72 +12,64 @@ GEM
12
12
  ast (2.4.2)
13
13
  awesome_print (1.9.2)
14
14
  base64 (0.2.0)
15
- bigdecimal (3.1.7)
16
15
  coderay (1.1.3)
17
16
  diff-lcs (1.5.1)
18
- graphql (2.3.1)
17
+ fiber-storage (1.0.0)
18
+ graphql (2.4.9)
19
19
  base64
20
- json (2.7.2)
21
- language_server-protocol (3.17.0.3)
20
+ fiber-storage
21
+ logger
22
+ json (2.9.1)
23
+ language_server-protocol (3.17.0.4)
24
+ logger (1.6.5)
22
25
  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)
26
+ parallel (1.26.3)
27
+ parser (3.3.7.1)
27
28
  ast (~> 2.4.1)
28
29
  racc
29
- pry (0.14.2)
30
+ pry (0.15.2)
30
31
  coderay (~> 1.1)
31
32
  method_source (~> 1.0)
32
- racc (1.7.3)
33
- rack (3.0.10)
34
- rack-test (2.1.0)
33
+ racc (1.8.1)
34
+ rack (3.1.9)
35
+ rack-test (2.2.0)
35
36
  rack (>= 1.3)
36
37
  rainbow (3.1.1)
37
38
  rake (13.2.1)
38
- regexp_parser (2.9.0)
39
- rexml (3.2.6)
39
+ regexp_parser (2.10.0)
40
40
  rspec (3.13.0)
41
41
  rspec-core (~> 3.13.0)
42
42
  rspec-expectations (~> 3.13.0)
43
43
  rspec-mocks (~> 3.13.0)
44
- rspec-core (3.13.0)
44
+ rspec-core (3.13.2)
45
45
  rspec-support (~> 3.13.0)
46
- rspec-expectations (3.13.0)
46
+ rspec-expectations (3.13.3)
47
47
  diff-lcs (>= 1.2.0, < 2.0)
48
48
  rspec-support (~> 3.13.0)
49
- rspec-mocks (3.13.0)
49
+ rspec-mocks (3.13.2)
50
50
  diff-lcs (>= 1.2.0, < 2.0)
51
51
  rspec-support (~> 3.13.0)
52
- rspec-support (3.13.1)
53
- rubocop (1.63.3)
52
+ rspec-support (3.13.2)
53
+ rubocop (1.71.2)
54
54
  json (~> 2.3)
55
55
  language_server-protocol (>= 3.17.0)
56
56
  parallel (~> 1.10)
57
57
  parser (>= 3.3.0.2)
58
58
  rainbow (>= 2.2.2, < 4.0)
59
- regexp_parser (>= 1.8, < 3.0)
60
- rexml (>= 3.2.5, < 4.0)
61
- rubocop-ast (>= 1.31.1, < 2.0)
59
+ regexp_parser (>= 2.9.3, < 3.0)
60
+ rubocop-ast (>= 1.38.0, < 2.0)
62
61
  ruby-progressbar (~> 1.7)
63
- unicode-display_width (>= 2.4.0, < 3.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)
69
- rubocop (~> 1.41)
62
+ unicode-display_width (>= 2.4.0, < 4.0)
63
+ rubocop-ast (1.38.0)
64
+ parser (>= 3.3.1.0)
70
65
  rubocop-rake (0.6.0)
71
66
  rubocop (~> 1.0)
72
- rubocop-rspec (2.29.1)
73
- rubocop (~> 1.40)
74
- rubocop-capybara (~> 2.17)
75
- rubocop-factory_bot (~> 2.22)
76
- rubocop-rspec_rails (~> 2.28)
77
- rubocop-rspec_rails (2.28.3)
78
- rubocop (~> 1.40)
67
+ rubocop-rspec (3.4.0)
68
+ rubocop (~> 1.61)
79
69
  ruby-progressbar (1.13.0)
80
- unicode-display_width (2.5.0)
70
+ unicode-display_width (3.1.4)
71
+ unicode-emoji (~> 4.0, >= 4.0.4)
72
+ unicode-emoji (4.0.4)
81
73
 
82
74
  PLATFORMS
83
75
  aarch64-linux-musl
@@ -101,4 +93,4 @@ DEPENDENCIES
101
93
  rubocop-rspec
102
94
 
103
95
  BUNDLED WITH
104
- 2.5.9
96
+ 2.6.3
@@ -14,7 +14,6 @@ module RackGraphql
14
14
  error_status_code_map: {},
15
15
  request_epilogue: -> {}
16
16
  )
17
-
18
17
  ::Rack::Builder.new do
19
18
  map '/graphql' do
20
19
  run RackGraphql::Middleware.new(
@@ -18,7 +18,7 @@ module RackGraphql
18
18
  end
19
19
 
20
20
  def body
21
- Oj.dump(
21
+ JSON.dump(
22
22
  'status' => 'ok',
23
23
  'request_ip' => request.ip,
24
24
  'app_name' => app_name,
@@ -16,7 +16,6 @@ module RackGraphql
16
16
  error_status_code_map: {},
17
17
  request_epilogue: -> {}
18
18
  )
19
-
20
19
  @schema = schema
21
20
  @app_name = app_name
22
21
  @context_handler = context_handler || ->(_) {}
@@ -55,7 +54,7 @@ module RackGraphql
55
54
  [
56
55
  400,
57
56
  { 'Content-Type' => 'application/json', STATUS_CODE_HEADER_NAME => 400 },
58
- [Oj.dump({})]
57
+ [JSON.dump({})]
59
58
  ]
60
59
  rescue StandardError, LoadError, SyntaxError => e
61
60
  # To respect the graphql spec, all errors need to be returned as json.
@@ -74,7 +73,7 @@ module RackGraphql
74
73
  [
75
74
  status_code,
76
75
  { 'Content-Type' => 'application/json', STATUS_CODE_HEADER_NAME => status_code },
77
- [Oj.dump('errors' => [exception_hash(e)])]
76
+ [JSON.dump('errors' => [exception_hash(e)])]
78
77
  ]
79
78
  ensure
80
79
  request_epilogue.call
@@ -94,8 +93,8 @@ module RackGraphql
94
93
  payload = env['rack.input'].read.to_s
95
94
  return nil if payload.index(NULL_BYTE)
96
95
 
97
- ::Oj.load(payload)
98
- rescue Oj::ParseError
96
+ ::JSON.parse(payload)
97
+ rescue JSON::ParserError
99
98
  nil
100
99
  end
101
100
 
@@ -106,8 +105,8 @@ module RackGraphql
106
105
  return {} if ambiguous_param.empty?
107
106
 
108
107
  begin
109
- ensure_hash(Oj.load(ambiguous_param))
110
- rescue Oj::ParseError
108
+ ensure_hash(JSON.parse(ambiguous_param))
109
+ rescue JSON::ParserError
111
110
  raise AmbiguousParamError, "Unexpected parameter: #{ambiguous_param}"
112
111
  end
113
112
  when Hash
@@ -178,7 +177,7 @@ module RackGraphql
178
177
  else
179
178
  body = result.to_h
180
179
  end
181
- Oj.dump(body)
180
+ JSON.dump(body)
182
181
  end
183
182
 
184
183
  def result_subscription?(result)
@@ -1,3 +1,3 @@
1
1
  module RackGraphql
2
- VERSION = '3.6.0'.freeze
2
+ VERSION = '3.8.0'.freeze
3
3
  end
data/lib/rack_graphql.rb CHANGED
@@ -1,4 +1,4 @@
1
- require 'oj'
1
+ require 'json'
2
2
  require 'rack'
3
3
  require 'graphql'
4
4
 
data/rack-graphql.gemspec CHANGED
@@ -24,9 +24,9 @@ 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.2.0')
27
+ spec.required_ruby_version = Gem::Requirement.new('>= 3.3.0')
28
28
 
29
29
  spec.add_dependency 'graphql', '~> 2.0'
30
- spec.add_dependency 'oj'
30
+ spec.add_dependency 'json', '>= 2.8.0'
31
31
  spec.add_dependency 'rack', '>= 2.2.6'
32
32
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-graphql
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.6.0
4
+ version: 3.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Krzysztof Knapik
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2024-04-26 00:00:00.000000000 Z
10
+ date: 2025-02-05 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: graphql
@@ -25,19 +24,19 @@ dependencies:
25
24
  - !ruby/object:Gem::Version
26
25
  version: '2.0'
27
26
  - !ruby/object:Gem::Dependency
28
- name: oj
27
+ name: json
29
28
  requirement: !ruby/object:Gem::Requirement
30
29
  requirements:
31
30
  - - ">="
32
31
  - !ruby/object:Gem::Version
33
- version: '0'
32
+ version: 2.8.0
34
33
  type: :runtime
35
34
  prerelease: false
36
35
  version_requirements: !ruby/object:Gem::Requirement
37
36
  requirements:
38
37
  - - ">="
39
38
  - !ruby/object:Gem::Version
40
- version: '0'
39
+ version: 2.8.0
41
40
  - !ruby/object:Gem::Dependency
42
41
  name: rack
43
42
  requirement: !ruby/object:Gem::Requirement
@@ -52,7 +51,6 @@ dependencies:
52
51
  - - ">="
53
52
  - !ruby/object:Gem::Version
54
53
  version: 2.2.6
55
- description:
56
54
  email:
57
55
  - knapo@knapo.net
58
56
  executables: []
@@ -65,6 +63,7 @@ files:
65
63
  - ".github/ISSUE_TEMPLATE/config.yml"
66
64
  - ".github/ISSUE_TEMPLATE/story.md"
67
65
  - ".github/PULL_REQUEST_TEMPLATE.md"
66
+ - ".github/dependabot.yml"
68
67
  - ".github/workflows/auto-approve.yml"
69
68
  - ".github/workflows/auto-merge.yml"
70
69
  - ".github/workflows/ci.yml"
@@ -92,7 +91,6 @@ metadata:
92
91
  source_code_uri: https://github.com/RenoFi/rack-graphql
93
92
  changelog_uri: https://github.com/RenoFi/rack-graphql/blob/master/CHANGELOG.md
94
93
  rubygems_mfa_required: 'true'
95
- post_install_message:
96
94
  rdoc_options: []
97
95
  require_paths:
98
96
  - lib
@@ -100,15 +98,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
100
98
  requirements:
101
99
  - - ">="
102
100
  - !ruby/object:Gem::Version
103
- version: 3.2.0
101
+ version: 3.3.0
104
102
  required_rubygems_version: !ruby/object:Gem::Requirement
105
103
  requirements:
106
104
  - - ">="
107
105
  - !ruby/object:Gem::Version
108
106
  version: '0'
109
107
  requirements: []
110
- rubygems_version: 3.5.9
111
- signing_key:
108
+ rubygems_version: 3.6.3
112
109
  specification_version: 4
113
110
  summary: Rack middleware implementing graphql endpoint.
114
111
  test_files: []