loggable_activity 0.1.36 → 0.1.39

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c9e732145f0c4b463a0db97b8551841222d966031d54a067dad138bf98c8c816
4
- data.tar.gz: 566d8116f055d33d2215aee961680fe0b6d40180bb017cb9a30ae34b283cd6c4
3
+ metadata.gz: 911d7c56855fc43463aed3ce4e1347a148566b5b892da0edac0f7c73fe4bac53
4
+ data.tar.gz: ac53eb01110f9e2d36e5c2c17fcbf4f54f7f3255364180edf5f55fc93a3829c7
5
5
  SHA512:
6
- metadata.gz: 8c510effb9e4655f7225d4b8b22dec05ccd0caa9eb94668ca3d31f371feab7ddd2594b1a2106585e9e915e7fe03b08d8e856183502765d236f73f51a94f2fa77
7
- data.tar.gz: 8e798121e6f6c1813e7cbdad45ea1f6bf71893140449eb4599aa200a8117768eb1fa03ef89a1f2400bd9f43c9d45e254c648144ce6e6cfb4d2b3ecefedeeb2ee
6
+ metadata.gz: 4919f94678c3d182c30c1ba22cbee0ca98c77b0caeb90f5dc126ec51ade2be51ccc28e8f75bd83a1fb396779692706d2f8c9c9466736d1493e17daf0278de2a7
7
+ data.tar.gz: c70e5e713082f1650598c88ca11ab9002c21324d6e801eb34f044f20b9a133058376b6563d3acb9dc27c64bb1c304d16c9ec73bf69c820efe6860c877d401de8
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  ## [Unreleased]
2
-
2
+ - nothing so far
3
+ ## [0.1.39] - 2024-02-12
4
+ - Updated README.md and GETTING-STARTED.md
5
+ ## [0.1.38] - 2024-02-12
6
+ - Removed dependency on awesome print
3
7
  ## [0.1.35] - 2024-02-11
4
8
 
5
9
  - Initial release
10
+
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
- You CAN define a method on the **User** model called full name, this will be a part of the json payload related to the **User** model
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 the database you HAS to define
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(:how)`, more about that later.
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 when you create a model like this:
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.all.latest.first
77
- puts activity.activity_type
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
- ### RD project
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
- - Hosting of example project.
18
- - Homepage.
19
- - Documentation
20
+ - Documentation RDoc
21
+ - Rest API
22
+ - GraphQL API
23
+ - Integration with other languages, node, elixir...
@@ -83,8 +83,6 @@ module LoggableActivity
83
83
  encryption_key = LoggableActivity::EncryptionKey.for_record(record)&.key
84
84
  encrypted_attrs = relation_encrypted_attrs(record.attributes, loggable_attrs, encryption_key)
85
85
 
86
- ap "building relation update payload for #{record.id} with encryption_key: #{encryption_key}"
87
-
88
86
  @update_payloads << LoggableActivity::Payload.new(
89
87
  record:,
90
88
  encrypted_attrs:,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LoggableActivity
4
- VERSION = '0.1.36'
4
+ VERSION = '0.1.39'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: loggable_activity
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.36
4
+ version: 0.1.39
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Max \nGroenlund"
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-02-11 00:00:00.000000000 Z
11
+ date: 2024-02-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -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://github.com/maxgronlund/LoggableActivity/
78
+ homepage: https://loggableactivity-efe7b931c886.herokuapp.com/
79
79
  licenses:
80
80
  - MIT
81
81
  metadata:
82
- homepage_uri: https://github.com/maxgronlund/LoggableActivity/
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'