rails_audit 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/LICENSE +20 -165
- data/README.md +15 -6
- data/app/controllers/auditor/admin/approvals_controller.rb +44 -0
- data/app/controllers/auditor/admin/audits_controller.rb +11 -0
- data/app/controllers/auditor/admin/base_controller.rb +4 -0
- data/app/controllers/auditor/admin/verifications_controller.rb +61 -0
- data/app/controllers/auditor/admin/verifiers_controller.rb +69 -0
- data/app/controllers/auditor/controller/application.rb +32 -0
- data/app/models/auditor/approval.rb +5 -0
- data/app/models/auditor/audit.rb +5 -0
- data/app/models/auditor/ext/audited.rb +58 -0
- data/app/models/auditor/ext/verifiable.rb +10 -0
- data/app/models/auditor/ext/verified.rb +25 -0
- data/app/models/auditor/model/approval.rb +59 -0
- data/app/models/auditor/model/approving.rb +65 -0
- data/app/models/auditor/model/audit.rb +25 -0
- data/app/models/auditor/model/verification.rb +32 -0
- data/app/models/auditor/model/verifier.rb +20 -0
- data/app/models/auditor/verification.rb +5 -0
- data/app/models/auditor/verifier.rb +5 -0
- data/app/models/auditor.rb +11 -0
- data/app/views/auditor/_approvals.html.erb +14 -0
- data/app/views/{audit → auditor}/_checks.html.erb +0 -0
- data/app/views/auditor/admin/approvals/_filter.html.erb +7 -0
- data/app/views/auditor/admin/approvals/_form.html.erb +6 -0
- data/app/views/auditor/admin/approvals/_index.html.erb +10 -0
- data/app/views/auditor/admin/approvals/_show_table.html.erb +28 -0
- data/app/views/auditor/admin/approvals/_table.html.erb +28 -0
- data/app/views/auditor/admin/approvals/index.js.erb +3 -0
- data/{test/dummy/app/assets/javascripts/footer.js → app/views/auditor/admin/audits/_button.html.erb} +0 -0
- data/app/views/auditor/admin/audits/_index_tbody.html.erb +38 -0
- data/app/views/auditor/admin/audits/_index_thead.html.erb +4 -0
- data/app/views/auditor/admin/audits/index.html.erb +7 -0
- data/app/views/auditor/admin/verifications/_edit_form.html.erb +7 -0
- data/app/views/auditor/admin/verifications/_filter_form.html.erb +5 -0
- data/app/views/auditor/admin/verifications/_index_tbody.html.erb +4 -0
- data/app/views/auditor/admin/verifications/_index_thead.html.erb +5 -0
- data/app/views/auditor/admin/verifications/_new_form.html.erb +7 -0
- data/app/views/auditor/admin/verifications/_show_table.html.erb +16 -0
- data/app/views/auditor/admin/verifiers/_edit_form.html.erb +3 -0
- data/app/views/auditor/admin/verifiers/_filter_form.html.erb +9 -0
- data/app/views/auditor/admin/verifiers/_form.html.erb +5 -0
- data/app/views/auditor/admin/verifiers/_index_tbody.html.erb +3 -0
- data/app/views/auditor/admin/verifiers/_index_thead.html.erb +4 -0
- data/app/views/auditor/admin/verifiers/_member_field.html.erb +1 -0
- data/app/views/auditor/admin/verifiers/_new_form.html.erb +3 -0
- data/app/views/auditor/admin/verifiers/_show_table.html.erb +24 -0
- data/app/views/auditor/admin/verifiers/members.turbo_stream.erb +3 -0
- data/config/locales/zh.controller.yml +13 -0
- data/config/locales/zh.enum.yml +7 -0
- data/config/locales/zh.yml +16 -7
- data/config/routes.rb +21 -6
- data/lib/rails_audit/config.rb +3 -4
- data/lib/rails_audit/engine.rb +15 -5
- data/lib/rails_audit.rb +2 -2
- data/test/controllers/audit/admin/approvals_controller_test.rb +36 -0
- data/test/dummy/Gemfile +54 -0
- data/test/dummy/Gemfile.lock +382 -0
- data/test/dummy/README.md +4 -1
- data/test/dummy/app/assets/images/logo.png +0 -0
- data/test/dummy/app/assets/javascripts/admin/application.js +1 -0
- data/test/dummy/app/assets/javascripts/application.js +11 -2
- data/test/dummy/app/assets/javascripts/phone.js +5 -0
- data/test/dummy/app/assets/stylesheets/css.scss +4 -0
- data/test/dummy/app/controllers/active_storage/base_controller.rb +19 -0
- data/test/dummy/app/controllers/admin_controller.rb +0 -5
- data/test/dummy/app/controllers/application_controller.rb +10 -1
- data/test/dummy/app/controllers/me_controller.rb +4 -0
- data/test/dummy/app/controllers/my_controller.rb +1 -6
- data/test/dummy/app/models/auth/user.rb +7 -0
- data/test/dummy/app/views/home/index.css +3 -0
- data/test/dummy/bin/bundle +1 -1
- data/test/dummy/bin/setup +1 -1
- data/test/dummy/bin/vite +19 -0
- data/test/dummy/bin/yarn +11 -0
- data/test/dummy/config/application.rb +12 -6
- data/test/dummy/config/boot.rb +8 -4
- data/test/dummy/config/credentials/development.key +1 -0
- data/test/dummy/config/credentials/test.key +1 -0
- data/test/dummy/config/credentials.yml.enc +1 -1
- data/test/dummy/config/database.yml +7 -3
- data/test/dummy/config/environment.rb +0 -2
- data/test/dummy/config/environments/development.rb +18 -35
- data/test/dummy/config/environments/production.rb +1 -13
- data/test/dummy/config/environments/test.rb +3 -0
- data/test/dummy/config/initializers/mime_types.rb +0 -4
- data/test/dummy/config/initializers/new_framework_defaults.rb +0 -4
- data/test/dummy/config/locales/en.yml +1 -22
- data/test/dummy/config/master.key +1 -0
- data/test/dummy/config/puma.rb +28 -41
- data/test/dummy/config/routes.rb +9 -1
- data/test/dummy/config/storage.yml +8 -8
- data/test/dummy/config/vite/base.js +5 -0
- data/test/dummy/config/vite/development.js +12 -0
- data/test/dummy/config/vite/production.js +6 -0
- data/test/dummy/config.ru +2 -0
- data/test/dummy/lib/deploy.rb +115 -0
- data/test/dummy/package.json +23 -3
- data/test/dummy/postcss.config.js +11 -0
- data/test/dummy/yarn.lock +2139 -7
- data/test/factories/approvals.rb +7 -0
- data/test/factories/infos.rb +8 -0
- data/test/{the_audit_test.rb → rails_audit_test.rb} +3 -1
- data/test/test_helper.rb +9 -16
- metadata +133 -165
- data/app/controllers/audit/admin/audits_controller.rb +0 -12
- data/app/controllers/audit/admin/base_controller.rb +0 -7
- data/app/controllers/audit/admin/check_settings_controller.rb +0 -52
- data/app/controllers/audit/admin/checks_controller.rb +0 -65
- data/app/models/concerns/auditable.rb +0 -58
- data/app/models/concerns/check_machine.rb +0 -9
- data/app/models/rails_audit/audit.rb +0 -14
- data/app/models/rails_audit/check.rb +0 -15
- data/app/models/rails_audit/check_setting.rb +0 -4
- data/app/views/audit/admin/audits/_index.html.erb +0 -9
- data/app/views/audit/admin/audits/_table.html.erb +0 -61
- data/app/views/audit/admin/audits/index.html.erb +0 -3
- data/app/views/audit/admin/audits/index.js.erb +0 -8
- data/app/views/audit/admin/check_settings/_form.html.erb +0 -4
- data/app/views/audit/admin/check_settings/_search_form.html.erb +0 -7
- data/app/views/audit/admin/check_settings/edit.html.erb +0 -9
- data/app/views/audit/admin/check_settings/index.html.erb +0 -41
- data/app/views/audit/admin/check_settings/new.html.erb +0 -9
- data/app/views/audit/admin/check_settings/show.html.erb +0 -10
- data/app/views/audit/admin/checks/_new.html.erb +0 -17
- data/app/views/audit/admin/checks/_search_form.html.erb +0 -7
- data/app/views/audit/admin/checks/create.js.erb +0 -2
- data/app/views/audit/admin/checks/edit.html.erb +0 -16
- data/app/views/audit/admin/checks/index.html.erb +0 -49
- data/app/views/audit/admin/checks/new.html.erb +0 -9
- data/app/views/audit/admin/checks/new.js.erb +0 -4
- data/app/views/audit/admin/checks/show.html.erb +0 -26
- data/db/migrate/20170314035239_rails_audit_init.rb +0 -35
- data/lib/rails_audit/controller_helper.rb +0 -39
- data/lib/rails_audit/version.rb +0 -3
- data/test/dummy/app/assets/config/manifest.js +0 -10
- data/test/dummy/app/assets/javascripts/cable.js +0 -13
- data/test/dummy/app/assets/stylesheets/application.css +0 -5
- data/test/dummy/app/controllers/api_controller.rb +0 -3
- data/test/dummy/app/models/application_record.rb +0 -3
- data/test/dummy/app/models/user.rb +0 -4
- data/test/dummy/app/views/layouts/_footer.html.erb +0 -10
- data/test/dummy/app/views/layouts/_navbar.html.erb +0 -7
- data/test/dummy/app/views/layouts/application.html.erb +0 -19
- data/test/dummy/app/views/layouts/mailer.html.erb +0 -13
- data/test/dummy/app/views/layouts/mailer.text.erb +0 -1
- data/test/dummy/bin/update +0 -29
- data/test/dummy/config/database.yml.mysql +0 -14
- data/test/dummy/config/database.yml.sqlite3 +0 -12
- data/test/dummy/config/initializers/assets.rb +0 -10
- data/test/dummy/config/secrets.yml +0 -22
- data/test/dummy/db/migrate/20180525090830_create_active_storage_tables.active_storage.rb +0 -26
- data/test/dummy/db/migrate/20180916100159_create_users.rb +0 -11
- data/test/dummy/log/development.log +0 -2
- data/test/dummy/vendor/nondigest_assets/fonts/themes/default/assets/fonts/brand-icons.eot +0 -0
- data/test/dummy/vendor/nondigest_assets/fonts/themes/default/assets/fonts/brand-icons.svg +0 -1008
- data/test/dummy/vendor/nondigest_assets/fonts/themes/default/assets/fonts/brand-icons.ttf +0 -0
- data/test/dummy/vendor/nondigest_assets/fonts/themes/default/assets/fonts/brand-icons.woff +0 -0
- data/test/dummy/vendor/nondigest_assets/fonts/themes/default/assets/fonts/brand-icons.woff2 +0 -0
- data/test/dummy/vendor/nondigest_assets/fonts/themes/default/assets/fonts/icons.eot +0 -0
- data/test/dummy/vendor/nondigest_assets/fonts/themes/default/assets/fonts/icons.otf +0 -0
- data/test/dummy/vendor/nondigest_assets/fonts/themes/default/assets/fonts/icons.svg +0 -1518
- data/test/dummy/vendor/nondigest_assets/fonts/themes/default/assets/fonts/icons.ttf +0 -0
- data/test/dummy/vendor/nondigest_assets/fonts/themes/default/assets/fonts/icons.woff +0 -0
- data/test/dummy/vendor/nondigest_assets/fonts/themes/default/assets/fonts/icons.woff2 +0 -0
- data/test/dummy/vendor/nondigest_assets/fonts/themes/default/assets/fonts/outline-icons.eot +0 -0
- data/test/dummy/vendor/nondigest_assets/fonts/themes/default/assets/fonts/outline-icons.svg +0 -366
- data/test/dummy/vendor/nondigest_assets/fonts/themes/default/assets/fonts/outline-icons.ttf +0 -0
- data/test/dummy/vendor/nondigest_assets/fonts/themes/default/assets/fonts/outline-icons.woff +0 -0
- data/test/dummy/vendor/nondigest_assets/fonts/themes/default/assets/fonts/outline-icons.woff2 +0 -0
- data/test/dummy/vendor/nondigest_assets/fonts/themes/default/assets/images/flags.png +0 -0
data/test/test_helper.rb
CHANGED
@@ -1,20 +1,13 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
ENV['RAILS_ENV'] = 'test'
|
2
|
+
require_relative 'dummy/config/environment'
|
3
|
+
require 'rails/test_help'
|
4
|
+
require 'minitest/mock'
|
5
|
+
require 'factory_bot'
|
3
6
|
|
4
|
-
require File.expand_path("../../test/dummy/config/environment.rb", __FILE__)
|
5
|
-
ActiveRecord::Migrator.migrations_paths = [File.expand_path("../../test/dummy/db/migrate", __FILE__)]
|
6
|
-
require "rails/test_help"
|
7
|
-
|
8
|
-
# Filter out Minitest backtrace while allowing backtrace from other libraries
|
9
|
-
# to be shown.
|
10
7
|
Minitest.backtrace_filter = Minitest::BacktraceFilter.new
|
8
|
+
FactoryBot.find_definitions
|
11
9
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
# Load fixtures from the engine
|
16
|
-
if ActiveSupport::TestCase.respond_to?(:fixture_path=)
|
17
|
-
ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
|
18
|
-
ActionDispatch::IntegrationTest.fixture_path = ActiveSupport::TestCase.fixture_path
|
19
|
-
ActiveSupport::TestCase.fixtures :all
|
10
|
+
class ActiveSupport::TestCase
|
11
|
+
include FactoryBot::Syntax::Methods
|
12
|
+
self.file_fixture_path = File.expand_path('fixtures/files', __dir__)
|
20
13
|
end
|
metadata
CHANGED
@@ -1,35 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_audit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- qinmingyuan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-10-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: rails
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ">="
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '5.0'
|
20
|
-
- - "<="
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: '6.0'
|
23
|
-
type: :runtime
|
24
|
-
prerelease: false
|
25
|
-
version_requirements: !ruby/object:Gem::Requirement
|
26
|
-
requirements:
|
27
|
-
- - ">="
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: '5.0'
|
30
|
-
- - "<="
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: '6.0'
|
33
13
|
- !ruby/object:Gem::Dependency
|
34
14
|
name: rails_com
|
35
15
|
requirement: !ruby/object:Gem::Requirement
|
@@ -54,89 +34,105 @@ files:
|
|
54
34
|
- LICENSE
|
55
35
|
- README.md
|
56
36
|
- Rakefile
|
57
|
-
- app/controllers/
|
58
|
-
- app/controllers/
|
59
|
-
- app/controllers/
|
60
|
-
- app/controllers/
|
61
|
-
- app/
|
62
|
-
- app/
|
63
|
-
- app/models/
|
64
|
-
- app/models/
|
65
|
-
- app/models/
|
66
|
-
- app/
|
67
|
-
- app/
|
68
|
-
- app/
|
69
|
-
- app/
|
70
|
-
- app/
|
71
|
-
- app/
|
72
|
-
- app/
|
73
|
-
- app/
|
74
|
-
- app/
|
75
|
-
- app/
|
76
|
-
- app/views/
|
77
|
-
- app/views/
|
78
|
-
- app/views/
|
79
|
-
- app/views/
|
80
|
-
- app/views/
|
81
|
-
- app/views/
|
82
|
-
- app/views/
|
83
|
-
- app/views/
|
84
|
-
- app/views/
|
37
|
+
- app/controllers/auditor/admin/approvals_controller.rb
|
38
|
+
- app/controllers/auditor/admin/audits_controller.rb
|
39
|
+
- app/controllers/auditor/admin/base_controller.rb
|
40
|
+
- app/controllers/auditor/admin/verifications_controller.rb
|
41
|
+
- app/controllers/auditor/admin/verifiers_controller.rb
|
42
|
+
- app/controllers/auditor/controller/application.rb
|
43
|
+
- app/models/auditor.rb
|
44
|
+
- app/models/auditor/approval.rb
|
45
|
+
- app/models/auditor/audit.rb
|
46
|
+
- app/models/auditor/ext/audited.rb
|
47
|
+
- app/models/auditor/ext/verifiable.rb
|
48
|
+
- app/models/auditor/ext/verified.rb
|
49
|
+
- app/models/auditor/model/approval.rb
|
50
|
+
- app/models/auditor/model/approving.rb
|
51
|
+
- app/models/auditor/model/audit.rb
|
52
|
+
- app/models/auditor/model/verification.rb
|
53
|
+
- app/models/auditor/model/verifier.rb
|
54
|
+
- app/models/auditor/verification.rb
|
55
|
+
- app/models/auditor/verifier.rb
|
56
|
+
- app/views/auditor/_approvals.html.erb
|
57
|
+
- app/views/auditor/_checks.html.erb
|
58
|
+
- app/views/auditor/admin/approvals/_filter.html.erb
|
59
|
+
- app/views/auditor/admin/approvals/_form.html.erb
|
60
|
+
- app/views/auditor/admin/approvals/_index.html.erb
|
61
|
+
- app/views/auditor/admin/approvals/_show_table.html.erb
|
62
|
+
- app/views/auditor/admin/approvals/_table.html.erb
|
63
|
+
- app/views/auditor/admin/approvals/index.js.erb
|
64
|
+
- app/views/auditor/admin/audits/_button.html.erb
|
65
|
+
- app/views/auditor/admin/audits/_index_tbody.html.erb
|
66
|
+
- app/views/auditor/admin/audits/_index_thead.html.erb
|
67
|
+
- app/views/auditor/admin/audits/index.html.erb
|
68
|
+
- app/views/auditor/admin/verifications/_edit_form.html.erb
|
69
|
+
- app/views/auditor/admin/verifications/_filter_form.html.erb
|
70
|
+
- app/views/auditor/admin/verifications/_index_tbody.html.erb
|
71
|
+
- app/views/auditor/admin/verifications/_index_thead.html.erb
|
72
|
+
- app/views/auditor/admin/verifications/_new_form.html.erb
|
73
|
+
- app/views/auditor/admin/verifications/_show_table.html.erb
|
74
|
+
- app/views/auditor/admin/verifiers/_edit_form.html.erb
|
75
|
+
- app/views/auditor/admin/verifiers/_filter_form.html.erb
|
76
|
+
- app/views/auditor/admin/verifiers/_form.html.erb
|
77
|
+
- app/views/auditor/admin/verifiers/_index_tbody.html.erb
|
78
|
+
- app/views/auditor/admin/verifiers/_index_thead.html.erb
|
79
|
+
- app/views/auditor/admin/verifiers/_member_field.html.erb
|
80
|
+
- app/views/auditor/admin/verifiers/_new_form.html.erb
|
81
|
+
- app/views/auditor/admin/verifiers/_show_table.html.erb
|
82
|
+
- app/views/auditor/admin/verifiers/members.turbo_stream.erb
|
85
83
|
- config/locales/en.yml
|
84
|
+
- config/locales/zh.controller.yml
|
85
|
+
- config/locales/zh.enum.yml
|
86
86
|
- config/locales/zh.yml
|
87
87
|
- config/routes.rb
|
88
|
-
- db/migrate/20170314035239_rails_audit_init.rb
|
89
88
|
- lib/rails_audit.rb
|
90
89
|
- lib/rails_audit/config.rb
|
91
|
-
- lib/rails_audit/controller_helper.rb
|
92
90
|
- lib/rails_audit/engine.rb
|
93
|
-
-
|
91
|
+
- test/controllers/audit/admin/approvals_controller_test.rb
|
92
|
+
- test/dummy/Gemfile
|
93
|
+
- test/dummy/Gemfile.lock
|
94
94
|
- test/dummy/README.md
|
95
95
|
- test/dummy/Rakefile
|
96
|
-
- test/dummy/app/assets/config/manifest.js
|
97
96
|
- test/dummy/app/assets/images/default_avatar.jpg
|
97
|
+
- test/dummy/app/assets/images/logo.png
|
98
|
+
- test/dummy/app/assets/javascripts/admin/application.js
|
98
99
|
- test/dummy/app/assets/javascripts/application.js
|
99
|
-
- test/dummy/app/assets/javascripts/
|
100
|
-
- test/dummy/app/assets/
|
101
|
-
- test/dummy/app/assets/stylesheets/application.css
|
100
|
+
- test/dummy/app/assets/javascripts/phone.js
|
101
|
+
- test/dummy/app/assets/stylesheets/css.scss
|
102
102
|
- test/dummy/app/channels/application_cable/channel.rb
|
103
103
|
- test/dummy/app/channels/application_cable/connection.rb
|
104
|
+
- test/dummy/app/controllers/active_storage/base_controller.rb
|
104
105
|
- test/dummy/app/controllers/admin_controller.rb
|
105
|
-
- test/dummy/app/controllers/api_controller.rb
|
106
106
|
- test/dummy/app/controllers/application_controller.rb
|
107
107
|
- test/dummy/app/controllers/home_controller.rb
|
108
|
+
- test/dummy/app/controllers/me_controller.rb
|
108
109
|
- test/dummy/app/controllers/my_controller.rb
|
109
110
|
- test/dummy/app/helpers/application_helper.rb
|
110
111
|
- test/dummy/app/jobs/application_job.rb
|
111
112
|
- test/dummy/app/mailers/application_mailer.rb
|
112
|
-
- test/dummy/app/models/
|
113
|
-
- test/dummy/app/
|
113
|
+
- test/dummy/app/models/auth/user.rb
|
114
|
+
- test/dummy/app/views/home/index.css
|
114
115
|
- test/dummy/app/views/home/index.html.erb
|
115
|
-
- test/dummy/app/views/layouts/_footer.html.erb
|
116
|
-
- test/dummy/app/views/layouts/_navbar.html.erb
|
117
116
|
- test/dummy/app/views/layouts/_right_menu.html.erb
|
118
|
-
- test/dummy/app/views/layouts/application.html.erb
|
119
|
-
- test/dummy/app/views/layouts/mailer.html.erb
|
120
|
-
- test/dummy/app/views/layouts/mailer.text.erb
|
121
117
|
- test/dummy/bin/bundle
|
122
118
|
- test/dummy/bin/rails
|
123
119
|
- test/dummy/bin/rake
|
124
120
|
- test/dummy/bin/setup
|
125
|
-
- test/dummy/bin/
|
121
|
+
- test/dummy/bin/vite
|
122
|
+
- test/dummy/bin/yarn
|
126
123
|
- test/dummy/config.ru
|
127
124
|
- test/dummy/config/application.rb
|
128
125
|
- test/dummy/config/boot.rb
|
129
126
|
- test/dummy/config/cable.yml
|
130
127
|
- test/dummy/config/credentials.yml.enc
|
128
|
+
- test/dummy/config/credentials/development.key
|
129
|
+
- test/dummy/config/credentials/test.key
|
131
130
|
- test/dummy/config/database.yml
|
132
|
-
- test/dummy/config/database.yml.mysql
|
133
|
-
- test/dummy/config/database.yml.sqlite3
|
134
131
|
- test/dummy/config/environment.rb
|
135
132
|
- test/dummy/config/environments/development.rb
|
136
133
|
- test/dummy/config/environments/production.rb
|
137
134
|
- test/dummy/config/environments/test.rb
|
138
135
|
- test/dummy/config/initializers/application_controller_renderer.rb
|
139
|
-
- test/dummy/config/initializers/assets.rb
|
140
136
|
- test/dummy/config/initializers/backtrace_silencers.rb
|
141
137
|
- test/dummy/config/initializers/cookies_serializer.rb
|
142
138
|
- test/dummy/config/initializers/filter_parameter_logging.rb
|
@@ -146,45 +142,32 @@ files:
|
|
146
142
|
- test/dummy/config/initializers/session_store.rb
|
147
143
|
- test/dummy/config/initializers/wrap_parameters.rb
|
148
144
|
- test/dummy/config/locales/en.yml
|
145
|
+
- test/dummy/config/master.key
|
149
146
|
- test/dummy/config/puma.rb
|
150
147
|
- test/dummy/config/routes.rb
|
151
|
-
- test/dummy/config/secrets.yml
|
152
148
|
- test/dummy/config/spring.rb
|
153
149
|
- test/dummy/config/storage.yml
|
154
|
-
- test/dummy/
|
155
|
-
- test/dummy/
|
156
|
-
- test/dummy/
|
150
|
+
- test/dummy/config/vite/base.js
|
151
|
+
- test/dummy/config/vite/development.js
|
152
|
+
- test/dummy/config/vite/production.js
|
153
|
+
- test/dummy/lib/deploy.rb
|
157
154
|
- test/dummy/package.json
|
155
|
+
- test/dummy/postcss.config.js
|
158
156
|
- test/dummy/public/404.html
|
159
157
|
- test/dummy/public/422.html
|
160
158
|
- test/dummy/public/500.html
|
161
159
|
- test/dummy/public/apple-touch-icon-precomposed.png
|
162
160
|
- test/dummy/public/apple-touch-icon.png
|
163
161
|
- test/dummy/public/favicon.ico
|
164
|
-
- test/dummy/vendor/nondigest_assets/fonts/themes/default/assets/fonts/brand-icons.eot
|
165
|
-
- test/dummy/vendor/nondigest_assets/fonts/themes/default/assets/fonts/brand-icons.svg
|
166
|
-
- test/dummy/vendor/nondigest_assets/fonts/themes/default/assets/fonts/brand-icons.ttf
|
167
|
-
- test/dummy/vendor/nondigest_assets/fonts/themes/default/assets/fonts/brand-icons.woff
|
168
|
-
- test/dummy/vendor/nondigest_assets/fonts/themes/default/assets/fonts/brand-icons.woff2
|
169
|
-
- test/dummy/vendor/nondigest_assets/fonts/themes/default/assets/fonts/icons.eot
|
170
|
-
- test/dummy/vendor/nondigest_assets/fonts/themes/default/assets/fonts/icons.otf
|
171
|
-
- test/dummy/vendor/nondigest_assets/fonts/themes/default/assets/fonts/icons.svg
|
172
|
-
- test/dummy/vendor/nondigest_assets/fonts/themes/default/assets/fonts/icons.ttf
|
173
|
-
- test/dummy/vendor/nondigest_assets/fonts/themes/default/assets/fonts/icons.woff
|
174
|
-
- test/dummy/vendor/nondigest_assets/fonts/themes/default/assets/fonts/icons.woff2
|
175
|
-
- test/dummy/vendor/nondigest_assets/fonts/themes/default/assets/fonts/outline-icons.eot
|
176
|
-
- test/dummy/vendor/nondigest_assets/fonts/themes/default/assets/fonts/outline-icons.svg
|
177
|
-
- test/dummy/vendor/nondigest_assets/fonts/themes/default/assets/fonts/outline-icons.ttf
|
178
|
-
- test/dummy/vendor/nondigest_assets/fonts/themes/default/assets/fonts/outline-icons.woff
|
179
|
-
- test/dummy/vendor/nondigest_assets/fonts/themes/default/assets/fonts/outline-icons.woff2
|
180
|
-
- test/dummy/vendor/nondigest_assets/fonts/themes/default/assets/images/flags.png
|
181
162
|
- test/dummy/yarn.lock
|
163
|
+
- test/factories/approvals.rb
|
164
|
+
- test/factories/infos.rb
|
182
165
|
- test/integration/navigation_test.rb
|
166
|
+
- test/rails_audit_test.rb
|
183
167
|
- test/test_helper.rb
|
184
|
-
- test/the_audit_test.rb
|
185
168
|
homepage: https://github.com/work-design/rails_audit
|
186
169
|
licenses:
|
187
|
-
-
|
170
|
+
- MIT
|
188
171
|
metadata: {}
|
189
172
|
post_install_message:
|
190
173
|
rdoc_options: []
|
@@ -201,100 +184,85 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
201
184
|
- !ruby/object:Gem::Version
|
202
185
|
version: '0'
|
203
186
|
requirements: []
|
204
|
-
|
205
|
-
rubygems_version: 2.7.6
|
187
|
+
rubygems_version: 3.2.22
|
206
188
|
signing_key:
|
207
189
|
specification_version: 4
|
208
190
|
summary: Audit changes for model with operator
|
209
191
|
test_files:
|
210
|
-
- test/
|
211
|
-
- test/dummy/
|
212
|
-
- test/dummy/
|
213
|
-
- test/dummy/
|
192
|
+
- test/controllers/audit/admin/approvals_controller_test.rb
|
193
|
+
- test/dummy/Gemfile
|
194
|
+
- test/dummy/Gemfile.lock
|
195
|
+
- test/dummy/README.md
|
196
|
+
- test/dummy/Rakefile
|
197
|
+
- test/dummy/app/assets/images/default_avatar.jpg
|
198
|
+
- test/dummy/app/assets/images/logo.png
|
199
|
+
- test/dummy/app/assets/javascripts/admin/application.js
|
200
|
+
- test/dummy/app/assets/javascripts/application.js
|
201
|
+
- test/dummy/app/assets/javascripts/phone.js
|
202
|
+
- test/dummy/app/assets/stylesheets/css.scss
|
203
|
+
- test/dummy/app/channels/application_cable/channel.rb
|
204
|
+
- test/dummy/app/channels/application_cable/connection.rb
|
205
|
+
- test/dummy/app/controllers/active_storage/base_controller.rb
|
206
|
+
- test/dummy/app/controllers/admin_controller.rb
|
214
207
|
- test/dummy/app/controllers/application_controller.rb
|
215
|
-
- test/dummy/app/controllers/api_controller.rb
|
216
|
-
- test/dummy/app/controllers/my_controller.rb
|
217
208
|
- test/dummy/app/controllers/home_controller.rb
|
218
|
-
- test/dummy/app/controllers/
|
209
|
+
- test/dummy/app/controllers/me_controller.rb
|
210
|
+
- test/dummy/app/controllers/my_controller.rb
|
211
|
+
- test/dummy/app/helpers/application_helper.rb
|
212
|
+
- test/dummy/app/jobs/application_job.rb
|
213
|
+
- test/dummy/app/mailers/application_mailer.rb
|
214
|
+
- test/dummy/app/models/auth/user.rb
|
215
|
+
- test/dummy/app/views/home/index.css
|
219
216
|
- test/dummy/app/views/home/index.html.erb
|
220
|
-
- test/dummy/app/views/layouts/_navbar.html.erb
|
221
|
-
- test/dummy/app/views/layouts/application.html.erb
|
222
|
-
- test/dummy/app/views/layouts/mailer.html.erb
|
223
|
-
- test/dummy/app/views/layouts/_footer.html.erb
|
224
|
-
- test/dummy/app/views/layouts/mailer.text.erb
|
225
217
|
- test/dummy/app/views/layouts/_right_menu.html.erb
|
226
|
-
- test/dummy/app/assets/config/manifest.js
|
227
|
-
- test/dummy/app/assets/images/default_avatar.jpg
|
228
|
-
- test/dummy/app/assets/javascripts/cable.js
|
229
|
-
- test/dummy/app/assets/javascripts/application.js
|
230
|
-
- test/dummy/app/assets/javascripts/footer.js
|
231
|
-
- test/dummy/app/assets/stylesheets/application.css
|
232
|
-
- test/dummy/app/helpers/application_helper.rb
|
233
|
-
- test/dummy/app/channels/application_cable/connection.rb
|
234
|
-
- test/dummy/app/channels/application_cable/channel.rb
|
235
|
-
- test/dummy/bin/update
|
236
|
-
- test/dummy/bin/rake
|
237
|
-
- test/dummy/bin/setup
|
238
218
|
- test/dummy/bin/bundle
|
239
219
|
- test/dummy/bin/rails
|
240
|
-
- test/dummy/
|
241
|
-
- test/dummy/
|
242
|
-
- test/dummy/
|
243
|
-
- test/dummy/
|
244
|
-
- test/dummy/config/cable.yml
|
245
|
-
- test/dummy/config/environments/production.rb
|
246
|
-
- test/dummy/config/environments/development.rb
|
247
|
-
- test/dummy/config/environments/test.rb
|
248
|
-
- test/dummy/config/spring.rb
|
249
|
-
- test/dummy/config/environment.rb
|
250
|
-
- test/dummy/config/storage.yml
|
220
|
+
- test/dummy/bin/rake
|
221
|
+
- test/dummy/bin/setup
|
222
|
+
- test/dummy/bin/vite
|
223
|
+
- test/dummy/bin/yarn
|
251
224
|
- test/dummy/config/application.rb
|
252
|
-
- test/dummy/config/
|
225
|
+
- test/dummy/config/boot.rb
|
226
|
+
- test/dummy/config/cable.yml
|
227
|
+
- test/dummy/config/credentials/development.key
|
228
|
+
- test/dummy/config/credentials/test.key
|
253
229
|
- test/dummy/config/credentials.yml.enc
|
254
230
|
- test/dummy/config/database.yml
|
255
|
-
- test/dummy/config/
|
256
|
-
- test/dummy/config/
|
231
|
+
- test/dummy/config/environment.rb
|
232
|
+
- test/dummy/config/environments/development.rb
|
233
|
+
- test/dummy/config/environments/production.rb
|
234
|
+
- test/dummy/config/environments/test.rb
|
257
235
|
- test/dummy/config/initializers/application_controller_renderer.rb
|
258
236
|
- test/dummy/config/initializers/backtrace_silencers.rb
|
259
|
-
- test/dummy/config/initializers/
|
237
|
+
- test/dummy/config/initializers/cookies_serializer.rb
|
260
238
|
- test/dummy/config/initializers/filter_parameter_logging.rb
|
239
|
+
- test/dummy/config/initializers/inflections.rb
|
240
|
+
- test/dummy/config/initializers/mime_types.rb
|
241
|
+
- test/dummy/config/initializers/new_framework_defaults.rb
|
261
242
|
- test/dummy/config/initializers/session_store.rb
|
262
243
|
- test/dummy/config/initializers/wrap_parameters.rb
|
263
|
-
- test/dummy/config/
|
264
|
-
- test/dummy/config/
|
265
|
-
- test/dummy/config/
|
266
|
-
- test/dummy/config/
|
244
|
+
- test/dummy/config/locales/en.yml
|
245
|
+
- test/dummy/config/master.key
|
246
|
+
- test/dummy/config/puma.rb
|
247
|
+
- test/dummy/config/routes.rb
|
248
|
+
- test/dummy/config/spring.rb
|
249
|
+
- test/dummy/config/storage.yml
|
250
|
+
- test/dummy/config/vite/base.js
|
251
|
+
- test/dummy/config/vite/development.js
|
252
|
+
- test/dummy/config/vite/production.js
|
267
253
|
- test/dummy/config.ru
|
268
|
-
- test/dummy/
|
269
|
-
- test/dummy/
|
270
|
-
- test/dummy/
|
271
|
-
- test/dummy/public/
|
254
|
+
- test/dummy/lib/deploy.rb
|
255
|
+
- test/dummy/package.json
|
256
|
+
- test/dummy/postcss.config.js
|
257
|
+
- test/dummy/public/404.html
|
272
258
|
- test/dummy/public/422.html
|
273
|
-
- test/dummy/public/apple-touch-icon.png
|
274
259
|
- test/dummy/public/500.html
|
275
|
-
- test/dummy/public/404.html
|
276
260
|
- test/dummy/public/apple-touch-icon-precomposed.png
|
277
|
-
- test/dummy/
|
278
|
-
- test/dummy/
|
279
|
-
- test/dummy/
|
280
|
-
- test/
|
281
|
-
- test/
|
282
|
-
- test/dummy/vendor/nondigest_assets/fonts/themes/default/assets/fonts/brand-icons.woff
|
283
|
-
- test/dummy/vendor/nondigest_assets/fonts/themes/default/assets/fonts/outline-icons.ttf
|
284
|
-
- test/dummy/vendor/nondigest_assets/fonts/themes/default/assets/fonts/icons.eot
|
285
|
-
- test/dummy/vendor/nondigest_assets/fonts/themes/default/assets/fonts/brand-icons.ttf
|
286
|
-
- test/dummy/vendor/nondigest_assets/fonts/themes/default/assets/fonts/icons.woff2
|
287
|
-
- test/dummy/vendor/nondigest_assets/fonts/themes/default/assets/fonts/icons.otf
|
288
|
-
- test/dummy/vendor/nondigest_assets/fonts/themes/default/assets/fonts/icons.woff
|
289
|
-
- test/dummy/vendor/nondigest_assets/fonts/themes/default/assets/fonts/outline-icons.eot
|
290
|
-
- test/dummy/vendor/nondigest_assets/fonts/themes/default/assets/fonts/icons.ttf
|
291
|
-
- test/dummy/vendor/nondigest_assets/fonts/themes/default/assets/fonts/outline-icons.woff2
|
292
|
-
- test/dummy/vendor/nondigest_assets/fonts/themes/default/assets/fonts/brand-icons.eot
|
293
|
-
- test/dummy/vendor/nondigest_assets/fonts/themes/default/assets/fonts/brand-icons.woff2
|
294
|
-
- test/dummy/vendor/nondigest_assets/fonts/themes/default/assets/fonts/outline-icons.woff
|
295
|
-
- test/dummy/vendor/nondigest_assets/fonts/themes/default/assets/fonts/outline-icons.svg
|
296
|
-
- test/dummy/vendor/nondigest_assets/fonts/themes/default/assets/fonts/brand-icons.svg
|
297
|
-
- test/dummy/vendor/nondigest_assets/fonts/themes/default/assets/fonts/icons.svg
|
261
|
+
- test/dummy/public/apple-touch-icon.png
|
262
|
+
- test/dummy/public/favicon.ico
|
263
|
+
- test/dummy/yarn.lock
|
264
|
+
- test/factories/approvals.rb
|
265
|
+
- test/factories/infos.rb
|
298
266
|
- test/integration/navigation_test.rb
|
299
|
-
- test/
|
267
|
+
- test/rails_audit_test.rb
|
300
268
|
- test/test_helper.rb
|
@@ -1,12 +0,0 @@
|
|
1
|
-
class Audit::Admin::AuditsController < Audit::Admin::BaseController
|
2
|
-
|
3
|
-
def index
|
4
|
-
@audits = Audit.where(auditable_type: params[:auditable_type], auditable_id: params[:auditable_id]).page(params[:page])
|
5
|
-
|
6
|
-
respond_to do |format|
|
7
|
-
format.html
|
8
|
-
format.js
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
end
|
@@ -1,52 +0,0 @@
|
|
1
|
-
class Audit::Admin::CheckSettingsController < Audit::Admin::BaseController
|
2
|
-
before_action :set_check_setting, only: [:show, :edit, :update, :destroy]
|
3
|
-
|
4
|
-
def index
|
5
|
-
@check_settings = CheckSetting.page(params[:page])
|
6
|
-
end
|
7
|
-
|
8
|
-
def new
|
9
|
-
@check_setting = CheckSetting.new
|
10
|
-
end
|
11
|
-
|
12
|
-
def create
|
13
|
-
@check_setting = CheckSetting.new(check_setting_params)
|
14
|
-
|
15
|
-
if @check_setting.save
|
16
|
-
redirect_to hr_check_settings_url, notice: 'Check setting was successfully created.'
|
17
|
-
else
|
18
|
-
render :new
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
def show
|
23
|
-
end
|
24
|
-
|
25
|
-
def edit
|
26
|
-
end
|
27
|
-
|
28
|
-
def update
|
29
|
-
if @check_setting.update(check_setting_params)
|
30
|
-
redirect_to hr_check_settings_url, notice: 'Check setting was successfully updated.'
|
31
|
-
else
|
32
|
-
render :edit
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
def destroy
|
37
|
-
@check_setting.destroy
|
38
|
-
redirect_to hr_check_settings_url, notice: 'Check setting was successfully destroyed.'
|
39
|
-
end
|
40
|
-
|
41
|
-
private
|
42
|
-
def set_check_setting
|
43
|
-
@check_setting = CheckSetting.find(params[:id])
|
44
|
-
end
|
45
|
-
|
46
|
-
def check_setting_params
|
47
|
-
params.fetch(:check_setting, {}).permit(
|
48
|
-
:code
|
49
|
-
)
|
50
|
-
end
|
51
|
-
|
52
|
-
end
|
@@ -1,65 +0,0 @@
|
|
1
|
-
class Audit::Admin::ChecksController < Audit::Admin::BaseController
|
2
|
-
before_action :set_check, only: [:show, :edit, :update, :destroy]
|
3
|
-
|
4
|
-
def index
|
5
|
-
@checks = Check.page(params[:page])
|
6
|
-
end
|
7
|
-
|
8
|
-
def new
|
9
|
-
@check = Check.new(state: params[:state])
|
10
|
-
end
|
11
|
-
|
12
|
-
def create
|
13
|
-
@check = Check.new(check_params)
|
14
|
-
|
15
|
-
respond_to do |format|
|
16
|
-
if @check.save
|
17
|
-
format.js
|
18
|
-
format.html { redirect_to checks_url, notice: 'Check was successfully created.' }
|
19
|
-
else
|
20
|
-
format.js
|
21
|
-
format.html { render :new }
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
def show
|
27
|
-
end
|
28
|
-
|
29
|
-
def edit
|
30
|
-
end
|
31
|
-
|
32
|
-
def update
|
33
|
-
if @check.update(check_params)
|
34
|
-
redirect_to checks_url, notice: 'Check was successfully updated.'
|
35
|
-
else
|
36
|
-
render :edit
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
|
-
def destroy
|
41
|
-
@check.destroy
|
42
|
-
redirect_to checks_url, notice: 'Check was successfully destroyed.'
|
43
|
-
end
|
44
|
-
|
45
|
-
private
|
46
|
-
def set_checking
|
47
|
-
@checking = params[:checking_type].safe_constantize&.find_by(id: params[:checking_id])
|
48
|
-
end
|
49
|
-
|
50
|
-
def set_check
|
51
|
-
@check = Check.find(params[:id])
|
52
|
-
end
|
53
|
-
|
54
|
-
def check_params
|
55
|
-
q = params.fetch(:check, {}).permit(
|
56
|
-
:comment,
|
57
|
-
:confirmed,
|
58
|
-
:state
|
59
|
-
)
|
60
|
-
q.merge! checking_type: params[:checking_type], checking_id: params[:checking_id]
|
61
|
-
q.merge! operator_type: current_operator.class.name, operator_id: current_operator.id
|
62
|
-
q
|
63
|
-
end
|
64
|
-
|
65
|
-
end
|