audited 5.0.1 → 5.0.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of audited might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f924caa522dc6d65c88066c2d28416dfcef844efa85bdef056da226db12a8984
4
- data.tar.gz: 63bdef3cd4aefea080eb36e6b7c394f5d97b465e3376027a68e3c28f1b278d5c
3
+ metadata.gz: 5bb58e8eb5b0de02a18ac5d089ccade2913c399ec66bcbf97551fd9a9f4afb6b
4
+ data.tar.gz: 905621826a752e1796e0b81a7b448eec483e0ef27ce5de9f02845e0f5fd8be87
5
5
  SHA512:
6
- metadata.gz: acbc5581e27594c84ad817ac7e2f90e02d34786106689a943177552890205d4acfaa5a7ac5489b1a0fbdbc5196028d462e4540d5253ee78b2612bc8f03abfcad
7
- data.tar.gz: 532724043c0c57659a3c3f3d0eaf21c832a6c3863a8607bb802d882bf13b4579e8b051265e6c4082a51bdbc2291f7466508e03c7cb67df90bda6b8c234a6d7a4
6
+ metadata.gz: 62448f486877e8a6c86505a7e5f53b805bf4f3a14cad907f83e69cd5175f43a4c3083a08ab4342bad18f5b8b1b104aa20d2d3c375ff86b7e60d48db9cbe00346
7
+ data.tar.gz: 4bf37e3891074e6f329961c796db27191ead60d225860d3150f310a3888ed3ab52eab1564398ce2f26ad470ba2872979dd14ee48cddf0baaa8f7cbfb63c19091
@@ -0,0 +1,115 @@
1
+ name: CI
2
+
3
+ on:
4
+ pull_request:
5
+ push:
6
+ branches:
7
+ - master
8
+
9
+ jobs:
10
+ build:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ fail-fast: false
14
+ matrix:
15
+ ruby: [2.3, 2.4, 2.5, 2.6, 2.7, 3.0]
16
+ appraisal:
17
+ - rails50
18
+ - rails51
19
+ - rails52
20
+ - rails60
21
+ - rails61
22
+ - rails70
23
+ db: [POSTGRES, MYSQL, SQLITE]
24
+ exclude:
25
+ # MySQL has issues on Ruby 2.3
26
+ # https://github.com/ruby/setup-ruby/issues/150
27
+ - ruby: 2.3
28
+ db: MYSQL
29
+
30
+ # Rails 5.0 supports Ruby 2.2-2.4
31
+ - appraisal: rails50
32
+ ruby: 2.5
33
+ - appraisal: rails50
34
+ ruby: 2.6
35
+ - appraisal: rails50
36
+ ruby: 2.7
37
+ - appraisal: rails50
38
+ ruby: 3.0
39
+
40
+ # Rails 5.1 supports Ruby 2.2-2.5
41
+ - appraisal: rails51
42
+ ruby: 2.6
43
+ - appraisal: rails51
44
+ ruby: 2.7
45
+ - appraisal: rails51
46
+ ruby: 3.0
47
+
48
+ # Rails 5.2 supports Ruby 2.2-2.5
49
+ - appraisal: rails52
50
+ ruby: 2.6
51
+ - appraisal: rails52
52
+ ruby: 2.7
53
+ - appraisal: rails52
54
+ ruby: 3.0
55
+
56
+ # Rails 6.0 supports Ruby 2.5-2.7
57
+ - appraisal: rails60
58
+ ruby: 2.3
59
+ - appraisal: rails60
60
+ ruby: 2.4
61
+ - appraisal: rails60
62
+ ruby: 3.0
63
+
64
+ # Rails 6.1 supports Ruby 2.5+
65
+ - appraisal: rails61
66
+ ruby: 2.3
67
+ - appraisal: rails61
68
+ ruby: 2.4
69
+
70
+ # Rails 7 supports Ruby 2.7+
71
+ - appraisal: rails70
72
+ ruby: 2.3
73
+ - appraisal: rails70
74
+ ruby: 2.4
75
+ - appraisal: rails70
76
+ ruby: 2.5
77
+ - appraisal: rails70
78
+ ruby: 2.6
79
+
80
+ services:
81
+ postgres:
82
+ image: postgres
83
+ env:
84
+ POSTGRES_USER: postgres
85
+ POSTGRES_PASSWORD: postgres
86
+ POSTGRES_DB: audited_test
87
+ ports:
88
+ - 5432:5432
89
+ # needed because the postgres container does not provide a healthcheck
90
+ options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
91
+
92
+ env:
93
+ DB_DATABASE: audited_test
94
+ DB_USER: root
95
+ DB_PASSWORD: 'root'
96
+ DB_HOST: localhost
97
+
98
+ steps:
99
+ - name: Setup MySQL
100
+ run: |
101
+ sudo /etc/init.d/mysql start
102
+ mysql -e 'CREATE DATABASE audited_test;' -uroot -proot
103
+ mysql -e 'SHOW DATABASES;' -uroot -proot
104
+ - uses: actions/checkout@v2
105
+ - name: Copy Gemfile
106
+ run: sed 's/\.\././' gemfiles/${{ matrix.appraisal }}.gemfile > Gemfile
107
+ - name: Set up Ruby ${{ matrix.ruby }}
108
+ uses: ruby/setup-ruby@v1
109
+ with:
110
+ ruby-version: ${{ matrix.ruby }}
111
+ bundler-cache: true
112
+ - name: Run tests
113
+ env:
114
+ DB: ${{ matrix.db }}
115
+ run: bundle exec rake
data/Appraisals CHANGED
@@ -35,3 +35,10 @@ appraise "rails61" do
35
35
  gem "pg", ">= 1.1", "< 2.0"
