cmor_audits 0.0.56.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +28 -0
- data/Rakefile +19 -0
- data/app/assets/config/cmor/audits_manifest.js +1 -0
- data/app/assets/javascripts/cmor/audits/application.js +2 -0
- data/app/assets/javascripts/cmor/audits/application/keep.js +0 -0
- data/app/assets/javascripts/cmor_audits.js +2 -0
- data/app/assets/stylesheets/cmor/audits/application.css +3 -0
- data/app/assets/stylesheets/cmor/audits/application/keep.css +0 -0
- data/app/assets/stylesheets/cmor_audits.css +3 -0
- data/app/concerns/cmor/audits/resources_controller/paper_trail_concern.rb +48 -0
- data/app/concerns/cmor/audits/routing/paper_trail_resources_concern.rb +40 -0
- data/app/controllers/cmor/audits/home_controller.rb +6 -0
- data/app/controllers/cmor/audits/paper_trail/versions_controller.rb +21 -0
- data/app/view_helpers/cmor/audits/application_view_helper.rb +6 -0
- data/app/views/cmor/audits/paper_trail/versions/_index_table.html.haml +7 -0
- data/app/views/cmor/audits/paper_trail/versions/_query_form.html.haml +4 -0
- data/app/views/cmor/core/backend/resources_controller/base/_versions_form.html.haml +1 -0
- data/app/views/cmor/core/backend/resources_controller/base/_versions_form_buttons.html.haml +1 -0
- data/app/views/cmor/core/backend/resources_controller/base/version.html.haml +31 -0
- data/app/views/cmor/core/backend/resources_controller/base/versions.html.haml +30 -0
- data/config/initializers/assets.rb +2 -0
- data/config/initializers/cmor.rb +3 -0
- data/config/locales/de.yml +33 -0
- data/config/locales/en.yml +33 -0
- data/config/routes.rb +7 -0
- data/lib/cmor/audits/configuration.rb +29 -0
- data/lib/cmor/audits/engine.rb +35 -0
- data/lib/cmor/audits/version.rb +7 -0
- data/lib/cmor_audits.rb +14 -0
- data/lib/generators/cmor/audits/install/install_generator.rb +26 -0
- data/lib/generators/cmor/audits/install/templates/initializer.rb +39 -0
- data/lib/generators/cmor/audits/install/templates/routes.source +4 -0
- data/lib/tasks/cmor/audits_tasks.rake +5 -0
- data/spec/factories/paper_trail_versions.rb +8 -0
- metadata +471 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: b58321110b24d4db1ddf03c0e57fdc6987b78a4414b5d72bcea7f106d87b006b
|
4
|
+
data.tar.gz: 3f052e73b8e39f055d7d744085dba6f91a512081122037caa798ea34904bfefa
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: a16ac298dd4145668838af17bfa5bcb9ee402a0e84beced9a8bfb57c1dfaa10e9e2ff62c94efc526cd1bf94daa51cafe5770f41b03b3a949b1d7f4399e295dd8
|
7
|
+
data.tar.gz: 880b96d36e6749bc3b91676c6492c6871c1b3cf348b40b6ea8a1aacb25437783b423fc69b8e5604e03252a0586cbae9471bc794ba5106cbbac6e12b8a81fd81f
|
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright 2020 Roberto Vasquez Angel
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# Cmor::Audits
|
2
|
+
Short description and motivation.
|
3
|
+
|
4
|
+
## Usage
|
5
|
+
How to use my plugin.
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
Add this line to your application's Gemfile:
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
gem 'cmor_/_audits'
|
12
|
+
```
|
13
|
+
|
14
|
+
And then execute:
|
15
|
+
```bash
|
16
|
+
$ bundle
|
17
|
+
```
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
```bash
|
21
|
+
$ gem install cmor_audits
|
22
|
+
```
|
23
|
+
|
24
|
+
## Contributing
|
25
|
+
Contribution directions go here.
|
26
|
+
|
27
|
+
## License
|
28
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
begin
|
2
|
+
require 'bundler/setup'
|
3
|
+
rescue LoadError
|
4
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
5
|
+
end
|
6
|
+
|
7
|
+
require 'rdoc/task'
|
8
|
+
|
9
|
+
RDoc::Task.new(:rdoc) do |rdoc|
|
10
|
+
rdoc.rdoc_dir = 'rdoc'
|
11
|
+
rdoc.title = 'Cmor::Audits'
|
12
|
+
rdoc.options << '--line-numbers'
|
13
|
+
rdoc.rdoc_files.include('README.md')
|
14
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
15
|
+
end
|
16
|
+
|
17
|
+
Bundler::GemHelper.install_tasks
|
18
|
+
|
19
|
+
require 'rails/dummy/tasks'
|
@@ -0,0 +1 @@
|
|
1
|
+
//= link_directory ../stylesheets/cmor/audits .css
|
File without changes
|
File without changes
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Cmor
|
4
|
+
module Audits
|
5
|
+
module ResourcesController
|
6
|
+
module PaperTrailConcern
|
7
|
+
extend ActiveSupport::Concern
|
8
|
+
|
9
|
+
included do
|
10
|
+
before_action(only: :versions) { load_resource; load_versions }
|
11
|
+
before_action(only: :version) { load_resource; load_version }
|
12
|
+
before_action(only: :version_at) { load_resource; load_version_by_timestamp }
|
13
|
+
end
|
14
|
+
|
15
|
+
def versions
|
16
|
+
end
|
17
|
+
|
18
|
+
def version
|
19
|
+
end
|
20
|
+
|
21
|
+
def version_at
|
22
|
+
render :version
|
23
|
+
end
|
24
|
+
|
25
|
+
private
|
26
|
+
def load_versions
|
27
|
+
@versions = @resource.versions
|
28
|
+
end
|
29
|
+
|
30
|
+
def load_version
|
31
|
+
@version = @resource.versions.find(params[:version_id])
|
32
|
+
@resource = @version&.reify || @resource
|
33
|
+
end
|
34
|
+
|
35
|
+
def load_version_by_timestamp
|
36
|
+
timestamp = begin
|
37
|
+
DateTime.parse(params[:version_at])
|
38
|
+
rescue TypeError
|
39
|
+
Time.zone.now
|
40
|
+
end
|
41
|
+
|
42
|
+
@version = @resource.versions.subsequent(timestamp, true).first
|
43
|
+
@resource = @version&.reify || @resource
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Cmor
|
4
|
+
module Audits
|
5
|
+
module Routing
|
6
|
+
module PaperTrailResourcesConcern
|
7
|
+
extend ActiveSupport::Concern
|
8
|
+
|
9
|
+
# Example:
|
10
|
+
#
|
11
|
+
# # config/routes.rb
|
12
|
+
# Rails.application.routes.draw do
|
13
|
+
# resources :pages do
|
14
|
+
# paper_trail_resources
|
15
|
+
# end
|
16
|
+
# end
|
17
|
+
#
|
18
|
+
# This will give you:
|
19
|
+
#
|
20
|
+
# $> rails routes
|
21
|
+
# GET /pages/:id/versions/:version_id(.:format) cmor/cms/backend/pages#version
|
22
|
+
# GET /pages/:id/version_at(/:version_at)(.:format) cmor/cms/backend/pages#version_at
|
23
|
+
# versions_page GET /pages/:id/versions(.:format) cmor/cms/backend/pages#versions
|
24
|
+
# pages GET /pages(.:format) cmor/cms/backend/pages#index
|
25
|
+
# POST /pages(.:format) cmor/cms/backend/pages#create
|
26
|
+
# new_page GET /pages/new(.:format) cmor/cms/backend/pages#new
|
27
|
+
# edit_page GET /pages/:id/edit(.:format) cmor/cms/backend/pages#edit
|
28
|
+
# page GET /pages/:id(.:format) cmor/cms/backend/pages#show
|
29
|
+
# PATCH /pages/:id(.:format) cmor/cms/backend/pages#update
|
30
|
+
# PUT /pages/:id(.:format) cmor/cms/backend/pages#update
|
31
|
+
#
|
32
|
+
def paper_trail_resources
|
33
|
+
get "versions/:version_id", on: :member, action: :version
|
34
|
+
get "version_at(/:version_at)", on: :member, action: :version_at
|
35
|
+
get "versions", on: :member, action: :versions
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Cmor
|
4
|
+
module Audits
|
5
|
+
module PaperTrail
|
6
|
+
class VersionsController < Cmor::Core::Backend::ResourcesController::Base
|
7
|
+
def self.resource_class
|
8
|
+
::PaperTrail::Version
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.engine_class
|
12
|
+
::Cmor::Audits
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.available_rest_actions
|
16
|
+
super - %i(new create edit update)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,4 @@
|
|
1
|
+
= form.input :item_type_eq, collection: PaperTrail::Version.distinct.pluck(:item_type).collect { |klass_name| [klass_name.constantize.model_name.human(count: :other), klass_name] }
|
2
|
+
= form.input :item_id_eq
|
3
|
+
= form.input :event_eq, collection: PaperTrail::Version.distinct.pluck(:event)
|
4
|
+
= form.input :whodunnit_cont
|
@@ -0,0 +1 @@
|
|
1
|
+
= form.input :version_at, as: :date_time_picker, side_by_side: true, icon_provider: :font_awesome, input_html: { name: 'version_at', class: 'mr-2' }, label: :version_at, label_html: { class: 'mr-2' }
|
@@ -0,0 +1 @@
|
|
1
|
+
= form.submit t('.submit'), class: 'btn btn-primary'
|
@@ -0,0 +1,31 @@
|
|
1
|
+
.row
|
2
|
+
.col-12
|
3
|
+
%h1
|
4
|
+
= administrador_helper(self).label_for(@resource)
|
5
|
+
- if @version.present?
|
6
|
+
%small.text-muted= "@version #{[@version.id, I18n.l(@version.created_at, format: :short_with_year), @version.event, @version.whodunnit].compact.join(' | ')}"
|
7
|
+
- else
|
8
|
+
%small.text-muted= t(".live")
|
9
|
+
|
10
|
+
.row.resource-actions.mb-4
|
11
|
+
.col-6
|
12
|
+
- if @resource.paper_trail.previous_version&.version.present?
|
13
|
+
= link_to({ action: :version, id: @resource.id, version_id: @resource.paper_trail.previous_version.version.id }, class: 'btn btn-primary btn-responsive') do
|
14
|
+
%i.fas.fa-arrow-left
|
15
|
+
%span.btn-text= t('.previous')
|
16
|
+
.col-6.text-right
|
17
|
+
- if @resource.paper_trail.next_version&.version.present?
|
18
|
+
= link_to({ action: :version, id: @resource.id, version_id: @resource.paper_trail.next_version.version.id }, class: 'btn btn-primary btn-responsive') do
|
19
|
+
%span.btn-text= t('.next')
|
20
|
+
%i.fas.fa-arrow-right
|
21
|
+
|
22
|
+
.row
|
23
|
+
.col-12
|
24
|
+
= resource_table(resource: @resource) do |table|
|
25
|
+
= render partial: 'show_table', locals: { table: table }
|
26
|
+
|
27
|
+
.row
|
28
|
+
.show-actions.col-12.d-flex
|
29
|
+
= link_to({ action: :versions }, class: 'btn btn-light btn-responsive') do
|
30
|
+
%i.fas.fa-arrow-left
|
31
|
+
%span.btn-text= t('.back')
|
@@ -0,0 +1,30 @@
|
|
1
|
+
.row.mb-2
|
2
|
+
.col-12
|
3
|
+
%h1= "#{PaperTrail::Version.model_name.human(count: :other)} (#{@versions.size})"
|
4
|
+
|
5
|
+
.row.mb-4
|
6
|
+
.col-12
|
7
|
+
= simple_form_for(:paper_trail, url: url_for(action: :version_at), html: { method: :get, class: 'form-inline' }) do |f|
|
8
|
+
.form-row
|
9
|
+
= render partial: 'versions_form', locals: { form: f }
|
10
|
+
= render partial: 'versions_form_buttons', locals: { form: f }
|
11
|
+
|
12
|
+
.row
|
13
|
+
.col-12
|
14
|
+
= collection_table(collection: @versions, resource_class: PaperTrail::Version) do |table|
|
15
|
+
= table.id
|
16
|
+
= table.column :event
|
17
|
+
= table.column :whodunnit
|
18
|
+
= table.timestamp :created_at
|
19
|
+
= table.column :actions, title: '' do |resource|
|
20
|
+
- capture_haml do
|
21
|
+
.w-100.text-right
|
22
|
+
= link_to({ action: :version, version_id: resource.id }, class: 'btn btn-responsive btn-primary btn-xs') do
|
23
|
+
%i.fas.fa-eye
|
24
|
+
%span.btn-text= t('.show')
|
25
|
+
|
26
|
+
.row
|
27
|
+
.page-actions.col-12.d-flex
|
28
|
+
= link_to({ action: :show, id: @resource.to_param }, class: 'btn btn-light btn-responsive') do
|
29
|
+
%i.fas.fa-arrow-left
|
30
|
+
%span.btn-text= t('.back')
|
@@ -0,0 +1,33 @@
|
|
1
|
+
de:
|
2
|
+
classes:
|
3
|
+
cmor/audits/engine: Audits
|
4
|
+
activerecord:
|
5
|
+
models:
|
6
|
+
paper_trail/version:
|
7
|
+
one: Version
|
8
|
+
other: Versionen
|
9
|
+
attributes:
|
10
|
+
paper_trail/version:
|
11
|
+
id: ID
|
12
|
+
event: Ereignis
|
13
|
+
item: Element
|
14
|
+
item_id: Element-ID
|
15
|
+
item_type: Element-Typ
|
16
|
+
object: Objekt
|
17
|
+
created_at: Erstellt am
|
18
|
+
whodunnit: Geändert durch
|
19
|
+
cmor:
|
20
|
+
core:
|
21
|
+
backend:
|
22
|
+
resources_controller:
|
23
|
+
base:
|
24
|
+
version:
|
25
|
+
back: Zurück
|
26
|
+
next: Vor
|
27
|
+
previous: Zurück
|
28
|
+
versions:
|
29
|
+
back: Zurück
|
30
|
+
versions_form_buttons:
|
31
|
+
submit: Anzeigen
|
32
|
+
routes:
|
33
|
+
cmor-audits-engine: audits
|
@@ -0,0 +1,33 @@
|
|
1
|
+
en:
|
2
|
+
classes:
|
3
|
+
cmor/audits/engine: Audits
|
4
|
+
activerecord:
|
5
|
+
models:
|
6
|
+
paper_trail/version:
|
7
|
+
one: Version
|
8
|
+
other: Versions
|
9
|
+
attributes:
|
10
|
+
paper_trail/version:
|
11
|
+
id: ID
|
12
|
+
event: Event
|
13
|
+
item: Item
|
14
|
+
item_id: Item-ID
|
15
|
+
item_type: Item-Type
|
16
|
+
object: Objekt
|
17
|
+
created_at: Created at
|
18
|
+
whodunnit: Changed by
|
19
|
+
cmor:
|
20
|
+
core:
|
21
|
+
backend:
|
22
|
+
resources_controller:
|
23
|
+
base:
|
24
|
+
version:
|
25
|
+
back: Zurück
|
26
|
+
next: Next
|
27
|
+
previous: Previous
|
28
|
+
versions:
|
29
|
+
back: Zurück
|
30
|
+
versions_form_buttons:
|
31
|
+
submit: Show
|
32
|
+
routes:
|
33
|
+
cmor-audits-engine: audits
|
data/config/routes.rb
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Cmor::Audits
|
4
|
+
module Configuration
|
5
|
+
def configure
|
6
|
+
yield self
|
7
|
+
end
|
8
|
+
|
9
|
+
mattr_accessor :resources_controllers do
|
10
|
+
-> { [] }
|
11
|
+
end
|
12
|
+
|
13
|
+
mattr_accessor :resource_controllers do
|
14
|
+
-> { [] }
|
15
|
+
end
|
16
|
+
|
17
|
+
mattr_accessor :service_controllers do
|
18
|
+
-> { [] }
|
19
|
+
end
|
20
|
+
|
21
|
+
mattr_accessor :sidebar_controllers do
|
22
|
+
-> { [] }
|
23
|
+
end
|
24
|
+
|
25
|
+
mattr_accessor :resources do
|
26
|
+
-> { {} }
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Cmor::Audits
|
4
|
+
class Engine < ::Rails::Engine
|
5
|
+
isolate_namespace Cmor::Audits
|
6
|
+
|
7
|
+
config.to_prepare do
|
8
|
+
print "[Cmor::Audits] Including Cmor::Audits::Routing::PaperTrailResourcesConcern into ActionDispatch::Routing::Mapper"
|
9
|
+
ActionDispatch::Routing::Mapper.send(:include, Cmor::Audits::Routing::PaperTrailResourcesConcern)
|
10
|
+
puts " => [OK]"
|
11
|
+
|
12
|
+
Cmor::Audits::Configuration.resources.call.each do |resource_class, options|
|
13
|
+
print "[Cmor::Audits] Enabling paper trail on #{resource_class}"
|
14
|
+
resource_class.constantize.send(:has_paper_trail, options)
|
15
|
+
puts " => [OK]"
|
16
|
+
end
|
17
|
+
|
18
|
+
print "[Cmor::Audits] Adding resources routes"
|
19
|
+
Cmor::Core::Backend.configure do |config|
|
20
|
+
config.add_resources_routes(
|
21
|
+
:cmor_audits,
|
22
|
+
condition: -> { PaperTrail.request.enabled_for_model?(resource_class) },
|
23
|
+
routes: -> { paper_trail_resources }
|
24
|
+
)
|
25
|
+
end
|
26
|
+
puts " => [OK]"
|
27
|
+
|
28
|
+
unless Rails.application.config.instance_variable_get(:@eager_load)
|
29
|
+
print "[Cmor::Audits] Reloading routes"
|
30
|
+
Rails.application.reload_routes!
|
31
|
+
puts " => [OK)"
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
data/lib/cmor_audits.rb
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "cmor_core_backend"
|
4
|
+
require "paper_trail"
|
5
|
+
|
6
|
+
require "cmor/audits/version"
|
7
|
+
require "cmor/audits/configuration"
|
8
|
+
require "cmor/audits/engine"
|
9
|
+
|
10
|
+
module Cmor
|
11
|
+
module Audits
|
12
|
+
extend Configuration
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Cmor::Audits
|
4
|
+
module Generators
|
5
|
+
class InstallGenerator < Rails::Generators::Base
|
6
|
+
desc "Generates the initializer"
|
7
|
+
|
8
|
+
source_root File.expand_path("../templates", __FILE__)
|
9
|
+
|
10
|
+
attr_reader :base_controller_class_name
|
11
|
+
|
12
|
+
def initialize(*args)
|
13
|
+
super
|
14
|
+
@base_controller_class_name = ENV.fetch("BASE_CONTROLLER_CLASS_NAME") { "::ApplicationController" }
|
15
|
+
end
|
16
|
+
|
17
|
+
def generate_initializer
|
18
|
+
template "initializer.rb", "config/initializers/cmor_audits.rb"
|
19
|
+
end
|
20
|
+
|
21
|
+
def generate_routes
|
22
|
+
route File.read(File.join(File.expand_path("../templates", __FILE__), "routes.source"))
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
Cmor::Audits.configure do |config|
|
2
|
+
# Set the resources, that will be shown in the backend menu.
|
3
|
+
#
|
4
|
+
# Default: config.resources_controllers = -> {[
|
5
|
+
# Cmor::Audits::PaperTrail::VersionsController,
|
6
|
+
# ]}
|
7
|
+
#
|
8
|
+
config.resources_controllers = -> {[
|
9
|
+
Cmor::Audits::PaperTrail::VersionsController,
|
10
|
+
]}
|
11
|
+
|
12
|
+
# Set the resources, that will be shown in the backend menu.
|
13
|
+
#
|
14
|
+
# Default: config.resource_controllers = -> {[]}
|
15
|
+
#
|
16
|
+
config.resource_controllers = -> {[]}
|
17
|
+
|
18
|
+
# Set the services, that will be shown in the backend menu.
|
19
|
+
#
|
20
|
+
# Default: config.service_controllers = -> {[]}
|
21
|
+
#
|
22
|
+
config.service_controllers = -> {[]}
|
23
|
+
|
24
|
+
# Set the sidebars, that will be shown in the backend menu.
|
25
|
+
#
|
26
|
+
# Default: config.sidebar_controllers = -> {[]}
|
27
|
+
#
|
28
|
+
config.sidebar_controllers = -> {[]}
|
29
|
+
|
30
|
+
# Specify the models that will be audited. Listing models here is the same
|
31
|
+
# as adding has_paper_trail to the model class directly. The hash is passed
|
32
|
+
# to has_paper_trail as options hash.
|
33
|
+
#
|
34
|
+
# Example: config.resources = -> { { "Post" => { on: [:update] } } }
|
35
|
+
#
|
36
|
+
# Default: config.resources = -> { {} }
|
37
|
+
#
|
38
|
+
config.resources = -> { {} }
|
39
|
+
end
|
metadata
ADDED
@@ -0,0 +1,471 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: cmor_audits
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.56.pre
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Roberto Vasquez Angel
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-07-14 00:00:00.000000000 Z
|
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.2.3
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 5.2.3
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: cmor_core
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.0.56.pre
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.0.56.pre
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: cmor_core_backend
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.0.56.pre
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.0.56.pre
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: sqlite3
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 1.3.6
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 1.3.6
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: responders
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: capybara
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: coveralls
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: git_log_generator
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: guard-bundler
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: guard-rails
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: guard-rspec
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: pry-rails
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - ">="
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
174
|
+
type: :development
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - ">="
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '0'
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: rails-dummy
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - ">="
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '0'
|
188
|
+
type: :development
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - ">="
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0'
|
195
|
+
- !ruby/object:Gem::Dependency
|
196
|
+
name: rails-i18n
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - ">="
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: '0'
|
202
|
+
type: :development
|
203
|
+
prerelease: false
|
204
|
+
version_requirements: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - ">="
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: '0'
|
209
|
+
- !ruby/object:Gem::Dependency
|
210
|
+
name: rao-shoulda_matchers
|
211
|
+
requirement: !ruby/object:Gem::Requirement
|
212
|
+
requirements:
|
213
|
+
- - ">="
|
214
|
+
- !ruby/object:Gem::Version
|
215
|
+
version: '0'
|
216
|
+
type: :development
|
217
|
+
prerelease: false
|
218
|
+
version_requirements: !ruby/object:Gem::Requirement
|
219
|
+
requirements:
|
220
|
+
- - ">="
|
221
|
+
- !ruby/object:Gem::Version
|
222
|
+
version: '0'
|
223
|
+
- !ruby/object:Gem::Dependency
|
224
|
+
name: rspec-rails
|
225
|
+
requirement: !ruby/object:Gem::Requirement
|
226
|
+
requirements:
|
227
|
+
- - ">="
|
228
|
+
- !ruby/object:Gem::Version
|
229
|
+
version: '0'
|
230
|
+
type: :development
|
231
|
+
prerelease: false
|
232
|
+
version_requirements: !ruby/object:Gem::Requirement
|
233
|
+
requirements:
|
234
|
+
- - ">="
|
235
|
+
- !ruby/object:Gem::Version
|
236
|
+
version: '0'
|
237
|
+
- !ruby/object:Gem::Dependency
|
238
|
+
name: factory_bot_rails
|
239
|
+
requirement: !ruby/object:Gem::Requirement
|
240
|
+
requirements:
|
241
|
+
- - ">="
|
242
|
+
- !ruby/object:Gem::Version
|
243
|
+
version: '0'
|
244
|
+
type: :development
|
245
|
+
prerelease: false
|
246
|
+
version_requirements: !ruby/object:Gem::Requirement
|
247
|
+
requirements:
|
248
|
+
- - ">="
|
249
|
+
- !ruby/object:Gem::Version
|
250
|
+
version: '0'
|
251
|
+
- !ruby/object:Gem::Dependency
|
252
|
+
name: rubocop
|
253
|
+
requirement: !ruby/object:Gem::Requirement
|
254
|
+
requirements:
|
255
|
+
- - ">="
|
256
|
+
- !ruby/object:Gem::Version
|
257
|
+
version: '0'
|
258
|
+
type: :development
|
259
|
+
prerelease: false
|
260
|
+
version_requirements: !ruby/object:Gem::Requirement
|
261
|
+
requirements:
|
262
|
+
- - ">="
|
263
|
+
- !ruby/object:Gem::Version
|
264
|
+
version: '0'
|
265
|
+
- !ruby/object:Gem::Dependency
|
266
|
+
name: rubocop-rails_config
|
267
|
+
requirement: !ruby/object:Gem::Requirement
|
268
|
+
requirements:
|
269
|
+
- - ">="
|
270
|
+
- !ruby/object:Gem::Version
|
271
|
+
version: '0'
|
272
|
+
type: :development
|
273
|
+
prerelease: false
|
274
|
+
version_requirements: !ruby/object:Gem::Requirement
|
275
|
+
requirements:
|
276
|
+
- - ">="
|
277
|
+
- !ruby/object:Gem::Version
|
278
|
+
version: '0'
|
279
|
+
- !ruby/object:Gem::Dependency
|
280
|
+
name: shoulda-matchers
|
281
|
+
requirement: !ruby/object:Gem::Requirement
|
282
|
+
requirements:
|
283
|
+
- - ">="
|
284
|
+
- !ruby/object:Gem::Version
|
285
|
+
version: '0'
|
286
|
+
type: :development
|
287
|
+
prerelease: false
|
288
|
+
version_requirements: !ruby/object:Gem::Requirement
|
289
|
+
requirements:
|
290
|
+
- - ">="
|
291
|
+
- !ruby/object:Gem::Version
|
292
|
+
version: '0'
|
293
|
+
- !ruby/object:Gem::Dependency
|
294
|
+
name: simplecov
|
295
|
+
requirement: !ruby/object:Gem::Requirement
|
296
|
+
requirements:
|
297
|
+
- - ">="
|
298
|
+
- !ruby/object:Gem::Version
|
299
|
+
version: '0'
|
300
|
+
type: :development
|
301
|
+
prerelease: false
|
302
|
+
version_requirements: !ruby/object:Gem::Requirement
|
303
|
+
requirements:
|
304
|
+
- - ">="
|
305
|
+
- !ruby/object:Gem::Version
|
306
|
+
version: '0'
|
307
|
+
- !ruby/object:Gem::Dependency
|
308
|
+
name: simplecov-console
|
309
|
+
requirement: !ruby/object:Gem::Requirement
|
310
|
+
requirements:
|
311
|
+
- - ">="
|
312
|
+
- !ruby/object:Gem::Version
|
313
|
+
version: '0'
|
314
|
+
type: :development
|
315
|
+
prerelease: false
|
316
|
+
version_requirements: !ruby/object:Gem::Requirement
|
317
|
+
requirements:
|
318
|
+
- - ">="
|
319
|
+
- !ruby/object:Gem::Version
|
320
|
+
version: '0'
|
321
|
+
- !ruby/object:Gem::Dependency
|
322
|
+
name: paper_trail
|
323
|
+
requirement: !ruby/object:Gem::Requirement
|
324
|
+
requirements:
|
325
|
+
- - ">="
|
326
|
+
- !ruby/object:Gem::Version
|
327
|
+
version: '0'
|
328
|
+
type: :runtime
|
329
|
+
prerelease: false
|
330
|
+
version_requirements: !ruby/object:Gem::Requirement
|
331
|
+
requirements:
|
332
|
+
- - ">="
|
333
|
+
- !ruby/object:Gem::Version
|
334
|
+
version: '0'
|
335
|
+
- !ruby/object:Gem::Dependency
|
336
|
+
name: bootsnap
|
337
|
+
requirement: !ruby/object:Gem::Requirement
|
338
|
+
requirements:
|
339
|
+
- - ">="
|
340
|
+
- !ruby/object:Gem::Version
|
341
|
+
version: '0'
|
342
|
+
type: :development
|
343
|
+
prerelease: false
|
344
|
+
version_requirements: !ruby/object:Gem::Requirement
|
345
|
+
requirements:
|
346
|
+
- - ">="
|
347
|
+
- !ruby/object:Gem::Version
|
348
|
+
version: '0'
|
349
|
+
- !ruby/object:Gem::Dependency
|
350
|
+
name: turbolinks
|
351
|
+
requirement: !ruby/object:Gem::Requirement
|
352
|
+
requirements:
|
353
|
+
- - ">="
|
354
|
+
- !ruby/object:Gem::Version
|
355
|
+
version: '0'
|
356
|
+
type: :development
|
357
|
+
prerelease: false
|
358
|
+
version_requirements: !ruby/object:Gem::Requirement
|
359
|
+
requirements:
|
360
|
+
- - ">="
|
361
|
+
- !ruby/object:Gem::Version
|
362
|
+
version: '0'
|
363
|
+
- !ruby/object:Gem::Dependency
|
364
|
+
name: jbuilder
|
365
|
+
requirement: !ruby/object:Gem::Requirement
|
366
|
+
requirements:
|
367
|
+
- - "~>"
|
368
|
+
- !ruby/object:Gem::Version
|
369
|
+
version: '2.5'
|
370
|
+
type: :development
|
371
|
+
prerelease: false
|
372
|
+
version_requirements: !ruby/object:Gem::Requirement
|
373
|
+
requirements:
|
374
|
+
- - "~>"
|
375
|
+
- !ruby/object:Gem::Version
|
376
|
+
version: '2.5'
|
377
|
+
- !ruby/object:Gem::Dependency
|
378
|
+
name: cmor_blog
|
379
|
+
requirement: !ruby/object:Gem::Requirement
|
380
|
+
requirements:
|
381
|
+
- - ">="
|
382
|
+
- !ruby/object:Gem::Version
|
383
|
+
version: '0'
|
384
|
+
type: :development
|
385
|
+
prerelease: false
|
386
|
+
version_requirements: !ruby/object:Gem::Requirement
|
387
|
+
requirements:
|
388
|
+
- - ">="
|
389
|
+
- !ruby/object:Gem::Version
|
390
|
+
version: '0'
|
391
|
+
- !ruby/object:Gem::Dependency
|
392
|
+
name: cmor_blog_backend
|
393
|
+
requirement: !ruby/object:Gem::Requirement
|
394
|
+
requirements:
|
395
|
+
- - ">="
|
396
|
+
- !ruby/object:Gem::Version
|
397
|
+
version: '0'
|
398
|
+
type: :development
|
399
|
+
prerelease: false
|
400
|
+
version_requirements: !ruby/object:Gem::Requirement
|
401
|
+
requirements:
|
402
|
+
- - ">="
|
403
|
+
- !ruby/object:Gem::Version
|
404
|
+
version: '0'
|
405
|
+
description:
|
406
|
+
email:
|
407
|
+
- roberto@vasquez-angel.de
|
408
|
+
executables: []
|
409
|
+
extensions: []
|
410
|
+
extra_rdoc_files: []
|
411
|
+
files:
|
412
|
+
- MIT-LICENSE
|
413
|
+
- README.md
|
414
|
+
- Rakefile
|
415
|
+
- app/assets/config/cmor/audits_manifest.js
|
416
|
+
- app/assets/javascripts/cmor/audits/application.js
|
417
|
+
- app/assets/javascripts/cmor/audits/application/keep.js
|
418
|
+
- app/assets/javascripts/cmor_audits.js
|
419
|
+
- app/assets/stylesheets/cmor/audits/application.css
|
420
|
+
- app/assets/stylesheets/cmor/audits/application/keep.css
|
421
|
+
- app/assets/stylesheets/cmor_audits.css
|
422
|
+
- app/concerns/cmor/audits/resources_controller/paper_trail_concern.rb
|
423
|
+
- app/concerns/cmor/audits/routing/paper_trail_resources_concern.rb
|
424
|
+
- app/controllers/cmor/audits/home_controller.rb
|
425
|
+
- app/controllers/cmor/audits/paper_trail/versions_controller.rb
|
426
|
+
- app/view_helpers/cmor/audits/application_view_helper.rb
|
427
|
+
- app/views/cmor/audits/paper_trail/versions/_index_table.html.haml
|
428
|
+
- app/views/cmor/audits/paper_trail/versions/_query_form.html.haml
|
429
|
+
- app/views/cmor/core/backend/resources_controller/base/_versions_form.html.haml
|
430
|
+
- app/views/cmor/core/backend/resources_controller/base/_versions_form_buttons.html.haml
|
431
|
+
- app/views/cmor/core/backend/resources_controller/base/version.html.haml
|
432
|
+
- app/views/cmor/core/backend/resources_controller/base/versions.html.haml
|
433
|
+
- config/initializers/assets.rb
|
434
|
+
- config/initializers/cmor.rb
|
435
|
+
- config/locales/de.yml
|
436
|
+
- config/locales/en.yml
|
437
|
+
- config/routes.rb
|
438
|
+
- lib/cmor/audits/configuration.rb
|
439
|
+
- lib/cmor/audits/engine.rb
|
440
|
+
- lib/cmor/audits/version.rb
|
441
|
+
- lib/cmor_audits.rb
|
442
|
+
- lib/generators/cmor/audits/install/install_generator.rb
|
443
|
+
- lib/generators/cmor/audits/install/templates/initializer.rb
|
444
|
+
- lib/generators/cmor/audits/install/templates/routes.source
|
445
|
+
- lib/tasks/cmor/audits_tasks.rake
|
446
|
+
- spec/factories/paper_trail_versions.rb
|
447
|
+
homepage: https://github.com/content-management-on-rails
|
448
|
+
licenses:
|
449
|
+
- MIT
|
450
|
+
metadata:
|
451
|
+
allowed_push_host: https://rubygems.org
|
452
|
+
post_install_message:
|
453
|
+
rdoc_options: []
|
454
|
+
require_paths:
|
455
|
+
- lib
|
456
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
457
|
+
requirements:
|
458
|
+
- - ">="
|
459
|
+
- !ruby/object:Gem::Version
|
460
|
+
version: '0'
|
461
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
462
|
+
requirements:
|
463
|
+
- - ">"
|
464
|
+
- !ruby/object:Gem::Version
|
465
|
+
version: 1.3.1
|
466
|
+
requirements: []
|
467
|
+
rubygems_version: 3.1.4
|
468
|
+
signing_key:
|
469
|
+
specification_version: 4
|
470
|
+
summary: Cmor::Audit Module.
|
471
|
+
test_files: []
|