Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
88b0942
Bump actions/checkout
m-nakamura145 May 21, 2024
0e1b3b4
Update iterators in auditor to check first whether the audits associa…
wkirby Jun 13, 2024
1666b3f
added support to rails 8.0
fernandomenolli Jun 21, 2024
471de35
correct version
fernandomenolli Jun 21, 2024
9a628a5
dynamic max_audits to be proc or symbol
gmhawash Jun 25, 2024
2d42ecd
Update to normalize audit ordering when in loaded branch for auditor …
wkirby Jul 2, 2024
5e504ec
Merge pull request #717 from fernandomenolli/main
danielmorrison Jul 30, 2024
0e019bb
Merge pull request #718 from downhome/dynamic-max-audits
danielmorrison Jul 30, 2024
6bafdeb
Merge pull request #711 from m-nakamura145/update-actions-checkout
danielmorrison Jul 30, 2024
8031a1a
Remove unsupported Rails 5.0 and 5.1 gemfiles
mattbrictson Aug 11, 2024
c4ca3d3
Simplify rails version requirements
mattbrictson Aug 11, 2024
892baa9
Fix incorrect sqlite3 requirement for rails 7.0 and 7.1
mattbrictson Aug 11, 2024
821a3b6
Add gemfile for testing Rails 7.2; remove 8.0 for now
mattbrictson Aug 11, 2024
575c29b
Fix enum deprecation warning on Rails 7.2
mattbrictson Aug 11, 2024
7b7a9de
Add Rails 7.2 to CI; remove 8.0 for now
mattbrictson Aug 11, 2024
053ca2e
Fix problem where 3.0 in CI YAML is interpreted as "3"
mattbrictson Aug 11, 2024
831215b
Add Ruby 3.3 to CI
mattbrictson Aug 11, 2024
af1efc5
Increase uncovered baseline to get CI passing
mattbrictson Aug 11, 2024
83bab73
Fix incorrect YAML indentation
mattbrictson Aug 11, 2024
c7a002c
Fix postgres migration issue in spec helper under Rails 7.2
mattbrictson Aug 11, 2024
a28a6a4
Add Rails 7.2 and Ruby 3.3 to the README
mattbrictson Aug 11, 2024
0d18048
Merge pull request #723 from mattbrictson/ci-cleanup-rails-7.2
danielmorrison Aug 13, 2024
9aad4d4
Bump version to 5.7.0
danielmorrison Aug 13, 2024
1b72a97
Fix failing specs
wkirby Aug 24, 2024
888ddb9
Add spec for new has_version? method
wkirby Aug 24, 2024
350add0
Merge branch 'main' into apsis/loaded-audits
wkirby Aug 26, 2024
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
101 changes: 60 additions & 41 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,74 +10,93 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: [2.3, 2.4, 2.5, 2.6, 2.7, 3.0, 3.1, 3.2]
ruby: ["2.3", "2.4", "2.5", "2.6", "2.7", "3.0", "3.1", "3.2", "3.3"]
appraisal:
- rails52
- rails60
- rails61
- rails70
- rails71
- rails72
db: [POSTGRES, MYSQL, SQLITE]
exclude:
# MySQL has issues on Ruby 2.3
# https://github.com/ruby/setup-ruby/issues/150
- ruby: 2.3
- ruby: "2.3"
db: MYSQL

# PostgreSQL is segfaulting on 2.3
# Doesn't seem worth solving.
- ruby: 2.3
- ruby: "2.3"
db: POSTGRES

# Rails 5.2 supports Ruby 2.2-2.5
- appraisal: rails52
ruby: 2.6
ruby: "2.6"
- appraisal: rails52
ruby: 2.7
ruby: "2.7"
- appraisal: rails52
ruby: 3.0
ruby: "3.0"
- appraisal: rails52
ruby: 3.1
ruby: "3.1"
- appraisal: rails52
ruby: 3.2
ruby: "3.2"
- appraisal: rails52
ruby: "3.3"

# Rails 6.0 supports Ruby 2.5-2.7
- appraisal: rails60
ruby: 2.3
ruby: "2.3"
- appraisal: rails60
ruby: "2.4"
- appraisal: rails60
ruby: 2.4
ruby: "3.0"
- appraisal: rails60
ruby: 3.0
ruby: "3.1"
- appraisal: rails60
ruby: 3.1
ruby: "3.2"
- appraisal: rails60
ruby: 3.2
ruby: "3.3"

# Rails 6.1 supports Ruby 2.5+
- appraisal: rails61
ruby: 2.3
ruby: "2.3"
- appraisal: rails61
ruby: 2.4
ruby: "2.4"

# Rails 7 supports Ruby 2.7+
- appraisal: rails70
ruby: 2.3
ruby: "2.3"
- appraisal: rails70
ruby: 2.4
ruby: "2.4"
- appraisal: rails70
ruby: 2.5
ruby: "2.5"
- appraisal: rails70
ruby: 2.6
ruby: "2.6"

