loggable_activity 0.1.38b → 0.1.39
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/CHANGELOG.md +2 -0
- data/GETTING-STARTED.md +10 -10
- data/README.md +8 -5
- data/ROADMAP.md +9 -5
- data/lib/loggable_activity/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 911d7c56855fc43463aed3ce4e1347a148566b5b892da0edac0f7c73fe4bac53
|
4
|
+
data.tar.gz: ac53eb01110f9e2d36e5c2c17fcbf4f54f7f3255364180edf5f55fc93a3829c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4919f94678c3d182c30c1ba22cbee0ca98c77b0caeb90f5dc126ec51ade2be51ccc28e8f75bd83a1fb396779692706d2f8c9c9466736d1493e17daf0278de2a7
|
7
|
+
data.tar.gz: c70e5e713082f1650598c88ca11ab9002c21324d6e801eb34f044f20b9a133058376b6563d3acb9dc27c64bb1c304d16c9ec73bf69c820efe6860c877d401de8
|
data/CHANGELOG.md
CHANGED
data/GETTING-STARTED.md
CHANGED
@@ -3,7 +3,7 @@ This document should you getting started with `LoggableActivity`
|
|
3
3
|
|
4
4
|
## Prerequisite
|
5
5
|
1 A running Rails Application<br/>
|
6
|
-
2 An authorization system where there is a current available.
|
6
|
+
2 An authorization system where there is a current user available.
|
7
7
|
|
8
8
|
## Demo Application
|
9
9
|
You can download a demo application from<br/>
|
@@ -12,18 +12,20 @@ You can download a demo application from<br/>
|
|
12
12
|
## Configuration
|
13
13
|
First you have to create a configuration file named `loggable_activity.yml` and locate it in the config folder.<br/>
|
14
14
|
It has the following tags
|
15
|
+
- `User` (example)<br>
|
16
|
+
This is the name of the model you are configuring, as you can see there is alos a `Demo::Address` in the configuration file below, So if you have a model named `Demo::Club` you have to create at tag for that and fill in the other tags under that.
|
15
17
|
- record_display_name: <br>
|
16
|
-
|
18
|
+
Used to display something human to identify a given log entry, in this example the **User** model has a method named `full_name`
|
17
19
|
|
18
20
|
- loggable_attrs:<br/>
|
19
|
-
This are the fields in
|
21
|
+
This are the attributes on a model and reflect the fields in the database you HAS to define, what fields to log.
|
20
22
|
|
21
23
|
- auto_log:<br/>
|
22
24
|
This are the actions that will be logged automatically, although you can log manually at any time.
|
23
|
-
Note there is no hook for `Show` in Rails so you would have to log that manually like this `log(:
|
25
|
+
Note there is no hook for `Show` in Rails so you would have to log that manually like this `log(:show)`, more about that later.
|
24
26
|
|
25
27
|
- relations:<br/>
|
26
|
-
If a model has `belongs_to` and `has_one` relations you can log them as well<br>
|
28
|
+
If a model has `belongs_to` and `has_one` relations you can log them automatically as well<br>
|
27
29
|
<br/>
|
28
30
|
*Example confuguration for logging of the user model*
|
29
31
|
```
|
@@ -65,7 +67,7 @@ class ApplicationController < ActionController::Base
|
|
65
67
|
include LoggableActivity::CurrentUser
|
66
68
|
```
|
67
69
|
|
68
|
-
Now
|
70
|
+
Now if you create a model like this:
|
69
71
|
```
|
70
72
|
$ rails c
|
71
73
|
$ User.create(first_name: 'John', last_name: 'Doe')
|
@@ -73,8 +75,6 @@ $ User.create(first_name: 'John', last_name: 'Doe')
|
|
73
75
|
|
74
76
|
Then an `LoggableActivity::Activity` is created. You can inspect it from the terminal like this.
|
75
77
|
```
|
76
|
-
puts activity = Loggable::Activity.
|
77
|
-
puts activity.
|
78
|
-
puts activity.payloads
|
79
|
-
puts activity.payload_attrs
|
78
|
+
puts activity = Loggable::Activity.last
|
79
|
+
puts activity.attrs
|
80
80
|
```
|
data/README.md
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
# Loggable Activity 🌟
|
2
|
+
Secure protect data and log how it is handled
|
2
3
|
- Keep an activity log of how data in the db are handled.
|
3
4
|
- Protect and secure the privacy of data stored in Activity Logs
|
4
5
|
- Prepare for General Data Protection Regulation (GDPR) compliance.
|
@@ -7,26 +8,28 @@
|
|
7
8
|
### What it is not
|
8
9
|
- An error logging system
|
9
10
|
- A paper trails system with rollback.
|
11
|
+
- A backup system
|
10
12
|
|
11
13
|
### Applications
|
12
14
|
Most organizations needs to keep a log of how users interact with data stored in the DB
|
13
15
|
- Finance
|
14
16
|
- Healthcare
|
15
|
-
- Sales
|
16
|
-
- Organizations
|
17
|
+
- Sales and Support
|
17
18
|
|
18
19
|
*Super simplified example from the healthcare.*
|
19
20
|
- Each patient has a journal, that is updated on a regular basis.
|
20
|
-
- Supervisor needs to follow the journal.
|
21
|
+
- Supervisor needs to follow the journal, how was it updated, who read it.
|
21
22
|
- Security personnel needs to know how the journal is handled, who did what when.
|
22
|
-
- Patients has the right to their journal.
|
23
|
+
- Patients has the right to know how their journal is handled and that the log is deleted.
|
23
24
|
|
24
25
|
Beside the journal in the db, an activity log is kept so it is possible to track how the journal is used.<br/>
|
25
26
|
At some point in time the patients data from the DB and the activity log has to be removed according to GDPR.<br/>
|
26
27
|
|
27
28
|
|
28
29
|
👉 Join the Slack channel here: [LoggableActivity Slack Workspace](https://join.slack.com/t/loggableactivity/shared_invite/zt-2a3tvgv37-mGwjHJTrBXBH2srXFRRSXQ)
|
29
|
-
|
30
|
+
<br/>
|
31
|
+
👉 Want to play around with an online version: [Show Demo](https://loggableactivity-efe7b931c886.herokuapp.com/)
|
32
|
+
<br/>
|
30
33
|
We value each contribution and believe in the power of community. Looking forward to seeing you there!
|
31
34
|
|
32
35
|
|
data/ROADMAP.md
CHANGED
@@ -1,8 +1,11 @@
|
|
1
1
|
# Roadmap
|
2
2
|
Outline of steps to get the LoggableActivity adapted.
|
3
3
|
|
4
|
-
###
|
5
|
-
Nothing is better than gain som experience by getting som real world tests and experiences
|
4
|
+
### Demo project
|
5
|
+
Nothing is better than gain som experience by getting som real world tests and experiences.
|
6
|
+
<br/>
|
7
|
+
Try the [Live Demo]("https://loggableactivity-efe7b931c886.herokuapp.com/") here or download it from [Github]("https://github.com/maxgronlund/LoggableActivityDemoApp") here
|
8
|
+
|
6
9
|
|
7
10
|
### Open Source
|
8
11
|
More eyes and brains on the project wil make it mature and better.
|
@@ -14,6 +17,7 @@ More eyes and brains on the project wil make it mature and better.
|
|
14
17
|
- RFC for protocol
|
15
18
|
- Commercial potentials, business models.
|
16
19
|
- Explainers
|
17
|
-
-
|
18
|
-
-
|
19
|
-
-
|
20
|
+
- Documentation RDoc
|
21
|
+
- Rest API
|
22
|
+
- GraphQL API
|
23
|
+
- Integration with other languages, node, elixir...
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: loggable_activity
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.39
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- "Max \nGroenlund"
|
@@ -75,11 +75,11 @@ files:
|
|
75
75
|
- loggable_activity-0.1.34.gem
|
76
76
|
- pkg/loggable_activity-0.1.35.gem
|
77
77
|
- sig/loggable_activity.rbs
|
78
|
-
homepage: https://
|
78
|
+
homepage: https://loggableactivity-efe7b931c886.herokuapp.com/
|
79
79
|
licenses:
|
80
80
|
- MIT
|
81
81
|
metadata:
|
82
|
-
homepage_uri: https://
|
82
|
+
homepage_uri: https://loggableactivity-efe7b931c886.herokuapp.com/
|
83
83
|
source_code_uri: https://github.com/maxgronlund/LoggableActivity
|
84
84
|
changelog_uri: https://github.com/maxgronlund/LoggableActivity/CHANGELOG.md
|
85
85
|
rubygems_mfa_required: 'true'
|