From 2c545ce85e345de9cc04ec917ac942078674d3e5 Mon Sep 17 00:00:00 2001 From: David Silveira Date: Fri, 3 Feb 2023 15:25:48 -0300 Subject: [PATCH 1/2] Update rails from 5 to 6 --- Gemfile | 6 +++--- graphql-auth.gemspec | 14 +++++++------- spec/dummy/app/assets/config/manifest.js | 0 spec/dummy/app/graphql/graphql_schema.rb | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) create mode 100644 spec/dummy/app/assets/config/manifest.js diff --git a/Gemfile b/Gemfile index 1a49130..7503d7f 100644 --- a/Gemfile +++ b/Gemfile @@ -2,9 +2,9 @@ source 'https://rubygems.org' gem 'byebug' -gem 'rails', '~> 5.2' +gem 'rails', '~> 6.1' -gem 'graphql', '~> 1.9.6' +gem 'graphql', '~> 2.0.16' # Specify your gem's dependencies in graphql-auth.gemspec -gemspec \ No newline at end of file +gemspec diff --git a/graphql-auth.gemspec b/graphql-auth.gemspec index 2941f9e..54d50c5 100644 --- a/graphql-auth.gemspec +++ b/graphql-auth.gemspec @@ -15,16 +15,16 @@ Gem::Specification.new do |spec| spec.files = Dir["{app,config,db,lib}/**/*", "MIT-LICENSE", "Rakefile", "README.md", "CHANGELOG.md"] - spec.required_ruby_version = '>= 2.4.5' + spec.required_ruby_version = '>= 2.6' - spec.add_dependency "rails", "~> 5.1" - spec.add_dependency 'graphql', '~> 1.9', '>= 1.9.6' + spec.add_dependency "rails", "~> 6.1" + spec.add_dependency 'graphql', '~> 2.0', '>= 2.0.16' spec.add_dependency 'devise', '~> 4.6', '>= 4.6.2' - spec.add_dependency 'jwt', '~> 1.5' + spec.add_dependency 'jwt', '~> 2.7' - spec.add_development_dependency 'sqlite3', '~> 1.3.6' + spec.add_development_dependency 'sqlite3', '~> 1.6' spec.add_development_dependency 'bundler', '~> 2.0' - spec.add_development_dependency 'rake', '~> 10.0' + spec.add_development_dependency 'rake', '~> 13.0' spec.add_development_dependency 'rspec', '~> 3.0' spec.add_development_dependency 'database_cleaner' -end \ No newline at end of file +end diff --git a/spec/dummy/app/assets/config/manifest.js b/spec/dummy/app/assets/config/manifest.js new file mode 100644 index 0000000..e69de29 diff --git a/spec/dummy/app/graphql/graphql_schema.rb b/spec/dummy/app/graphql/graphql_schema.rb index 39d1556..d090815 100644 --- a/spec/dummy/app/graphql/graphql_schema.rb +++ b/spec/dummy/app/graphql/graphql_schema.rb @@ -2,7 +2,7 @@ class GraphqlSchema < GraphQL::Schema mutation Types::MutationType - query Types::QueryType + #query Types::QueryType end -GraphqlSchema.graphql_definition +#GraphqlSchema.graphql_definition From 93a375aac4dab4d0ade31b7d7879441a13d53d92 Mon Sep 17 00:00:00 2001 From: David Silveira Date: Fri, 3 Feb 2023 15:42:13 -0300 Subject: [PATCH 2/2] Update Rails from 6 to 7 --- Gemfile | 2 +- graphql-auth.gemspec | 4 ++-- lib/graphql-auth/engine.rb | 4 ++-- spec/dummy/config/initializers/assets.rb | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Gemfile b/Gemfile index 7503d7f..250fd75 100644 --- a/Gemfile +++ b/Gemfile @@ -2,7 +2,7 @@ source 'https://rubygems.org' gem 'byebug' -gem 'rails', '~> 6.1' +gem 'rails', '~> 7.0' gem 'graphql', '~> 2.0.16' diff --git a/graphql-auth.gemspec b/graphql-auth.gemspec index 54d50c5..4ee0dd4 100644 --- a/graphql-auth.gemspec +++ b/graphql-auth.gemspec @@ -15,9 +15,9 @@ Gem::Specification.new do |spec| spec.files = Dir["{app,config,db,lib}/**/*", "MIT-LICENSE", "Rakefile", "README.md", "CHANGELOG.md"] - spec.required_ruby_version = '>= 2.6' + spec.required_ruby_version = '>= 3.2' - spec.add_dependency "rails", "~> 6.1" + spec.add_dependency "rails", "~> 7.0", '>= 7.0.4.2' spec.add_dependency 'graphql', '~> 2.0', '>= 2.0.16' spec.add_dependency 'devise', '~> 4.6', '>= 4.6.2' spec.add_dependency 'jwt', '~> 2.7' diff --git a/lib/graphql-auth/engine.rb b/lib/graphql-auth/engine.rb index d85710c..67be5bc 100644 --- a/lib/graphql-auth/engine.rb +++ b/lib/graphql-auth/engine.rb @@ -3,7 +3,7 @@ module Auth class Engine < ::Rails::Engine isolate_namespace GraphQL::Auth - config.autoload_paths += Dir["#{config.root}/app/**/"] + config.autoload_paths += Dir["#{config.root}/app/**/*.rb"] end end -end \ No newline at end of file +end diff --git a/spec/dummy/config/initializers/assets.rb b/spec/dummy/config/initializers/assets.rb index 4b828e8..e4354f2 100644 --- a/spec/dummy/config/initializers/assets.rb +++ b/spec/dummy/config/initializers/assets.rb @@ -1,12 +1,12 @@ # Be sure to restart your server when you modify this file. # Version of your assets, change this if you want to expire all your assets. -Rails.application.config.assets.version = '1.0' +# Rails.application.config.assets.version = '1.0' # Add additional assets to the asset load path. # Rails.application.config.assets.paths << Emoji.images_path # Add Yarn node_modules folder to the asset load path. -Rails.application.config.assets.paths << Rails.root.join('node_modules') +# Rails.application.config.assets.paths << Rails.root.join('node_modules') # Precompile additional assets. # application.js, application.css, and all non-JS/CSS in the app/assets