From c5c11f92df3555ee285e41c13f6cf2c67c2864fb Mon Sep 17 00:00:00 2001 From: a-chacon Date: Fri, 11 Oct 2024 09:40:44 -0300 Subject: [PATCH 1/6] fix: remove gemspec rails 7 dependency. So the Engine could be used with all rails versions. --- .github/workflows/rubyonrails.yml | 2 +- Gemfile | 2 ++ oas_rails.gemspec | 3 +-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/rubyonrails.yml b/.github/workflows/rubyonrails.yml index 6a1dc46..c37f826 100644 --- a/.github/workflows/rubyonrails.yml +++ b/.github/workflows/rubyonrails.yml @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: false matrix: - gemfile: [rails-7.0, rails-7.1, rails-7.2] + gemfile: [rails-7.0, rails-7.1, rails-7.2, rails-8.0.0-beta1] runs-on: ubuntu-latest env: RAILS_ENV: test diff --git a/Gemfile b/Gemfile index f9a74d8..6868ebb 100644 --- a/Gemfile +++ b/Gemfile @@ -12,6 +12,8 @@ gem 'sprockets-rails' gem 'rack-cors' +gem 'rails', '~> 7.0' + group :development, :test do gem "rubocop" diff --git a/oas_rails.gemspec b/oas_rails.gemspec index dbaeff0..8afbbe2 100644 --- a/oas_rails.gemspec +++ b/oas_rails.gemspec @@ -23,7 +23,6 @@ Gem::Specification.new do |spec| spec.required_ruby_version = ">= 3.1" spec.add_dependency 'method_source', '~> 1.0' - spec.add_dependency 'model-to-schema', '~> 0.1.1' # Esquema - spec.add_dependency 'rails', '~> 7.0' + spec.add_dependency 'model-to-schema', '~> 0.1.2' # Esquema spec.add_dependency 'yard', '~> 0.9' end From 5c6637c4c3b38e278358cd242b1f1a8ae37d8392 Mon Sep 17 00:00:00 2001 From: a-chacon Date: Fri, 11 Oct 2024 09:44:17 -0300 Subject: [PATCH 2/6] fix: include gemfile for test 8 beta --- gemfiles/rails-7.0.gemfile | 2 +- gemfiles/rails-7.1.gemfile | 2 +- gemfiles/rails-7.2.gemfile | 2 +- gemfiles/rails-8.0.0-beta1.gemfile | 28 ++++++++++++++++++++++++++++ 4 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 gemfiles/rails-8.0.0-beta1.gemfile diff --git a/gemfiles/rails-7.0.gemfile b/gemfiles/rails-7.0.gemfile index 25f9194..345eae3 100644 --- a/gemfiles/rails-7.0.gemfile +++ b/gemfiles/rails-7.0.gemfile @@ -3,7 +3,7 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" } gem 'rails', '~> 7.0.0' -gem 'model-to-schema', '~> 0.1.0' +gem 'model-to-schema', '~> 0.1.2' gem 'method_source', '~> 1.0' diff --git a/gemfiles/rails-7.1.gemfile b/gemfiles/rails-7.1.gemfile index e588a32..1eba093 100644 --- a/gemfiles/rails-7.1.gemfile +++ b/gemfiles/rails-7.1.gemfile @@ -3,7 +3,7 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" } gem 'rails', '~> 7.1.0' -gem 'model-to-schema', '~> 0.1.0' +gem 'model-to-schema', '~> 0.1.2' gem 'method_source', '~> 1.0' diff --git a/gemfiles/rails-7.2.gemfile b/gemfiles/rails-7.2.gemfile index f0321f3..a06a381 100644 --- a/gemfiles/rails-7.2.gemfile +++ b/gemfiles/rails-7.2.gemfile @@ -3,7 +3,7 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" } gem 'rails', '~> 7.2.0' -gem 'model-to-schema', '~> 0.1.0' +gem 'model-to-schema', '~> 0.1.2' gem 'method_source', '~> 1.0' diff --git a/gemfiles/rails-8.0.0-beta1.gemfile b/gemfiles/rails-8.0.0-beta1.gemfile new file mode 100644 index 0000000..8c6ea64 --- /dev/null +++ b/gemfiles/rails-8.0.0-beta1.gemfile @@ -0,0 +1,28 @@ +source 'https://rubygems.org' +git_source(:github) { |repo| "https://github.com/#{repo}.git" } + +gem 'rails', '~> 8.0.0-beta1' + +gem 'model-to-schema', '~> 0.1.2' + +gem 'method_source', '~> 1.0' + +gem 'yard', '~> 0.9' + +gem 'puma' + +gem 'sqlite3', "~> 1.4" + +gem 'sprockets-rails' + +gem 'rack-cors' + +group :development, :test do + gem "bcrypt", "~> 3.1.7" + + gem 'factory_bot_rails' + + gem 'jwt' + + gem 'faker' +end From 20c12e8575dbd60481fe2ebfd3a97b8a53cdd927 Mon Sep 17 00:00:00 2001 From: a-chacon Date: Fri, 11 Oct 2024 09:45:17 -0300 Subject: [PATCH 3/6] chore: update dependencies --- Gemfile.lock | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index fc37bc7..84e817a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -3,8 +3,7 @@ PATH specs: oas_rails (0.8.1) method_source (~> 1.0) - model-to-schema (~> 0.1.1) - rails (~> 7.0) + model-to-schema (~> 0.1.2) yard (~> 0.9) GEM @@ -110,7 +109,7 @@ GEM rdoc (>= 4.0.0) reline (>= 0.4.2) json (2.7.2) - jwt (2.9.1) + jwt (2.9.3) base64 language_server-protocol (3.17.0.3) logger (1.6.1) @@ -126,8 +125,7 @@ GEM method_source (1.1.0) mini_mime (1.1.5) minitest (5.25.1) - model-to-schema (0.1.1) - activerecord (~> 7.0) + model-to-schema (0.1.2) net-imap (0.4.16) date net-protocol @@ -244,7 +242,7 @@ GEM websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) yard (0.9.37) - zeitwerk (2.6.18) + zeitwerk (2.7.0) PLATFORMS aarch64-linux @@ -263,6 +261,7 @@ DEPENDENCIES oas_rails! puma rack-cors + rails (~> 7.0) rubocop sprockets-rails sqlite3 (~> 1.4) From 83e917697b14e542a86e37807b1388640ea85924 Mon Sep 17 00:00:00 2001 From: a-chacon Date: Fri, 11 Oct 2024 09:48:08 -0300 Subject: [PATCH 4/6] fix: deploy gem version rails --- gemfiles/rails-8.0.0-beta1.gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gemfiles/rails-8.0.0-beta1.gemfile b/gemfiles/rails-8.0.0-beta1.gemfile index 8c6ea64..2c7372a 100644 --- a/gemfiles/rails-8.0.0-beta1.gemfile +++ b/gemfiles/rails-8.0.0-beta1.gemfile @@ -1,7 +1,7 @@ source 'https://rubygems.org' git_source(:github) { |repo| "https://github.com/#{repo}.git" } -gem 'rails', '~> 8.0.0-beta1' +gem 'rails', '~> 8.0.0.beta1' gem 'model-to-schema', '~> 0.1.2' From 162718b3fe0a0961e9e05ae721dd0d223eea6ff8 Mon Sep 17 00:00:00 2001 From: a-chacon Date: Fri, 11 Oct 2024 09:50:31 -0300 Subject: [PATCH 5/6] chore: upgrade ruby version of tests --- .github/workflows/rubyonrails.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rubyonrails.yml b/.github/workflows/rubyonrails.yml index c37f826..026b44a 100644 --- a/.github/workflows/rubyonrails.yml +++ b/.github/workflows/rubyonrails.yml @@ -26,7 +26,7 @@ jobs: - name: Install Ruby and gems uses: ruby/setup-ruby@v1 with: - ruby-version: "3.1" + ruby-version: "3.2" bundler-cache: true - name: Run tests run: bin/rails t From e6c7033531e8e7945408756fa79a347f8af0c64e Mon Sep 17 00:00:00 2001 From: a-chacon Date: Fri, 11 Oct 2024 09:57:07 -0300 Subject: [PATCH 6/6] chore: version of sqlite --- gemfiles/rails-8.0.0-beta1.gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gemfiles/rails-8.0.0-beta1.gemfile b/gemfiles/rails-8.0.0-beta1.gemfile index 2c7372a..eebe835 100644 --- a/gemfiles/rails-8.0.0-beta1.gemfile +++ b/gemfiles/rails-8.0.0-beta1.gemfile @@ -11,7 +11,7 @@ gem 'yard', '~> 0.9' gem 'puma' -gem 'sqlite3', "~> 1.4" +gem 'sqlite3', ">= 2.1" gem 'sprockets-rails'