Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into misc/sync-upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
mshimizu-oc committed Dec 14, 2023
2 parents 743b0e9 + 3b4e52f commit 0e41cea
Show file tree
Hide file tree
Showing 22 changed files with 614 additions and 78 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/buildlight.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Buildlight

on:
workflow_run:
workflows:
- CI
branches:
- main

jobs:
webhook:
runs-on: ubuntu-latest
steps:
- name: Webhook
uses: collectiveidea/buildlight@main
145 changes: 145 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
name: CI

on:
- pull_request
- push

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby: [2.3, 2.4, 2.5, 2.6, 2.7, 3.0, 3.1, 3.2]
appraisal:
- rails50
- rails51
- rails52
- rails60
- rails61
- rails70
- rails71
db: [POSTGRES, MYSQL, SQLITE]
exclude:
# MySQL has issues on Ruby 2.3
# https://github.com/ruby/setup-ruby/issues/150
- ruby: 2.3
db: MYSQL

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

# Rails 5.0 supports Ruby 2.2-2.4
- appraisal: rails50
ruby: 2.5
- appraisal: rails50
ruby: 2.6
- appraisal: rails50
ruby: 2.7
- appraisal: rails50
ruby: 3.0
- appraisal: rails50
ruby: 3.1
- appraisal: rails50
ruby: 3.2

# Rails 5.1 supports Ruby 2.2-2.5
- appraisal: rails51
ruby: 2.6
- appraisal: rails51
ruby: 2.7
- appraisal: rails51
ruby: 3.0
- appraisal: rails51
ruby: 3.1
- appraisal: rails51
ruby: 3.2

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

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

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

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

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

services:
postgres:
image: postgres
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: audited_test
ports:
- 5432:5432
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

env:
DB_DATABASE: audited_test
DB_USER: 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
17 changes: 15 additions & 2 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,26 @@ appraise "rails50" do
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.0", "< 5.3"
gem "rails", ">= 5.2.8.1", "< 5.3"
gem "mysql2", ">= 0.4.4", "< 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 "rails60" do
Expand All @@ -37,7 +43,14 @@ appraise "rails61" do
end

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

appraise "rails71" do
gem "rails", ">= 7.1.0.beta1", "< 7.2"
gem "mysql2", ">= 0.4.4"
gem "pg", ">= 1.1"
gem "sqlite3", ">= 1.4"
Expand Down
87 changes: 86 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,90 @@
# Audited ChangeLog

## 5.4.2 (2023-11-30)

- Revert replacing RequetStore with ActiveSupport::CurrentAttributes until it is fully tested.

## 5.4.1 (2023-11-30)

- Replace RequestStore with ActiveSupport::CurrentAttributes - @the-spectator
[#673](https://github.com/collectiveidea/audited/pull/673/)
- Don't require railtie when used outside of Rails - @nicduke38degrees
[#665](https://github.com/collectiveidea/audited/pull/665)

## 5.4.0 (2023-09-30)

- Add Rails 7.1 support - @yuki24
[#686](https://github.com/collectiveidea/audited/pull/686)

## 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)
- Clean up Touch audits - @mcyoung, @akostadinov
[#668](https://github.com/collectiveidea/audited/pull/668)

## 5.3.2 (2023-02-22)

- Touch audit bug fixes - @mcyoung
[#662](https://github.com/collectiveidea/audited/pull/662)

## 5.3.1 (2023-02-21)

- Ensure touch support doesn't cause double audits - @mcyoung
[#660](https://github.com/collectiveidea/audited/pull/660)
- Testing Improvements - @vlad-psh
[#628](https://github.com/collectiveidea/audited/pull/628)
- Testing Improvements - @mcyoung
[#658](https://github.com/collectiveidea/audited/pull/658)

## 5.3.0 (2023-02-14)

- Audit touch calls - @mcyoung
[#657](https://github.com/collectiveidea/audited/pull/657)
- Allow using with Padrino and other non-Rails projects - @nicduke38degrees
[#655](https://github.com/collectiveidea/audited/pull/655)
- Testing updates - @jdufresne
[#652](https://github.com/collectiveidea/audited/pull/652)
[#653](https://github.com/collectiveidea/audited/pull/653)

## 5.2.0 (2023-01-23)

Improved

- config.audit_class can take a string or constant - @rocket-turtle
Fixes overzealous change in 5.1.0 where it only took a string.
[#648](https://github.com/collectiveidea/audited/pull/648)
- README link fix - @jeremiahlukus
[#646](https://github.com/collectiveidea/audited/pull/646)
- Typo fix in GitHub Actions - @jdufresne
[#644](https://github.com/collectiveidea/audited/pull/644)

## 5.1.0 (2022-12-23)

Changed

- config.audit_class takes a string - @simmerz
[#609](https://github.com/collectiveidea/audited/pull/609)
- Filter encrypted attributes automatically - @vlad-psh
[#630](https://github.com/collectiveidea/audited/pull/630)

Improved

- README improvements - @jess, @mstroming
[#605](https://github.com/collectiveidea/audited/pull/605)
[#640](https://github.com/collectiveidea/audited/issues/640)
- Ignore deadlocks in concurrent audit combinations - @Crammaman
[#621](https://github.com/collectiveidea/audited/pull/621)
- Fix timestamped_migrations deprecation warning - @shouichi
[#624](https://github.com/collectiveidea/audited/pull/624)
- Ensure audits are re-enabled after blocks - @dcorlett
[#632](https://github.com/collectiveidea/audited/pull/632)
- Replace raw string where clause with query methods - @macowie
[#642](https://github.com/collectiveidea/audited/pull/642)
- Test against more Ruby/Rails Versions - @enomotodev, @danielmorrison
[#610](https://github.com/collectiveidea/audited/pull/610)
[#643](https://github.com/collectiveidea/audited/pull/643)

## 5.0.2 (2021-09-16)

Added
Expand All @@ -11,7 +96,7 @@ Improved

- Improve loading - @mvastola
[#592](https://github.com/collectiveidea/audited/pull/592)
- Update README - @danirod, clement1234
- Update README - @danirod, @clement1234
[#596](https://github.com/collectiveidea/audited/pull/596)
[#594](https://github.com/collectiveidea/audited/pull/594)

Expand Down
Loading

0 comments on commit 0e41cea

Please # to comment.