36
36
  gem "sqlite3", "~> 1.4"
37
37
  end
38
+
39
+ appraise "rails70" do
40
+ gem "rails", ">= 7.0.0.alpha2", "< 7.1"
41
+ gem "mysql2", ">= 0.4.4"
42
+ gem "pg", ">= 1.1"
43
+ gem "sqlite3", ">= 1.4"
44
+ end
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Audited ChangeLog
2
2
 
3
+ ## 5.0.2 (2021-09-16)
4
+
5
+ Added
6
+
7
+ - Relax ActiveRecord version constraint to support Rails 7
8
+ [#597](https://github.com/collectiveidea/audited/pull/597)
9
+
10
+ Improved
11
+
12
+ - Improve loading - @mvastola
13
+ [#592](https://github.com/collectiveidea/audited/pull/592)
14
+ - Update README - @danirod, clement1234
15
+ [#596](https://github.com/collectiveidea/audited/pull/596)
16
+ [#594](https://github.com/collectiveidea/audited/pull/594)
17
+
18
+
3
19
  ## 5.0.1 (2021-06-11)
4
20
 
5
21
  Improved
data/README.md CHANGED
@@ -1,23 +1,29 @@
1
- Audited [![Build Status](https://secure.travis-ci.org/collectiveidea/audited.svg)](http://travis-ci.org/collectiveidea/audited) [![Code Climate](https://codeclimate.com/github/collectiveidea/audited.svg)](https://codeclimate.com/github/collectiveidea/audited) [![Security](https://hakiri.io/github/collectiveidea/audited/master.svg)](https://hakiri.io/github/collectiveidea/audited/master)
1
+ Audited
2
+ [![Gem Version](https://img.shields.io/gem/v/audited.svg)](http://rubygems.org/gems/audited)
3
+ ![Build Status](https://github.com/collectiveidea/audited/actions/workflows/ci.yml/badge.svg)
4
+ [![Code Climate](https://codeclimate.com/github/collectiveidea/audited.svg)](https://codeclimate.com/github/collectiveidea/audited)
5
+ [![Security](https://hakiri.io/github/collectiveidea/audited/master.svg)](https://hakiri.io/github/collectiveidea/audited/master)
2
6
  [![Ruby Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://github.com/testdouble/standard)
3
7
  =======
4
8
 
5
9
  **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.
6
10
 
7
11
 
8
- Audited currently (5.x) works with Rails 6.1, 6.0, 5.2, 5.1, and 5.0.
12
+ Audited currently (5.x) works with Rails 7.0, 6.1, 6.0, 5.2, 5.1, and 5.0.
9
13
 
10
14
  For Rails 4, use gem version 4.x
11
15
  For Rails 3, use gem version 3.0 or see the [3.0-stable branch](https://github.com/collectiveidea/audited/tree/3.0-stable).
12
16
 
13
17
  ## Supported Rubies
14
18
 
15
- Audited supports and is [tested against](http://travis-ci.org/collectiveidea/audited) the following Ruby versions:
19
+ Audited supports and is [tested against](https://github.com/collectiveidea/audited/actions/workflows/ci.yml) the following Ruby versions:
16
20
 
17
- * 2.3.7
18
- * 2.4.4
19
- * 2.5.1
20
- * 2.6.3
21
+ * 2.3
22
+ * 2.4
23
+ * 2.5
24
+ * 2.6
25
+ * 2.7
26
+ * 3.0
21
27
 
22
28
  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).
23
29
 
@@ -30,7 +36,16 @@ Audited is currently ActiveRecord-only. In a previous life, Audited worked with
30
36
  Add the gem to your Gemfile:
31
37
 
32
38
  ```ruby
33
- gem "audited", "~> 4.9"
39
+ gem "audited", "~> 5.0"
40
+ ```
41
+
42
+ And if you're using ```require: false``` you must add initializers like this:
43
+
44
+ ```ruby
45
+ #./config/initializers/audited.rb
46
+ require "audited"
47
+
48
+ Audited::Railtie.initializers.each(&:run)
34
49
  ```
35
50
 
36
51
  Then, from your Rails app directory, create the `audits` table:
@@ -0,0 +1,10 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", ">= 7.0.0.alpha2", "< 7.1"
6
+ gem "mysql2", ">= 0.4.4"
7
+ gem "pg", ">= 1.1"
8
+ gem "sqlite3", ">= 1.4"
9
+
10
+ gemspec name: "audited", path: "../"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Audited
4
- VERSION = "5.0.1"
4
+ VERSION = "5.0.2"
5
5
  end
data/lib/audited.rb CHANGED
@@ -39,9 +39,9 @@ module Audited
39
39
  end
40
40
 
41
41
  require "audited/auditor"
42
- require "audited/audit"
43
42
 
44
43
  ActiveSupport.on_load :active_record do
44
+ require "audited/audit"
45
45
  include Audited::Auditor
46
46
  end
47
47
 
@@ -9,7 +9,8 @@ sqlite3: &SQLITE
9
9
  postgresql: &POSTGRES
10
10
  adapter: postgresql
11
11
  username: postgres
12
- password:
12
+ password: postgres
13
+ host: localhost
13
14
  database: audited_test
14
15
  min_messages: ERROR
15
16
 
@@ -17,7 +18,7 @@ mysql: &MYSQL
17
18
  adapter: mysql2
18
19
  host: localhost
19
20
  username: root
20
- password:
21
+ password: root
21
22
  database: audited_test
22
23
  charset: utf8
23
24
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: audited
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.1
4
+ version: 5.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Keepers
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2021-06-11 00:00:00.000000000 Z
16
+ date: 2021-09-16 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: activerecord
@@ -24,7 +24,7 @@ dependencies:
24
24
  version: '5.0'
25
25
  - - "<"
26
26
  - !ruby/object:Gem::Version
27
- version: '6.2'
27
+ version: '7.1'
28
28
  type: :runtime
29
29
  prerelease: false
30
30
  version_requirements: !ruby/object:Gem::Requirement
@@ -34,7 +34,7 @@ dependencies:
34
34
  version: '5.0'
35
35
  - - "<"
36
36
  - !ruby/object:Gem::Version
37
- version: '6.2'
37
+ version: '7.1'
38
38
  - !ruby/object:Gem::Dependency
39
39
  name: appraisal
40
40
  requirement: !ruby/object:Gem::Requirement
@@ -58,7 +58,7 @@ dependencies:
58
58
  version: '5.0'
59
59
  - - "<"
60
60
  - !ruby/object:Gem::Version
61
- version: '6.2'
61
+ version: '7.1'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
@@ -68,7 +68,7 @@ dependencies:
68
68
  version: '5.0'
69
69
  - - "<"
70
70
  - !ruby/object:Gem::Version
71
- version: '6.2'
71
+ version: '7.1'
72
72
  - !ruby/object:Gem::Dependency
73
73
  name: rspec-rails
74
74
  requirement: !ruby/object:Gem::Requirement
@@ -165,9 +165,9 @@ executables: []
165
165
  extensions: []
166
166
  extra_rdoc_files: []
167
167
  files:
168
+ - ".github/workflows/ci.yml"
168
169
  - ".gitignore"
169
170
  - ".standard.yml"
170
- - ".travis.yml"
171
171
  - ".yardopts"
172
172
  - Appraisals
173
173
  - CHANGELOG.md
@@ -180,6 +180,7 @@ files:
180
180
  - gemfiles/rails52.gemfile
181
181
  - gemfiles/rails60.gemfile
182
182
  - gemfiles/rails61.gemfile
183
+ - gemfiles/rails70.gemfile
183
184
  - lib/audited-rspec.rb
184
185
  - lib/audited.rb
185
186
  - lib/audited/audit.rb
data/.travis.yml DELETED
@@ -1,67 +0,0 @@
1
- language: ruby
2
- cache: bundler
3
- rvm:
4
- - 2.3.8
5
- - 2.4.10
6
- - 2.5.9
7
- - 2.6.7
8
- - 2.7.3
9
- - 3.0.1
10
- - ruby-head
11
- env:
12
- - DB=SQLITE
13
- - DB=POSTGRES
14
- - DB=MYSQL
15
- addons:
16
- postgresql: "9.4"
17
- services:
18
- - mysql
19
- before_install:
20
- # https://github.com/travis-ci/travis-ci/issues/8978
21
- - "travis_retry gem update --system"
22
- gemfile:
23
- - gemfiles/rails50.gemfile
24
- - gemfiles/rails51.gemfile
25
- - gemfiles/rails52.gemfile
26
- - gemfiles/rails60.gemfile
27
- - gemfiles/rails61.gemfile
28
- matrix:
29
- include:
30
- - rvm: 2.6.7
31
- script: bundle exec standardrb
32
- env: DB=standard # make travis build display nicer
33
- exclude:
34
- - rvm: 2.3.8
35
- gemfile: gemfiles/rails61.gemfile
36
- - rvm: 2.4.10
37
- gemfile: gemfiles/rails61.gemfile
38
- - rvm: 2.3.8
39
- gemfile: gemfiles/rails60.gemfile
40
- - rvm: 2.4.10
41
- gemfile: gemfiles/rails60.gemfile
42
- - rvm: 2.6.7
43
- gemfile: gemfiles/rails42.gemfile
44
- - rvm: 2.7.3
45
- gemfile: gemfiles/rails42.gemfile
46
- - rvm: 3.0.1
47
- gemfile: gemfiles/rails42.gemfile
48
- - rvm: 3.0.1
49
- gemfile: gemfiles/rails50.gemfile
50
- - rvm: 3.0.1
51
- gemfile: gemfiles/rails51.gemfile
52
- - rvm: 3.0.1
53
- gemfile: gemfiles/rails52.gemfile
54
- - rvm: ruby-head
55
- gemfile: gemfiles/rails42.gemfile
56
- allow_failures:
57
- - rvm: ruby-head
58
- fast_finish: true
59
- branches:
60
- only:
61
- - master
62
- - /.*-stable$/
63
- notifications:
64
- webhooks:
65
- urls:
66
- - https://buildlight.collectiveidea.com/
67
- on_start: always