Skip to content

Commit

Permalink
Deprecate old ruby and gql versions
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitryTsepelev committed Aug 3, 2024
1 parent 086fce0 commit 986ede6
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 38 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/rspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,12 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: [2.7, '3.0', 3.1, 3.2, 3.3]
ruby: ['3.0', 3.1, 3.2, 3.3]
gemfile: [
"gemfiles/graphql_1_12_0.gemfile",
"gemfiles/graphql_1_12_4.gemfile",
"gemfiles/graphql_1_13_7.gemfile",
"gemfiles/graphql_1_13_16.gemfile",
"gemfiles/graphql_2_1_0.gemfile",
"gemfiles/graphql_2_2_5.gemfile",
"gemfiles/graphql_master.gemfile"
"gemfiles/graphql_2_3_11.gemfile",
"gemfiles/graphql_master.gemfile",
]

steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ jobs:
ruby-version: 2.7
- name: Lint Ruby code with RuboCop
run: |
bundle install --gemfile gemfiles/graphql_1_12_0.gemfile --jobs 4 --retry 3
bundle exec --gemfile gemfiles/graphql_1_12_0.gemfile rubocop
bundle install --gemfile gemfiles/graphql_2_0_0.gemfile --jobs 4 --retry 3
bundle exec --gemfile gemfiles/graphql_2_0_0.gemfile rubocop
5 changes: 0 additions & 5 deletions gemfiles/graphql_1_12_4.gemfile

This file was deleted.

5 changes: 0 additions & 5 deletions gemfiles/graphql_1_13_16.gemfile

This file was deleted.

5 changes: 0 additions & 5 deletions gemfiles/graphql_1_13_7.gemfile

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
source "https://rubygems.org"

gem "graphql", "~> 1.12.0"
gem "graphql", "~> 2.3.11"

gemspec path: "../"
2 changes: 1 addition & 1 deletion graphql-persisted_queries.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Gem::Specification.new do |spec|

spec.required_ruby_version = ">= 2.7"

spec.add_dependency "graphql", ">= 1.12"
spec.add_dependency "graphql", ">= 2.0"

spec.add_development_dependency "rspec", "~> 3.9"
spec.add_development_dependency "rake", ">= 10.0"
Expand Down
17 changes: 4 additions & 13 deletions lib/graphql/persisted_queries/schema_patch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,10 @@ def hash_generator_proc
end

def verify_http_method=(verify)
query_analyzer(prepare_analyzer) if verify
return unless verify

require "graphql/persisted_queries/analyzers/http_method_ast_analyzer"
query_analyzer(Analyzers::HttpMethodAstAnalyzer)
end

def persisted_queries_tracing_enabled?
Expand All @@ -93,18 +96,6 @@ def tracer(name)
persisted_query_store.tracers = tracers if persisted_queries_tracing_enabled?
end
end

private

def prepare_analyzer
if using_ast_analysis?
require "graphql/persisted_queries/analyzers/http_method_ast_analyzer"
Analyzers::HttpMethodAstAnalyzer
else
require "graphql/persisted_queries/analyzers/http_method_analyzer"
Analyzers::HttpMethodAnalyzer.new
end
end
end
end
end

0 comments on commit 986ede6

Please sign in to comment.