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 fe7a78c
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 38 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/rspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,18 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: [2.7, '3.0', 3.1, 3.2, 3.3]
ruby: [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",
]
exclude:
- ruby: "3.1"
gemfile: gemfiles/graphql_2_3_11.gemfile
- ruby: "3.1"
gemfile: gemfiles/graphql_master.gemfile

steps:
- uses: actions/checkout@v2
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## master

- [PR#79](https://github.com/DmitryTsepelev/graphql-ruby-persisted_queries/pull/79)
Deprecate old ruby and gql versions ([@DmitryTsepelev][])
- [PR#78](https://github.com/DmitryTsepelev/graphql-ruby-persisted_queries/pull/78)
Migrate CompiledQueries instrumentation to tracer ([@DmitryTsepelev][])

Expand Down
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 fe7a78c

Please sign in to comment.