rack-graphql 3.6.0 → 3.7.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: 1d2c1ea90ede4e54c5a5489a0851427ad9b09d6413793cbc3af0be433fd04ccf
4
+ data.tar.gz: f7ba119713fd428a0f38acd2d1d62d197f03d74179e4e7e8cb2f29d5735c106f
5
5
  SHA512:
6
- metadata.gz: 011405a88de241e90a2eb6e1408c998dd17898c28519fa963495ae4d824b61cfe536e89d11c610a6b4eeafb455b20d0e2f985af18c7802f3729e6a1047479f54
7
- data.tar.gz: 40bfbc8a432baa9d22b13b88cc4262d33c36043a245060d71ca879b34c2e9a7731d65b5afd77787445534636fa7f3407cecb7c465e230a7f877b408745dc1b80
6
+ metadata.gz: 677849f32a33ee3b09fe3bbb43df14b5c5f838995401696a80870b590e02d51c2e9040eee1d0c3ede91915db1fe72723ffef89a23a888134ec1e1c5e59cf757d
7
+ data.tar.gz: 1bb0f2c112fe088d46be05d4d8b766917e239f8924aa8b1a3b81f8f213e2340772f669413245b313590f68c5fae373a0105325b30d908d93edc25bfe3173c858
data/.bundler-version CHANGED
@@ -1 +1 @@
1
- 2.5.9
1
+ 2.5.23
@@ -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: ""
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 3.7.0 - 2024-11-08
4
+ - use json gem 2.8+ instead of oj
5
+
3
6
  ## 3.6.0 - 2024-04-26
4
7
  - drop ruby 3.1 support
5
8
  - 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.7.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,60 @@ 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.2)
19
19
  base64
20
- json (2.7.2)
20
+ fiber-storage
21
+ json (2.8.1)
21
22
  language_server-protocol (3.17.0.3)
22
23
  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
+ parallel (1.26.3)
25
+ parser (3.3.6.0)
27
26
  ast (~> 2.4.1)
28
27
  racc
29
28
  pry (0.14.2)
30
29
  coderay (~> 1.1)
31
30
  method_source (~> 1.0)
32
- racc (1.7.3)
33
- rack (3.0.10)
31
+ racc (1.8.1)
32
+ rack (3.1.8)
34
33
  rack-test (2.1.0)
35
34
  rack (>= 1.3)
36
35
  rainbow (3.1.1)
37
36
  rake (13.2.1)
38
- regexp_parser (2.9.0)
39
- rexml (3.2.6)
37
+ regexp_parser (2.9.2)
40
38
  rspec (3.13.0)
41
39
  rspec-core (~> 3.13.0)
42
40
  rspec-expectations (~> 3.13.0)
43
41
  rspec-mocks (~> 3.13.0)
44
- rspec-core (3.13.0)
42
+ rspec-core (3.13.2)
45
43
  rspec-support (~> 3.13.0)
46
- rspec-expectations (3.13.0)
44
+ rspec-expectations (3.13.3)
47
45
  diff-lcs (>= 1.2.0, < 2.0)
48
46
  rspec-support (~> 3.13.0)
49
- rspec-mocks (3.13.0)
47
+ rspec-mocks (3.13.2)
50
48
  diff-lcs (>= 1.2.0, < 2.0)
51
49
  rspec-support (~> 3.13.0)
52
50
  rspec-support (3.13.1)
53
- rubocop (1.63.3)
51
+ rubocop (1.68.0)
54
52
  json (~> 2.3)
55
53
  language_server-protocol (>= 3.17.0)
56
54
  parallel (~> 1.10)
57
55
  parser (>= 3.3.0.2)
58
56
  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)
57
+ regexp_parser (>= 2.4, < 3.0)
58
+ rubocop-ast (>= 1.32.2, < 2.0)
62
59
  ruby-progressbar (~> 1.7)
63
60
  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)
61
+ rubocop-ast (1.34.1)
62
+ parser (>= 3.3.1.0)
70
63
  rubocop-rake (0.6.0)
