Skip to content

Commit

Permalink
update Appraisal | clean up warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ttstarck committed Jul 10, 2024
1 parent 8e32a50 commit 5e94e84
Show file tree
Hide file tree
Showing 12 changed files with 49 additions and 23 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: [2.7, '3.0', 3.1, 3.2]
ruby: ['3.0', 3.1, 3.2, 3.3]
gemfile:
- Gemfile
- gemfiles/rails_6_0.gemfile
- gemfiles/rails_6_1.gemfile
- gemfiles/rails_7_0.gemfile
- gemfiles/rails_7_1.gemfile

env:
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.5
3.1.6
12 changes: 2 additions & 10 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
# frozen_string_literal: true

appraise 'rails-6-0' do
gem 'rails', '~> 6.0.0', '< 6.1'
end
require "appraisal/matrix"

appraise 'rails-6-1' do
gem 'rails', '~> 6.1.0', '< 6.2'
end

appraise 'rails-7-0' do
gem 'rails', '~> 7.0.0', '< 8'
end
appraisal_matrix(rails: "6.0")
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ source "https://rubygems.org"
gemspec

gem 'appraisal'
gem 'appraisal-matrix'
gem 'bigdecimal'
gem 'minitest', '~> 5.1'
gem 'minitest-reporters'
Expand Down
3 changes: 3 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ GEM
bundler
rake
thor (>= 0.14.0)
appraisal-matrix (0.2.0)
appraisal (~> 2.2)
ast (2.4.2)
bigdecimal (3.1.4)
builder (3.2.4)
Expand Down Expand Up @@ -211,6 +213,7 @@ PLATFORMS

DEPENDENCIES
appraisal
appraisal-matrix
bigdecimal
large_text_field!
minitest (~> 5.1)
Expand Down
3 changes: 2 additions & 1 deletion gemfiles/rails_6_0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
source "https://rubygems.org"

gem "appraisal"
gem "appraisal-matrix"
gem "bigdecimal"
gem "minitest", "~> 5.1"
gem "minitest-reporters"
Expand All @@ -16,6 +17,6 @@ gem "shoulda", "~> 3.5"
gem "shoulda-matchers", "~> 3.0"
gem "test-unit", "~> 3.3"
gem "warning", require: false
gem "rails", "~> 6.0.0", "< 6.1"
gem "rails", "~> 6.0.0"

gemspec path: "../"
3 changes: 2 additions & 1 deletion gemfiles/rails_6_1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
source "https://rubygems.org"

gem "appraisal"
gem "appraisal-matrix"
gem "bigdecimal"
gem "minitest", "~> 5.1"
gem "minitest-reporters"
Expand All @@ -16,6 +17,6 @@ gem "shoulda", "~> 3.5"
gem "shoulda-matchers", "~> 3.0"
gem "test-unit", "~> 3.3"
gem "warning", require: false
gem "rails", "~> 6.1.0", "< 6.2"
gem "rails", "~> 6.1.0"

gemspec path: "../"
3 changes: 2 additions & 1 deletion gemfiles/rails_7_0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
source "https://rubygems.org"

gem "appraisal"
gem "appraisal-matrix"
gem "bigdecimal"
gem "minitest", "~> 5.1"
gem "minitest-reporters"
Expand All @@ -16,6 +17,6 @@ gem "shoulda", "~> 3.5"
gem "shoulda-matchers", "~> 3.0"
gem "test-unit", "~> 3.3"
gem "warning", require: false
gem "rails", "~> 7.0.0", "< 8"
gem "rails", "~> 7.0.0"

gemspec path: "../"
22 changes: 22 additions & 0 deletions gemfiles/rails_7_1.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "appraisal"
gem "appraisal-matrix"
gem "bigdecimal"
gem "minitest", "~> 5.1"
gem "minitest-reporters"
gem "mysql2"
gem "pry"
gem "rr", "~> 1.1"
gem "rubocop", require: false
gem "rubocop-minitest", require: false
gem "rubocop-rails", require: false
gem "shoulda", "~> 3.5"
gem "shoulda-matchers", "~> 3.0"
gem "test-unit", "~> 3.3"
gem "warning", require: false
gem "rails", "~> 7.1.0"

gemspec path: "../"
6 changes: 4 additions & 2 deletions test/dummy/config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
# Ignored
end

Bundler.require(*Rails.groups)
require 'pry'

# Bundler.require(*Rails.groups)
require "large_text_field"

module Dummy
Expand Down Expand Up @@ -48,7 +50,7 @@ class Application < Rails::Application
# Enable escaping HTML in JSON.
config.active_support.escape_html_entities_in_json = true

if Rails::VERSION::STRING.to_f >= 6.1
if Rails.gem_version >= "6.1" && Rails.gem_version < "7"
# Migrate to the new connection handling behavior.
# See: https://guides.rubyonrails.org/active_record_multiple_databases.html#migrate-to-the-new-connection-handling
config.active_record.legacy_connection_handling = false
Expand Down
12 changes: 6 additions & 6 deletions test/dummy/db/schema.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# frozen_string_literal: true

# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
Expand All @@ -12,16 +10,18 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 20_160_217_033_529) do
create_table "large_text_fields", id: :integer, charset: "utf8", force: :cascade do |t|
ActiveRecord::Schema.define(version: 2016_02_17_033529) do

create_table "large_text_fields", id: :integer, charset: "utf8mb3", force: :cascade do |t|
t.string "field_name", null: false
t.text "value", size: :medium
t.integer "owner_id", null: false
t.string "owner_type", null: false
t.index %w[owner_type owner_id field_name], name: "large_text_field_by_owner_field", unique: true
t.index ["owner_type", "owner_id", "field_name"], name: "large_text_field_by_owner_field", unique: true
end

create_table "libraries", id: :integer, charset: "utf8", force: :cascade do |t|
create_table "libraries", id: :integer, charset: "utf8mb3", force: :cascade do |t|
t.string "name", null: false
end

end
2 changes: 2 additions & 0 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

require File.expand_path('dummy/config/environment.rb', __dir__)

require "minitest"
require "minitest/autorun"
require "minitest/unit"
require "pry"
require "rails/test_help"
Expand Down

0 comments on commit 5e94e84

Please sign in to comment.