rack-graphql 2.7.2 → 2.9.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: ad85b5153fed695fa5a81a301fe3333490bdb8ab4064ea5068d51d1915007267
4
- data.tar.gz: c8b8ba9d4e0e23d3c629bf7d6414e6c7208750b75ae9ac2056f669f46afacfdd
3
+ metadata.gz: 251002131237d4b74b73b4d5883777dc6137ea5380503f7484d9b98b33b1a5a7
4
+ data.tar.gz: c972bb57b9ceef6f3d20fbe57f6031913b9ae1713b4195c50d58146b1164a332
5
5
  SHA512:
6
- metadata.gz: 6facfa29cc5605ec94a876b1c2085a1c9c701e851e38d1d4a99fcf7e621814471763e82b1793d4670c7c4d7b05e2559b8a846a211054a6323804111f7b63dd24
7
- data.tar.gz: 3e4a84e3752823947acf281d02544bdff29878e580f3441f7f391e65f578bdc92cc2b146535301163fdb2862f5b6a1cb169258041e3ad189c261adfa4b22d141
6
+ metadata.gz: b3ab99b76e86c7d051210883cf05b35a503c1b27b1770adad2863c42cc55add4111e00542ced9b2cc47c1416f86e283563d104054507919d3d1276901828b19b
7
+ data.tar.gz: 41d0b7e70efe5f7c0f4b7b38ca3236ece29cfccbdb36111784c40c8d97ed6f0f062e5277c2ae7e910948d9446463f8932e8105404735fd809311353ceb967cc9
data/.bundler-version CHANGED
@@ -1 +1 @@
1
- 2.3.5
1
+ 2.3.10
@@ -2,9 +2,7 @@
2
2
  # this will allow Dependabot to automatically merge dependency update PRs where CI passes
3
3
  # from: https://github.com/hmarr/auto-approve-action
4
4
  name: Auto approve dependency upgrades PRs
5
-
6
- on:
7
- pull_request
5
+ on: pull_request_target
8
6
 
9
7
  jobs:
10
8
  auto-approve:
@@ -11,7 +11,7 @@ jobs:
11
11
  runs-on: ubuntu-latest
12
12
  strategy:
13
13
  matrix:
14
- ruby-version: ['3.0']
14
+ ruby-version: ['3.0', 3.1]
15
15
 
16
16
  steps:
17
17
  - uses: actions/checkout@v2
@@ -19,7 +19,7 @@ jobs:
19
19
  # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
20
20
  # change this to (see https://github.com/ruby/setup-ruby#versioning):
21
21
  # uses: ruby/setup-ruby@v1
22
- uses: ruby/setup-ruby@473e4d8fe5dd94ee328fdfca9f8c9c7afc9dae5e
22
+ uses: ruby/setup-ruby@bd94d6a504586da892a5753afdd1480096ed30df
23
23
  with:
24
24
  ruby-version: ${{ matrix.ruby-version }}
25
25
  bundler-cache: true # runs 'bundle install' and caches installed gems automatically
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 2.9.1 - 2022-04-02
4
+
5
+ - Test against ruby 3.1
6
+
7
+ ## 2.9.0 - 2022-03-14
8
+
9
+ - Drop graphql 1.x support
10
+
11
+ ## 2.8.0 - 2022-03-14
12
+
13
+ - Add ability to provide app run on root path
14
+
15
+ ## 2.7.3 - 2022-01-18
16
+
17
+ - Drop ruby 2.x support (3.0.0 is a minimal version)
18
+
3
19
  ## 2.7.0 - 2021-03-24
4
20
 
5
21
  - Add ability to skip setting up health endpoint on root path with `health_on_root_path` option.
data/Gemfile.lock CHANGED
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rack-graphql (2.7.2)
5
- graphql (~> 1.12)
4
+ rack-graphql (2.9.1)
5
+ graphql (~> 2.0)
6
6
  oj
7
7
  rack (~> 2.2)
8
8
 
@@ -13,11 +13,11 @@ GEM
13
13
  awesome_print (1.9.2)
14
14
  coderay (1.1.3)
15
15
  diff-lcs (1.5.0)
16
- graphql (1.13.4)
16
+ graphql (2.0.5)
17
17
  method_source (1.0.0)
18
18
  oj (3.13.11)
19
- parallel (1.21.0)
20
- parser (3.1.0.0)
19
+ parallel (1.22.1)
20
+ parser (3.1.1.0)
21
21
  ast (~> 2.4.1)
22
22
  pry (0.14.1)
23
23
  coderay (~> 1.1)
@@ -27,35 +27,35 @@ GEM
27
27
  rack (>= 1.0, < 3)
28
28
  rainbow (3.1.1)
29
29
  rake (13.0.6)
30
- regexp_parser (2.2.0)
30
+ regexp_parser (2.2.1)
31
31
  rexml (3.2.5)
32
- rspec (3.10.0)
33
- rspec-core (~> 3.10.0)
34
- rspec-expectations (~> 3.10.0)
35
- rspec-mocks (~> 3.10.0)
36
- rspec-core (3.10.1)
37
- rspec-support (~> 3.10.0)
38
- rspec-expectations (3.10.1)
32
+ rspec (3.11.0)
33
+ rspec-core (~> 3.11.0)
34
+ rspec-expectations (~> 3.11.0)
35
+ rspec-mocks (~> 3.11.0)
36
+ rspec-core (3.11.0)
37
+ rspec-support (~> 3.11.0)
38
+ rspec-expectations (3.11.0)
39
39
  diff-lcs (>= 1.2.0, < 2.0)
