Skip to content

Commit 8cd47d4

Browse files
committed
Conditionally add fiber-storage dependency for Ruby < 3.2
1 parent c503d8e commit 8cd47d4

File tree

5 files changed

+3
-6
lines changed

5 files changed

+3
-6
lines changed

gemfiles/mongoid_8.gemfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ gem "mongoid", "~> 8.0"
1111
gem "libev_scheduler"
1212
gem "evt"
1313
gem "async"
14-
gem "fiber-storage"
1514
gem "concurrent-ruby", "1.3.4"
1615

1716
gemspec path: "../"

gemfiles/mongoid_9.gemfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@ gem "mongoid", "~> 9.0"
1010
gem "libev_scheduler"
1111
gem "evt"
1212
gem "async"
13-
gem "fiber-storage"
1413

1514
gemspec path: "../"

graphql.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Gem::Specification.new do |s|
2626
s.files = Dir["{lib}/**/*", "MIT-LICENSE", "readme.md", ".yardopts"]
2727

2828
s.add_runtime_dependency "base64"
29-
s.add_runtime_dependency "fiber-storage"
29+
s.add_runtime_dependency "fiber-storage" if RUBY_VERSION < "3.2.0"
3030
s.add_runtime_dependency "logger"
3131

3232
s.add_development_dependency "benchmark-ips"

lib/graphql.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
require "set"
55
require "singleton"
66
require "forwardable"
7-
require "fiber/storage"
7+
require "fiber/storage" if RUBY_VERSION < "3.2.0"
88
require "graphql/autoload"
99

1010
module GraphQL

spec/graphql_spec.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
describe GraphQL do
66
it "loads without warnings" do
7-
stderr_and_stdout, _status = Open3.capture2e(%|ruby -Ilib -e "require 'bundler/inline'; gemfile(true, quiet: true) { source('https://rubygems.org'); gem('fiber-storage'); gem('graphql', path: './') }; GraphQL.eager_load!"|)
7+
stderr_and_stdout, _status = Open3.capture2e(%|ruby -Ilib -e "require 'bundler/inline'; gemfile(true, quiet: true) { source('https://rubygems.org'); gem('graphql', path: './') }; GraphQL.eager_load!"|)
88
assert_equal "", stderr_and_stdout
99
end
1010

@@ -18,7 +18,6 @@ module Rails
1818
gemfile(true, quiet: true) do
1919
source('https://rubygems.org')
2020
gem 'graphql', path: './'
21-
gem 'fiber-storage'
2221
end
2322
2423
class MySchema < GraphQL::Schema

0 commit comments

Comments
 (0)