Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Update gemfiles and CI settings for newer Rails versions #127

Merged
merged 4 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
chore: Update gemfiles and CI settings for newer Rails versions
This commit removes support for Rails 5.2 and updates gemfiles for Rails 6.0, 6.1, and 7.0. It also adds support for Rails 7.1. The CI settings are updated to reflect these changes, now testing on newer Ruby versions and using updated versions of Github Actions.
  • Loading branch information
seuros committed Jan 16, 2024
commit 5411955b91d0a9ea1d317c377e09a1c2f1687dd2
9 changes: 3 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,17 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: [2.7, '3.0']
ruby: ['3.0', '3.1', '3.2', '3.3']
gemfile:
- rails_7.1
- rails_7.0
- rails_6.1
- rails_6.0
- rails_5.2
exclude:
- ruby: '3.0'
gemfile: rails_5.2
runs-on: ubuntu-latest
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ test/**/Gemfile.lock
*.iml
*.sqlite3
.tool-versions
gems.locked
gemfiles/*.lock

37 changes: 21 additions & 16 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
appraise "rails-6.0" do
gem "actionpack", "~> 6.0.0"
gem "activerecord", "~> 6.0.0"
end
appraise "rails-6.1" do
gem "actionpack", "~> 6.1.0"
gem "activerecord", "~> 6.1.0"
# frozen_string_literal: true

appraise 'rails-6.0' do
gem 'actionpack', '~> 6.0.0'
gem 'activerecord', '~> 6.0.0'
gem 'sqlite3', '~> 1.4.0'
end
appraise "rails-7.0" do
gem "actionpack", "~> 7.0.0"
gem "activerecord", "~> 7.0.0"
gem "sqlite3", "~> 1.4.0"

appraise 'rails-6.1' do
gem 'actionpack', '~> 6.1.0'
gem 'activerecord', '~> 6.1.0'
gem 'sqlite3', '~> 1.4.0'
end

appraise "rails-5.2" do
gem "actionpack", "~> 5.2.0"
gem "activerecord", "~> 5.2.0"
gem "sqlite3", "~> 1.3.8"
end
appraise 'rails-7.0' do
gem 'actionpack', '~> 7.0.0'
gem 'activerecord', '~> 7.0.0'
gem 'sqlite3', '~> 1.4.0'
end
appraise 'rails-7.1' do
gem 'actionpack', '~> 7.0.0'
gem 'activerecord', '~> 7.0.0'
gem 'sqlite3', '~> 1.4.0'
end
7 changes: 3 additions & 4 deletions gemfiles/rails_6.0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@

source "https://rubygems.org"

gem "appraisal"
gem "minitest-capybara"
gem "cells-erb"
gem "cells-rails"
gem "reform-rails"
gem "trailblazer"
gem "trailblazer-cells"
gem "trailblazer-loader"
gem "sqlite3"
gem "minitest-capybara"
gem "appraisal"
gem "actionpack", "~> 6.0.0"
gem "activerecord", "~> 6.0.0"
gem "sqlite3", "~> 1.4.0"

gemspec path: "../"
7 changes: 3 additions & 4 deletions gemfiles/rails_6.1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@

source "https://rubygems.org"

gem "appraisal"
gem "minitest-capybara"
gem "cells-erb"
gem "cells-rails"
gem "reform-rails"
gem "trailblazer"
gem "trailblazer-cells"
gem "trailblazer-loader"
gem "sqlite3"
gem "minitest-capybara"
gem "appraisal"
gem "actionpack", "~> 6.1.0"
gem "activerecord", "~> 6.1.0"
gem "sqlite3", "~> 1.4.0"

gemspec path: "../"
13 changes: 3 additions & 10 deletions gemfiles/rails_7.0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,15 @@

source "https://rubygems.org"

gem "appraisal"
gem "minitest-capybara"
gem "cells-erb"
gem "cells-rails"
gem "reform-rails"
gem "trailblazer"
gem "trailblazer-cells"
gem "sqlite3", "~> 1.4.0"
gem "minitest-capybara"
gem "appraisal"
gem "actionpack", "~> 7.0.0"
gem "activerecord", "~> 7.0.0"

# gem "trailblazer-macro", path: "../../trailblazer-macro"
# gem "trailblazer-macro-contract", path: "../../trailblazer-macro-contract"
# gem "trailblazer-activity", path: "../../trailblazer-activity"
# gem "trailblazer-operation", path: "../../trailblazer-operation"
# gem "trailblazer-developer", path: "../../trailblazer-developer"
# gem "trailblazer-activity-dsl-linear", path: "../../trailblazer-activity-dsl-linear"
gem "sqlite3", "~> 1.4.0"

gemspec path: "../"
11 changes: 5 additions & 6 deletions gemfiles/rails_5.2.gemfile → gemfiles/rails_7.1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@

source "https://rubygems.org"

gem "appraisal"
gem "minitest-capybara"
gem "cells-erb"
gem "cells-rails"
gem "reform-rails"
gem "trailblazer"
gem "trailblazer-cells"
gem "trailblazer-loader"
gem "sqlite3", "~> 1.3.8"
gem "minitest-capybara"
gem "appraisal"
gem "actionpack", "~> 5.2.0"
gem "activerecord", "~> 5.2.0"
gem "actionpack", "~> 7.0.0"
gem "activerecord", "~> 7.0.0"
gem "sqlite3", "~> 1.4.0"

gemspec path: "../"
12 changes: 12 additions & 0 deletions gems.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# frozen_string_literal: true

source 'https://rubygems.org'
gemspec

gem 'appraisal'
gem 'minitest-capybara'
gem "cells-erb"
gem "cells-rails"
gem "reform-rails"
gem "trailblazer"
gem "trailblazer-cells"
8 changes: 1 addition & 7 deletions test/dummy/config/database.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
default: &default
test:
adapter: sqlite3
pool: 5
timeout: 5000

# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
<<: *default
database: db/test.sqlite3
1 change: 1 addition & 0 deletions test/integration/artists_controller_test.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
require "test_helper"
require 'minitest/capybara'

class ArtistsControllerTest < Minitest::Capybara::Spec
it "cell: Artist::Cell::Dashboard" do
Expand Down
1 change: 1 addition & 0 deletions test/integration/cells_controller_test.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
require "test_helper"
require 'minitest/capybara'

class CellsControllerTest < Minitest::Capybara::Spec
it "" do
Expand Down
1 change: 1 addition & 0 deletions test/integration/songs_controller_test.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
require "test_helper"
require 'minitest/capybara'

class SongsControllerTest < Minitest::Capybara::Spec
it "new" do
Expand Down
2 changes: 1 addition & 1 deletion test/song/operation_test.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require "test_helper"
require "trailblazer/activity/testing"

class SongOperationTest < Minitest::Spec
class SongOperationTest < Minitest::TrailblazerSpec

it "what" do
song = Song.create(title: "Bright Eyes")
Expand Down
1 change: 1 addition & 0 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@

require "minitest/autorun"
require "capybara/rails"
require 'minitest/trailblazer_spec'
6 changes: 3 additions & 3 deletions trailblazer-rails.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
lib = File.expand_path("lib", __dir__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require "trailblazer/rails/version"
require_relative "lib/trailblazer/rails/version"

Gem::Specification.new do |spec|
spec.name = "trailblazer-rails"
Expand All @@ -21,4 +19,6 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "bundler"
spec.add_development_dependency "minitest"
spec.add_development_dependency "rake"
spec.add_development_dependency "capybara"
spec.add_development_dependency "minitest-trailblazer"
end