40
- rspec-support (~> 3.10.0)
41
- rspec-mocks (3.10.2)
40
+ rspec-support (~> 3.11.0)
41
+ rspec-mocks (3.11.1)
42
42
  diff-lcs (>= 1.2.0, < 2.0)
43
- rspec-support (~> 3.10.0)
44
- rspec-support (3.10.3)
45
- rubocop (1.24.1)
43
+ rspec-support (~> 3.11.0)
44
+ rspec-support (3.11.0)
45
+ rubocop (1.26.1)
46
46
  parallel (~> 1.10)
47
- parser (>= 3.0.0.0)
47
+ parser (>= 3.1.0.0)
48
48
  rainbow (>= 2.2.2, < 4.0)
49
49
  regexp_parser (>= 1.8, < 3.0)
50
50
  rexml
51
- rubocop-ast (>= 1.15.1, < 2.0)
51
+ rubocop-ast (>= 1.16.0, < 2.0)
52
52
  ruby-progressbar (~> 1.7)
53
53
  unicode-display_width (>= 1.4.0, < 3.0)
54
- rubocop-ast (1.15.1)
55
- parser (>= 3.0.1.1)
54
+ rubocop-ast (1.16.0)
55
+ parser (>= 3.1.1.0)
56
56
  rubocop-rake (0.6.0)
57
57
  rubocop (~> 1.0)
58
- rubocop-rspec (2.7.0)
58
+ rubocop-rspec (2.9.0)
59
59
  rubocop (~> 1.19)
60
60
  ruby-progressbar (1.11.0)
61
61
  unicode-display_width (2.1.0)
@@ -81,4 +81,4 @@ DEPENDENCIES
81
81
  rubocop-rspec
82
82
 
83
83
  BUNDLED WITH
84
- 2.3.5
84
+ 2.3.10
data/README.md CHANGED
@@ -30,6 +30,7 @@ run RackGraphql::Application.call(
30
30
  # `true` when `RACK_GRAPHQL_LOG_EXCEPTION_BACKTRACE` env var is set to `'1'` or `'true'`
31
31
  health_route: true, # optional, true by default
32
32
  health_on_root_path: health_route, # optional, health_route value by default (mind map '/' is covering '/any/path-123')
33
+ root_path_app: YourDashboardApp, # optional
33
34
  logger: A9n.logger, # optional, not set by default
34
35
  error_status_code_map: { IamTeapotError => 418 }, # optional
35
36
  re_raise_exceptions: true, # optional, false by default
@@ -10,6 +10,7 @@ module RackGraphql
10
10
  health_route: true,
11
11
  health_response_builder: RackGraphql::HealthResponseBuilder,
12
12
  health_on_root_path: health_route,
13
+ root_path_app: nil,
13
14
  error_status_code_map: {}
14
15
  )
15
16
 
@@ -36,7 +37,11 @@ module RackGraphql
36
37
  end
37
38
  end
38
39
 
39
- if health_on_root_path
40
+ if root_path_app
41
+ map '/' do
42
+ run root_path_app
43
+ end
44
+ elsif health_on_root_path
40
45
  map '/' do
41
46
  run ->(env) { health_response_builder.new(app_name: app_name, env: env).build }
42
47
  end
@@ -70,10 +70,7 @@ module RackGraphql
70
70
  [Oj.dump('errors' => [exception_hash(e)])]
71
71
  ]
72
72
  ensure
73
- if defined?(ActiveRecord::Base)
74
- ActiveRecord::Base.clear_active_connections!
75
- ActiveRecord::Base.flush_idle_connections!
76
- end
73
+ ActiveRecord::Base.clear_active_connections! if defined?(ActiveRecord::Base)
77
74
  end
78
75
 
79
76
  private
@@ -1,3 +1,3 @@
1
1
  module RackGraphql
2
- VERSION = '2.7.2'.freeze
2
+ VERSION = '2.9.1'.freeze
3
3
  end
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 = '>= 2.6'
27
+ spec.required_ruby_version = '>= 3.0'
28
28
 
29
- spec.add_dependency 'graphql', '~> 1.12'
29
+ spec.add_dependency 'graphql', '~> 2.0'
30
30
  spec.add_dependency 'oj'
31
31
  spec.add_dependency 'rack', '~> 2.2'
32
32
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-graphql
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.2
4
+ version: 2.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Krzysztof Knapik
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2022-01-13 00:00:00.000000000 Z
12
+ date: 2022-04-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: graphql
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: '1.12'
20
+ version: '2.0'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - "~>"
26
26
  - !ruby/object:Gem::Version
27
- version: '1.12'
27
+ version: '2.0'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: oj
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -228,7 +228,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
228
228
  requirements:
229
229
  - - ">="
230
230
  - !ruby/object:Gem::Version
231
- version: '2.6'
231
+ version: '3.0'
232
232
  required_rubygems_version: !ruby/object:Gem::Requirement
233
233
  requirements:
234
234
  - - ">="