Skip to content

Commit

Permalink
Merge pull request #97 from gocardless/joesouthan-ghactions
Browse files Browse the repository at this point in the history
Remove support for Ruby =< 3.0 and Rails < 7
  • Loading branch information
JoeSouthan authored Aug 21, 2024
2 parents e847925 + 6edf722 commit b719d49
Show file tree
Hide file tree
Showing 11 changed files with 93 additions and 88 deletions.
55 changes: 0 additions & 55 deletions .circleci/config.yml

This file was deleted.

7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
- package-ecosystem: bundler
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
60 changes: 60 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: tests

on:
push:
branches:
- "master"
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
rubocop:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- run: bundle exec rubocop --extra-details --display-style-guide --parallel --force-exclusion

tests:
strategy:
fail-fast: false
matrix:
ruby-version: ["3.1", "3.2", "3.3"]
activerecord-version:
- "7.0.8"
- "7.1.3.4"
- "7.2.0"
runs-on: ubuntu-latest
services:
postgres:
image: postgres:14
env:
POSTGRES_USER: postgres
POSTGRES_DB: safer_migrations_test
POSTGRES_PASSWORD: safer_migrations
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 10
env:
DATABASE_URL: postgres://postgres:safer_migrations@localhost/safer_migrations_test
DATABASE_DEPENDENCY_PORT: "5432"
ACTIVERECORD_VERSION: "${{ matrix.activerecord-version }}"
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: "${{ matrix.ruby-version }}"
- name: Run specs
run: |
bundle exec rspec --profile --format progress
13 changes: 10 additions & 3 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
inherit_from: .rubocop_todo.yml

inherit_gem:
gc_ruboconfig: rubocop.yml

AllCops:
TargetRubyVersion: 2.7
TargetRubyVersion: 3.2
NewCops: enable

Gemspec/RequiredRubyVersion:
Enabled: false

Naming/FileName:
Exclude:
- lib/activerecord-safer_migrations.rb

Style/GlobalVars:
Exclude:
- "spec/active_record/safer_migrations/migration_spec.rb"
20 changes: 0 additions & 20 deletions .rubocop_todo.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.1
3.3.4
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 4.0.0 / 2024-08-21

- Remove support for Ruby =< 3.0 and Rails =< 6.0

# 3.0.0 / 2020-09-28

- [#55](https://github.com/gocardless/activerecord-safer_migrations/pull/55) Drop support for Ruby =< 2.4 and Rails =< 5.1
Expand Down
7 changes: 6 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,9 @@ source "https://rubygems.org"
gemspec

gem "activerecord", "~> #{ENV['ACTIVERECORD_VERSION']}" if ENV["ACTIVERECORD_VERSION"]
gem "gc_ruboconfig", "~> 2.19.0"

group :test, :development do
gem "gc_ruboconfig", "~> 5.0"
gem "pg", "~> 1.4"
gem "rspec", "~> 3.9.0"
end
9 changes: 3 additions & 6 deletions activerecord-safer_migrations.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,8 @@ Gem::Specification.new do |gem|
gem.homepage = "https://github.com/gocardless/activerecord-safer_migrations"
gem.license = "MIT"

gem.required_ruby_version = ">= 2.5"
gem.required_ruby_version = ">= 3.1"

gem.add_runtime_dependency "activerecord", ">= 5.2"

gem.add_development_dependency "pg", "~> 1.2.3"
gem.add_development_dependency "rspec", "~> 3.9.0"
gem.add_development_dependency "rubocop", "~> 0.92.0"
gem.add_dependency "activerecord", ">= 7.0"
gem.metadata["rubygems_mfa_required"] = "true"
end
2 changes: 1 addition & 1 deletion lib/active_record/safer_migrations/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

module ActiveRecord
module SaferMigrations
VERSION = "3.0.0"
VERSION = "4.0.0"
end
end
2 changes: 1 addition & 1 deletion lib/activerecord-safer_migrations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ def self.load
end
end

require "active_record/safer_migrations/railtie" if defined?(::Rails)
require "active_record/safer_migrations/railtie" if defined?(Rails)

0 comments on commit b719d49

Please sign in to comment.