71
64
  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)
65
+ rubocop-rspec (3.2.0)
66
+ rubocop (~> 1.61)
79
67
  ruby-progressbar (1.13.0)
80
- unicode-display_width (2.5.0)
68
+ unicode-display_width (2.6.0)
81
69
 
82
70
  PLATFORMS
83
71
  aarch64-linux-musl
@@ -101,4 +89,4 @@ DEPENDENCIES
101
89
  rubocop-rspec
102
90
 
103
91
  BUNDLED WITH
104
- 2.5.9
92
+ 2.5.23
@@ -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,
@@ -55,7 +55,7 @@ module RackGraphql
55
55
  [
56
56
  400,
57
57
  { 'Content-Type' => 'application/json', STATUS_CODE_HEADER_NAME => 400 },
58
- [Oj.dump({})]
58
+ [JSON.dump({})]
59
59
  ]
60
60
  rescue StandardError, LoadError, SyntaxError => e
61
61
  # To respect the graphql spec, all errors need to be returned as json.
@@ -74,7 +74,7 @@ module RackGraphql
74
74
  [
75
75
  status_code,
76
76
  { 'Content-Type' => 'application/json', STATUS_CODE_HEADER_NAME => status_code },
77
- [Oj.dump('errors' => [exception_hash(e)])]
77
+ [JSON.dump('errors' => [exception_hash(e)])]
78
78
  ]
79
79
  ensure
80
80
  request_epilogue.call
@@ -94,8 +94,8 @@ module RackGraphql
94
94
  payload = env['rack.input'].read.to_s
95
95
  return nil if payload.index(NULL_BYTE)
96
96
 
97
- ::Oj.load(payload)
98
- rescue Oj::ParseError
97
+ ::JSON.parse(payload)
98
+ rescue JSON::ParserError
99
99
  nil
100
100
  end
101
101
 
@@ -106,8 +106,8 @@ module RackGraphql
106
106
  return {} if ambiguous_param.empty?
107
107
 
108
108
  begin
109
- ensure_hash(Oj.load(ambiguous_param))
110
- rescue Oj::ParseError
109
+ ensure_hash(JSON.parse(ambiguous_param))
110
+ rescue JSON::ParserError
111
111
  raise AmbiguousParamError, "Unexpected parameter: #{ambiguous_param}"
112
112
  end
113
113
  when Hash
@@ -178,7 +178,7 @@ module RackGraphql
178
178
  else
179
179
  body = result.to_h
180
180
  end
181
- Oj.dump(body)
181
+ JSON.dump(body)
182
182
  end
183
183
 
184
184
  def result_subscription?(result)
@@ -1,3 +1,3 @@
1
1
  module RackGraphql
2
- VERSION = '3.6.0'.freeze
2
+ VERSION = '3.7.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
@@ -27,6 +27,6 @@ Gem::Specification.new do |spec|
27
27
  spec.required_ruby_version = Gem::Requirement.new('>= 3.2.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,14 @@
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.7.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-04-26 00:00:00.000000000 Z
11
+ date: 2024-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: graphql
@@ -25,19 +25,19 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '2.0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: oj
28
+ name: json
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: 2.8.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: 2.8.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rack
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -65,6 +65,7 @@ files:
65
65
  - ".github/ISSUE_TEMPLATE/config.yml"
66
66
  - ".github/ISSUE_TEMPLATE/story.md"
67
67
  - ".github/PULL_REQUEST_TEMPLATE.md"
68
+ - ".github/dependabot.yml"
68
69
  - ".github/workflows/auto-approve.yml"
69
70
  - ".github/workflows/auto-merge.yml"
70
71
  - ".github/workflows/ci.yml"
@@ -107,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
107
108
  - !ruby/object:Gem::Version
108
109
  version: '0'
109
110
  requirements: []
110
- rubygems_version: 3.5.9
111
+ rubygems_version: 3.5.23
111
112
  signing_key:
112
113
  specification_version: 4
113
114
  summary: Rack middleware implementing graphql endpoint.