Skip to content

Commit

Permalink
Bring Rails 4.2 (and Ruby 2.4) support back
Browse files Browse the repository at this point in the history
  • Loading branch information
amatsuda committed Jun 17, 2023
1 parent 0cdd936 commit 168803e
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ jobs:
- name: "Ruby 2.5 & Rails 5.0"
ruby-version: "2.5"
rails-version: "5.0"
- name: "Ruby 2.4 & Rails 4.2"
ruby-version: "2.4"
rails-version: "4.2"
bundler_version: 1
env:
BUNDLE_GEMFILE: gemfiles/rails${{ matrix.rails-version }}.gemfile
DISPLAY: ":99.0"
Expand All @@ -78,6 +82,8 @@ jobs:
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
rubygems: ${{ (matrix.ruby_version < '2.6' && 'default') || 'latest' }}
bundler: ${{ matrix.bundler_version }}
bundler-cache: true
- uses: nanasess/setup-chromedriver@v1
- name: Test
Expand All @@ -102,6 +108,8 @@ jobs:
rails-version: "5.1"
- ruby-version: "2.7"
rails-version: "5.0"
- ruby-version: "2.4"
rails-version: "4.2"
steps:
- uses: actions/checkout@v3
- name: Test
Expand Down
26 changes: 26 additions & 0 deletions gemfiles/rails4.2.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# -*- ruby -*-
#
# Copyright (C) 2023 Akira Matsuda <[email protected]>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

source "https://rubygems.org/"

gemspec path: ".."

gem "rails", "< 5.0.0"
gem "capybara", "~> 2.13"
gem "sqlite3", "~> 1.3.6"
gem "loofah", "< 2.21.0"
2 changes: 1 addition & 1 deletion test-unit-rails.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Gem::Specification.new do |spec|
spec.files += Dir.glob("doc/text/**/*.md")
spec.test_files = Dir.glob("test/**/*.rb")

spec.add_runtime_dependency("rails", ">= 5.0.0")
spec.add_runtime_dependency("rails", ">= 4.2.0")
spec.add_runtime_dependency("test-unit-activesupport", ">= 1.0.8")
spec.add_runtime_dependency("test-unit-capybara", ">= 1.0.5")
spec.add_runtime_dependency("test-unit-rr", ">= 1.0.4")
Expand Down

0 comments on commit 168803e

Please sign in to comment.