# Rails 7.1 supports Ruby 2.7+
- appraisal: rails71
ruby: 2.3
ruby: "2.3"
- appraisal: rails71
ruby: 2.4
ruby: "2.4"
- appraisal: rails71
ruby: 2.5
ruby: "2.5"
- appraisal: rails71
ruby: 2.6
ruby: "2.6"

# Rails 7.2 supports Ruby 3.1+
- appraisal: rails72
ruby: "2.3"
- appraisal: rails72
ruby: "2.4"
- appraisal: rails72
ruby: "2.5"
- appraisal: rails72
ruby: "2.6"
- appraisal: rails72
ruby: "2.7"
- appraisal: rails72
ruby: "3.0"

services:
postgres:
Expand All @@ -94,24 +113,24 @@ jobs:
env:
DB_DATABASE: audited_test
DB_USER: root
DB_PASSWORD: 'root'
DB_PASSWORD: "root"
DB_HOST: localhost

steps:
- name: Setup MySQL
run: |
sudo /etc/init.d/mysql start
mysql -e 'CREATE DATABASE audited_test;' -uroot -proot
mysql -e 'SHOW DATABASES;' -uroot -proot
- uses: actions/checkout@v3
- name: Copy Gemfile
run: sed 's/\.\././' gemfiles/${{ matrix.appraisal }}.gemfile > Gemfile
- name: Set up Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run tests
env:
DB: ${{ matrix.db }}
run: bundle exec rake
- name: Setup MySQL
run: |
sudo /etc/init.d/mysql start
mysql -e 'CREATE DATABASE audited_test;' -uroot -proot
mysql -e 'SHOW DATABASES;' -uroot -proot
- uses: actions/checkout@v4
- name: Copy Gemfile
run: sed 's/\.\././' gemfiles/${{ matrix.appraisal }}.gemfile > Gemfile
- name: Set up Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run tests
env:
DB: ${{ matrix.db }}
run: bundle exec rake
37 changes: 13 additions & 24 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -1,26 +1,8 @@
# Include DB adapters matching the version requirements in
# rails/activerecord/lib/active_record/connection_adapters/*adapter.rb

appraise "rails50" do
gem "rails", "~> 5.0.0"
gem "mysql2", ">= 0.3.18", "< 0.6.0"
gem "pg", ">= 0.18", "< 2.0"
gem "sqlite3", "~> 1.3.6"
gem "psych", "~> 3.1"
gem "loofah", "2.20.0"
end

appraise "rails51" do
gem "rails", "~> 5.1.4"
gem "mysql2", ">= 0.3.18", "< 0.6.0"
gem "pg", ">= 0.18", "< 2.0"
gem "sqlite3", "~> 1.3.6"
gem "psych", "~> 3.1"
gem "loofah", "2.20.0"
end

appraise "rails52" do
gem "rails", ">= 5.2.8.1", "< 5.3"
gem "rails", "~> 5.2.8"
gem "mysql2", ">= 0.4.4", "< 0.6.0"
gem "pg", ">= 0.18", "< 2.0"
gem "sqlite3", "~> 1.3.6"
Expand All @@ -29,29 +11,36 @@ appraise "rails52" do
end

appraise "rails60" do
gem "rails", ">= 6.0.0", "< 6.1"
gem "rails", "~> 6.0.6"
gem "mysql2", ">= 0.4.4"
gem "pg", ">= 0.18", "< 2.0"
gem "sqlite3", "~> 1.4"
end

appraise "rails61" do
gem "rails", ">= 6.1.0", "< 6.2"
gem "rails", "~> 6.1.7"
gem "mysql2", ">= 0.4.4"
gem "pg", ">= 1.1", "< 2.0"
gem "sqlite3", "~> 1.4"
end

appraise "rails70" do
gem "rails", ">= 7.0.0", "< 7.1"
gem "rails", "~> 7.0.8"
gem "mysql2", ">= 0.4.4"
gem "pg", ">= 1.1"
gem "sqlite3", ">= 1.4"
gem "sqlite3", "~> 1.4"
end

appraise "rails71" do
gem "rails", ">= 7.1.0.beta1", "< 7.2"
gem "rails", "~> 7.1.3"
gem "mysql2", ">= 0.4.4"
gem "pg", ">= 1.1"
gem "sqlite3", "~> 1.4"
end

appraise "rails72" do
gem "rails", "~> 7.2.0"
gem "mysql2", "~> 0.5"
gem "pg", "~> 1.1"
gem "sqlite3", ">= 1.4"
end
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Audited ChangeLog

### 5.7.0 (2024-08-13)

