From 6d54bf8398f27909dfbf4943b9d2b39f7cf6eece Mon Sep 17 00:00:00 2001 From: Luiz Eduardo Kowalski Date: Mon, 2 Dec 2024 21:35:10 +0100 Subject: [PATCH 1/6] Appraisal --- .github/workflows/ruby.yml | 10 ++++----- .gitignore | 2 ++ Appraisals | 21 +++++++++++++++++++ Gemfile | 4 +++- .../{Gemfile-rails-7-0 => rails_7.0.gemfile} | 14 +++++++------ .../{Gemfile-rails-7-1 => rails_7.1.gemfile} | 14 +++++++------ gemfiles/rails_7.2.gemfile | 16 ++++++++++++++ .../{Gemfile-rails-7-2 => rails_8.0.gemfile} | 14 +++++++------ 8 files changed, 71 insertions(+), 24 deletions(-) create mode 100644 Appraisals rename gemfiles/{Gemfile-rails-7-0 => rails_7.0.gemfile} (56%) rename gemfiles/{Gemfile-rails-7-1 => rails_7.1.gemfile} (56%) create mode 100644 gemfiles/rails_7.2.gemfile rename gemfiles/{Gemfile-rails-7-2 => rails_8.0.gemfile} (50%) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 42acf1e..8d3220f 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -12,16 +12,16 @@ jobs: strategy: matrix: gemfile: - - Gemfile # latest Rails (8.0) - - gemfiles/Gemfile-rails-7-0 - - gemfiles/Gemfile-rails-7-1 - - gemfiles/Gemfile-rails-7-2 + - gemfiles/rails_7.0 + - gemfiles/rails_7.1 + - gemfiles/rails_7.2 + - gemfiles/rails_8.0 ruby: - "3.1" - "3.2" - "3.3" # exclude: - # - gemfile: gemfiles/Gemfile-rails-6-0 + # - gemfile: gemfiles/rails_6.0 # ruby: '3.2' env: BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }} diff --git a/.gitignore b/.gitignore index a5ca158..f35e9d4 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,5 @@ .DS_Store Gemfile.lock + +/gemfiles/*.lock diff --git a/Appraisals b/Appraisals new file mode 100644 index 0000000..8be68b7 --- /dev/null +++ b/Appraisals @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +appraise "rails-7.0" do + gem "rails", "~> 7.0.0" + gem "sqlite3", "~> 1.6" +end + +appraise "rails-7.1" do + gem "rails", "~> 7.1.0" + gem "sqlite3", "~> 1.6" +end + +appraise "rails-7.2" do + gem "rails", "~> 7.1.0" + gem "sqlite3", "~> 1.7" +end + +appraise "rails-8.0" do + gem "rails", "~> 8.0.0" + gem "sqlite3" +end diff --git a/Gemfile b/Gemfile index cefc713..31a66c6 100644 --- a/Gemfile +++ b/Gemfile @@ -7,7 +7,9 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" } gemspec gem "activerecord" # needed for app_test test case -gem "sqlite3" +gem "sqlite3", "~> 2" + +gem "appraisal" gem "minitest-reporters" diff --git a/gemfiles/Gemfile-rails-7-0 b/gemfiles/rails_7.0.gemfile similarity index 56% rename from gemfiles/Gemfile-rails-7-0 rename to gemfiles/rails_7.0.gemfile index f61376a..992354d 100644 --- a/gemfiles/Gemfile-rails-7-0 +++ b/gemfiles/rails_7.0.gemfile @@ -1,14 +1,16 @@ -# frozen_string_literal: true +# This file was generated by Appraisal source "https://rubygems.org" -gemspec path: ".." - -gem "rails", github: "rails/rails", branch: "7-0-stable" - +gem "activerecord" +gem "sqlite3", "~> 1.6" +gem "appraisal" gem "minitest-reporters" gem "rubocop" gem "rubocop-minitest" gem "rubocop-performance" gem "rubocop-thread_safety" -gem "sqlite3", "~> 1.6" +gem "ruby-lsp" +gem "rails", "~> 7.0.0" + +gemspec path: "../" diff --git a/gemfiles/Gemfile-rails-7-1 b/gemfiles/rails_7.1.gemfile similarity index 56% rename from gemfiles/Gemfile-rails-7-1 rename to gemfiles/rails_7.1.gemfile index bb145a1..118ed34 100644 --- a/gemfiles/Gemfile-rails-7-1 +++ b/gemfiles/rails_7.1.gemfile @@ -1,14 +1,16 @@ -# frozen_string_literal: true +# This file was generated by Appraisal source "https://rubygems.org" -gemspec path: ".." - -gem "rails", github: "rails/rails", branch: "7-1-stable" - +gem "activerecord" +gem "sqlite3", "~> 1.6" +gem "appraisal" gem "minitest-reporters" gem "rubocop" gem "rubocop-minitest" gem "rubocop-performance" gem "rubocop-thread_safety" -gem "sqlite3", "~> 1.6" +gem "ruby-lsp" +gem "rails", "~> 7.1.0" + +gemspec path: "../" diff --git a/gemfiles/rails_7.2.gemfile b/gemfiles/rails_7.2.gemfile new file mode 100644 index 0000000..1781d62 --- /dev/null +++ b/gemfiles/rails_7.2.gemfile @@ -0,0 +1,16 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "activerecord" +gem "sqlite3", "~> 1.7" +gem "appraisal" +gem "minitest-reporters" +gem "rubocop" +gem "rubocop-minitest" +gem "rubocop-performance" +gem "rubocop-thread_safety" +gem "ruby-lsp" +gem "rails", "~> 7.1.0" + +gemspec path: "../" diff --git a/gemfiles/Gemfile-rails-7-2 b/gemfiles/rails_8.0.gemfile similarity index 50% rename from gemfiles/Gemfile-rails-7-2 rename to gemfiles/rails_8.0.gemfile index 2365789..8fe5ee3 100644 --- a/gemfiles/Gemfile-rails-7-2 +++ b/gemfiles/rails_8.0.gemfile @@ -1,14 +1,16 @@ -# frozen_string_literal: true +# This file was generated by Appraisal source "https://rubygems.org" -gemspec path: ".." - -gem "rails", github: "rails/rails", branch: "7-2-stable" - +gem "activerecord" +gem "sqlite3" +gem "appraisal" gem "minitest-reporters" gem "rubocop" gem "rubocop-minitest" gem "rubocop-performance" gem "rubocop-thread_safety" -gem "sqlite3", "~> 1.6" +gem "ruby-lsp" +gem "rails", "~> 8.0.0" + +gemspec path: "../" From 69299312c3c771573d02cfda2014c5f1ba658de1 Mon Sep 17 00:00:00 2001 From: Luiz Eduardo Kowalski Date: Mon, 2 Dec 2024 21:36:31 +0100 Subject: [PATCH 2/6] Adjust name --- .github/workflows/ruby.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 8d3220f..208bd49 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -24,7 +24,7 @@ jobs: # - gemfile: gemfiles/rails_6.0 # ruby: '3.2' env: - BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }} + BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}.gemfile steps: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 From 2b985f0a60b18f922e3eb0d2cb0982a7aefd19ab Mon Sep 17 00:00:00 2001 From: Luiz Eduardo Kowalski Date: Mon, 2 Dec 2024 21:38:34 +0100 Subject: [PATCH 3/6] Appraisal --- .github/workflows/ruby.yml | 7 +++---- Appraisals | 5 ----- gemfiles/rails_7.0.gemfile | 16 ---------------- 3 files changed, 3 insertions(+), 25 deletions(-) delete mode 100644 gemfiles/rails_7.0.gemfile diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 208bd49..8beb064 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -12,7 +12,6 @@ jobs: strategy: matrix: gemfile: - - gemfiles/rails_7.0 - gemfiles/rails_7.1 - gemfiles/rails_7.2 - gemfiles/rails_8.0 @@ -20,9 +19,9 @@ jobs: - "3.1" - "3.2" - "3.3" - # exclude: - # - gemfile: gemfiles/rails_6.0 - # ruby: '3.2' + exclude: + - gemfile: gemfiles/rails_8.0 + ruby: '3.1' env: BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}.gemfile steps: diff --git a/Appraisals b/Appraisals index 8be68b7..3174a29 100644 --- a/Appraisals +++ b/Appraisals @@ -1,10 +1,5 @@ # frozen_string_literal: true -appraise "rails-7.0" do - gem "rails", "~> 7.0.0" - gem "sqlite3", "~> 1.6" -end - appraise "rails-7.1" do gem "rails", "~> 7.1.0" gem "sqlite3", "~> 1.6" diff --git a/gemfiles/rails_7.0.gemfile b/gemfiles/rails_7.0.gemfile deleted file mode 100644 index 992354d..0000000 --- a/gemfiles/rails_7.0.gemfile +++ /dev/null @@ -1,16 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "activerecord" -gem "sqlite3", "~> 1.6" -gem "appraisal" -gem "minitest-reporters" -gem "rubocop" -gem "rubocop-minitest" -gem "rubocop-performance" -gem "rubocop-thread_safety" -gem "ruby-lsp" -gem "rails", "~> 7.0.0" - -gemspec path: "../" From fc2bec85ef6c273edfb37ff4ffa8c96e3a4cbb96 Mon Sep 17 00:00:00 2001 From: Luiz Eduardo Kowalski Date: Mon, 2 Dec 2024 21:40:01 +0100 Subject: [PATCH 4/6] Rubocop --- gemfiles/rails_7.1.gemfile | 6 ++++-- gemfiles/rails_7.2.gemfile | 6 ++++-- gemfiles/rails_8.0.gemfile | 6 ++++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/gemfiles/rails_7.1.gemfile b/gemfiles/rails_7.1.gemfile index 118ed34..72ad242 100644 --- a/gemfiles/rails_7.1.gemfile +++ b/gemfiles/rails_7.1.gemfile @@ -1,16 +1,18 @@ +# frozen_string_literal: true + # This file was generated by Appraisal source "https://rubygems.org" gem "activerecord" -gem "sqlite3", "~> 1.6" gem "appraisal" gem "minitest-reporters" +gem "rails", "~> 7.1.0" gem "rubocop" gem "rubocop-minitest" gem "rubocop-performance" gem "rubocop-thread_safety" gem "ruby-lsp" -gem "rails", "~> 7.1.0" +gem "sqlite3", "~> 1.6" gemspec path: "../" diff --git a/gemfiles/rails_7.2.gemfile b/gemfiles/rails_7.2.gemfile index 1781d62..27e1db9 100644 --- a/gemfiles/rails_7.2.gemfile +++ b/gemfiles/rails_7.2.gemfile @@ -1,16 +1,18 @@ +# frozen_string_literal: true + # This file was generated by Appraisal source "https://rubygems.org" gem "activerecord" -gem "sqlite3", "~> 1.7" gem "appraisal" gem "minitest-reporters" +gem "rails", "~> 7.1.0" gem "rubocop" gem "rubocop-minitest" gem "rubocop-performance" gem "rubocop-thread_safety" gem "ruby-lsp" -gem "rails", "~> 7.1.0" +gem "sqlite3", "~> 1.7" gemspec path: "../" diff --git a/gemfiles/rails_8.0.gemfile b/gemfiles/rails_8.0.gemfile index 8fe5ee3..757399d 100644 --- a/gemfiles/rails_8.0.gemfile +++ b/gemfiles/rails_8.0.gemfile @@ -1,16 +1,18 @@ +# frozen_string_literal: true + # This file was generated by Appraisal source "https://rubygems.org" gem "activerecord" -gem "sqlite3" gem "appraisal" gem "minitest-reporters" +gem "rails", "~> 8.0.0" gem "rubocop" gem "rubocop-minitest" gem "rubocop-performance" gem "rubocop-thread_safety" gem "ruby-lsp" -gem "rails", "~> 8.0.0" +gem "sqlite3" gemspec path: "../" From 9c9488d0a0f4162fd43f6209c6ef5a5d868c8455 Mon Sep 17 00:00:00 2001 From: Luiz Eduardo Kowalski Date: Mon, 2 Dec 2024 21:41:55 +0100 Subject: [PATCH 5/6] Use 7.2 --- Appraisals | 2 +- gemfiles/rails_7.2.gemfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Appraisals b/Appraisals index 3174a29..0c4d313 100644 --- a/Appraisals +++ b/Appraisals @@ -6,7 +6,7 @@ appraise "rails-7.1" do end appraise "rails-7.2" do - gem "rails", "~> 7.1.0" + gem "rails", "~> 7.2.0" gem "sqlite3", "~> 1.7" end diff --git a/gemfiles/rails_7.2.gemfile b/gemfiles/rails_7.2.gemfile index 27e1db9..a7bd882 100644 --- a/gemfiles/rails_7.2.gemfile +++ b/gemfiles/rails_7.2.gemfile @@ -7,7 +7,7 @@ source "https://rubygems.org" gem "activerecord" gem "appraisal" gem "minitest-reporters" -gem "rails", "~> 7.1.0" +gem "rails", "~> 7.2.0" gem "rubocop" gem "rubocop-minitest" gem "rubocop-performance" From e0484f774be0a3cb81a5dd2d79f7003ccfdbce9e Mon Sep 17 00:00:00 2001 From: Luiz Eduardo Kowalski Date: Mon, 2 Dec 2024 21:46:59 +0100 Subject: [PATCH 6/6] Revert changes --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 31a66c6..ed147bf 100644 --- a/Gemfile +++ b/Gemfile @@ -7,7 +7,7 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" } gemspec gem "activerecord" # needed for app_test test case -gem "sqlite3", "~> 2" +gem "sqlite3" gem "appraisal"