ecm_audited 0.0.1

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 7905178238f160cb29a2e3df5bee87cd136c3d09
4
+ data.tar.gz: ea0a165e6aa494cc90f259bfd17038bfd2a8ce98
5
+ SHA512:
6
+ metadata.gz: d17552e61b5d02536a44c18c89d45a37a1718bb7faf4a99e5a2b68601658d874838daf428941e6aa9d225c0a5e437336e3c2c70be93dc1d41eb9298848e28d07
7
+ data.tar.gz: 468feafcdfee17aa8083424e328228e1c0d9b55c3b218b277f740935a8fa2fe39cd8b0b521ee85d290d2672923ae021ab2b465e6dcd52e1e65976e59f96d2202
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2016 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.rdoc ADDED
@@ -0,0 +1,21 @@
1
+ = Ecm::Audited
2
+
3
+ This project rocks and uses MIT-LICENSE.
4
+
5
+ ecm_audited:
6
+ [x] Adds audited to configured models
7
+
8
+ ecm_audited_backend:
9
+ [x] adds menu entry in show views of audited models
10
+ [x] adds route to <audited>/1/audit_log
11
+ [x] adds route to <audited>/a/versions/<version>
12
+ [-] adds back and forward buttons to show views of audited models
13
+ [x] shows revision date of versions
14
+ [x] searches for revisions by date
15
+
16
+ [x] needs to know in view, if it has to add audited features (per resource controller)
17
+ [x] needs to know in routing, if a resource is audited
18
+
19
+ itsf_backend:
20
+ [x] needs interface in views, to add links with dynamic content to show views of resources, based on resource/resource_class properties
21
+ [x] needs an interface in routes to add routes to resources.
data/Rakefile ADDED
@@ -0,0 +1,18 @@
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 = 'Ecm::Audited'
12
+ rdoc.options << '--line-numbers'
13
+ rdoc.rdoc_files.include('README.rdoc')
14
+ rdoc.rdoc_files.include('lib/**/*.rb')
15
+ end
16
+
17
+
18
+ Bundler::GemHelper.install_tasks
@@ -0,0 +1,13 @@
1
+ // This is a manifest file that'll be compiled into application.js, which will include all the files
2
+ // listed below.
3
+ //
4
+ // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
+ // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
6
+ //
7
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
+ // compiled file.
9
+ //
10
+ // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
11
+ // about supported directives.
12
+ //
13
+ //= require_tree .
@@ -0,0 +1,14 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
+ * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
+ * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
10
+ * files in this directory. It is generally better to create a new file per style scope.
11
+ *
12
+ *= require_tree .
13
+ *= require_self
14
+ */
@@ -0,0 +1,6 @@
1
+ module Ecm
2
+ module Audited
3
+ class ApplicationController < ActionController::Base
4
+ end
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ module Ecm
2
+ module Audited
3
+ module ApplicationHelper
4
+ end
5
+ end
6
+ end
@@ -0,0 +1,5 @@
1
+ module Ecm::Audited
2
+ class AuditLog < ::Audited::Audit
3
+ self.table_name = 'audits'
4
+ end
5
+ end
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Audited</title>
5
+ <%= stylesheet_link_tag "ecm/audited/application", media: "all" %>
6
+ <%= javascript_include_tag "ecm/audited/application" %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
10
+
11
+ <%= yield %>
12
+
13
+ </body>
14
+ </html>
@@ -0,0 +1,21 @@
1
+ de:
2
+ activerecord:
3
+ models:
4
+ audited/audit:
5
+ one: 'Audit Log'
6
+ other: 'Audit Logs'
7
+ attributes:
8
+ audited/audit:
9
+ auditable: Subjekt
10
+ associated: Verknüpfung
11
+ user: Benutzer
12
+ username: Benutzername
13
+ action: Aktion
14
+ audited_changes: Änderungen
15
+ version: Version
16
+ comment: Kommentar
17
+ remote_address: IP Adresse
18
+ request_uuid: Request UUID
19
+ created_at: Erstellt am
20
+ routes:
21
+ ecm_audited_backend: audits
data/config/routes.rb ADDED
@@ -0,0 +1,2 @@
1
+ Ecm::Audited::Engine.routes.draw do
2
+ end
@@ -0,0 +1,7 @@
1
+ require 'ecm/audited/configuration'
2
+
3
+ module Ecm
4
+ module Audited
5
+ extend Configuration
6
+ end
7
+ end
@@ -0,0 +1,12 @@
1
+ module Ecm
2
+ module Audited
3
+ module Configuration
4
+ def configure
5
+ yield self
6
+ end
7
+
8
+ mattr_accessor(:audited_models) { ->{ {} } }
9
+ end
10
+
11
+ end
12
+ end
@@ -0,0 +1,17 @@
1
+ module Ecm
2
+ module Audited
3
+ class Engine < ::Rails::Engine
4
+ isolate_namespace Ecm::Audited
5
+
6
+ # config.after_initialize do
7
+ config.to_prepare do
8
+ Configuration.audited_models.call.each do |model, options|
9
+ model.audited *options
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
15
+
16
+
17
+
@@ -0,0 +1,5 @@
1
+ module Ecm
2
+ module Audited
3
+ VERSION = '0.0.1'
4
+ end
5
+ end
@@ -0,0 +1,4 @@
1
+ require 'audited'
2
+
3
+ require 'ecm/audited'
4
+ require 'ecm/audited/engine'
@@ -0,0 +1,4 @@
1
+ # desc "Explaining what the task does"
2
+ # task :audited do
3
+ # # Task goes here
4
+ # end
metadata ADDED
@@ -0,0 +1,89 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ecm_audited
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Roberto Vasquez Angel
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-06-10 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.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '5.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: audited
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ description: Description of Ecm::Audited.
42
+ email:
43
+ - roberto@vasquez-angel.de
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - MIT-LICENSE
49
+ - README.rdoc
50
+ - Rakefile
51
+ - app/assets/javascripts/ecm/audited/application.js
52
+ - app/assets/stylesheets/ecm/audited/application.css
53
+ - app/controllers/ecm/audited/application_controller.rb
54
+ - app/helpers/ecm/audited/application_helper.rb
55
+ - app/models/ecm/audited/audit_log.rb
56
+ - app/views/layouts/ecm/audited/application.html.erb
57
+ - config/locales/de.yml
58
+ - config/routes.rb
59
+ - lib/ecm/audited.rb
60
+ - lib/ecm/audited/configuration.rb
61
+ - lib/ecm/audited/engine.rb
62
+ - lib/ecm/audited/version.rb
63
+ - lib/ecm_audited.rb
64
+ - lib/tasks/ecm/audited_tasks.rake
65
+ homepage: https://github.com/robotex82/ecm_audited
66
+ licenses:
67
+ - MIT
68
+ metadata: {}
69
+ post_install_message:
70
+ rdoc_options: []
71
+ require_paths:
72
+ - lib
73
+ required_ruby_version: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ required_rubygems_version: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ requirements: []
84
+ rubyforge_project:
85
+ rubygems_version: 2.5.1
86
+ signing_key:
87
+ specification_version: 4
88
+ summary: Summary of Ecm::Audited.
89
+ test_files: []