- Support for Rails 7.2 and Ruby 3.3, and testing cleanups - @mattbrictson
[#723](https://github.com/collectiveidea/audited/pull/723)
- Allow max_audits to be a proc or symbol - @gmhawash
[#718](https://github.com/collectiveidea/audited/pull/718)
- Support Rails 8 - @fernandomenolli
[#717](https://github.com/collectiveidea/audited/pull/717)


### 5.6.0 (2024-04-05)

- Removed support for Rails 5.0 and 5.1.
Expand Down Expand Up @@ -38,7 +48,7 @@
## 5.3.3 (2023-03-24)

- Use RequestStore instead of Thread.current for thread-safe requests - @tiagocassio
[#669](https://github.com/collectiveidea/audited/pull/669)
[#669](https://github.com/c ollectiveidea/audited/pull/669)
- Clean up Touch audits - @mcyoung, @akostadinov
[#668](https://github.com/collectiveidea/audited/pull/668)

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Audited
**Audited** (previously acts_as_audited) is an ORM extension that logs all changes to your models. Audited can also record who made those changes, save comments and associate models related to the changes.


Audited currently (5.6) works with Rails 7.1, 7.0, 6.1, 6.0, 5.2.
Audited currently (5.6) works with Rails 7.2, 7.1, 7.0, 6.1, 6.0, 5.2.

For Rails 5.0 & 5.1, use gem version 5.4.3
For Rails 4, use gem version 4.x
Expand All @@ -26,6 +26,7 @@ Audited supports and is [tested against](https://github.com/collectiveidea/audit
* 3.0
* 3.1
* 3.2
* 3.3

Audited may work just fine with a Ruby version not listed above, but we can't guarantee that it will. If you'd like to maintain a Ruby that isn't listed, please let us know with a [pull request](https://github.com/collectiveidea/audited/pulls).

Expand Down
6 changes: 3 additions & 3 deletions audited.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ Gem::Specification.new do |gem|

gem.required_ruby_version = ">= 2.3.0"

gem.add_dependency "activerecord", ">= 5.2", "< 7.2"
gem.add_dependency "activesupport", ">= 5.2", "< 7.2"
gem.add_dependency "activerecord", ">= 5.2", "< 8.0"
gem.add_dependency "activesupport", ">= 5.2", "< 8.0"

gem.add_development_dependency "appraisal"
gem.add_development_dependency "rails", ">= 5.2", "< 7.2"
gem.add_development_dependency "rails", ">= 5.2", "< 8.0"
gem.add_development_dependency "rspec-rails"
gem.add_development_dependency "standard"
gem.add_development_dependency "single_cov"
Expand Down
12 changes: 0 additions & 12 deletions gemfiles/rails50.gemfile

This file was deleted.

12 changes: 0 additions & 12 deletions gemfiles/rails51.gemfile

This file was deleted.

2 changes: 1 addition & 1 deletion gemfiles/rails52.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

source "https://rubygems.org"

gem "rails", ">= 5.2.8.1", "< 5.3"
gem "rails", "~> 5.2.8"
gem "mysql2", ">= 0.4.4", "< 0.6.0"
gem "pg", ">= 0.18", "< 2.0"
gem "sqlite3", "~> 1.3.6"
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/rails60.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

source "https://rubygems.org"

gem "rails", ">= 6.0.0", "< 6.1"
gem "rails", "~> 6.0.6"
gem "mysql2", ">= 0.4.4"
gem "pg", ">= 0.18", "< 2.0"
gem "sqlite3", "~> 1.4"
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/rails61.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

source "https://rubygems.org"

gem "rails", ">= 6.1.0", "< 6.2"
gem "rails", "~> 6.1.7"
gem "mysql2", ">= 0.4.4"
gem "pg", ">= 1.1", "< 2.0"
gem "sqlite3", "~> 1.4"
Expand Down
4 changes: 2 additions & 2 deletions gemfiles/rails70.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

source "https://rubygems.org"

gem "rails", ">= 7.0.0", "< 7.1"
gem "rails", "~> 7.0.8"
gem "mysql2", ">= 0.4.4"
gem "pg", ">= 1.1"
gem "sqlite3", ">= 1.4"
gem "sqlite3", "~> 1.4"

gemspec name: "audited", path: "../"
4 changes: 2 additions & 2 deletions gemfiles/rails71.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

source "https://rubygems.org"

gem "rails", ">= 7.1.0.beta1", "< 7.2"
gem "rails", "~> 7.1.3"
gem "mysql2", ">= 0.4.4"
gem "pg", ">= 1.1"
gem "sqlite3", ">= 1.4"
gem "sqlite3", "~> 1.4"

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

source "https://rubygems.org"

gem "rails", "~> 7.2.0"
gem "mysql2", "~> 0.5"
gem "pg", "~> 1.1"
gem "sqlite3", ">= 1.4"

gemspec name: "audited", path: "../"
Loading