loggable_activity 0.1.39 → 0.1.40
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/.document +1 -0
- data/.nojekyll +1 -0
- data/.rubocop.yml +1 -1
- data/doc/.nojekyll +1 -0
- data/doc/CHANGELOG_md.html +125 -0
- data/doc/CODE_OF_CONDUCT_md.html +220 -0
- data/doc/CONSIDERTIONS_md.html +227 -0
- data/doc/CreateLoggableActivities.html +144 -0
- data/doc/CreateLoggableEncryptionKeys.html +140 -0
- data/doc/CreateLoggablePayloads.html +144 -0
- data/doc/GETTING-STARTED_md.html +186 -0
- data/doc/Gemfile.html +104 -0
- data/doc/Gemfile_lock.html +152 -0
- data/doc/LICENSE_txt.html +104 -0
- data/doc/LoggableActivity/CurrentUser.html +99 -0
- data/doc/LoggableActivity/Generators/InstallGenerator.html +178 -0
- data/doc/LoggableActivity/Generators.html +91 -0
- data/doc/README_md.html +138 -0
- data/doc/ROADMAP_md.html +151 -0
- data/doc/Rakefile.html +102 -0
- data/doc/bin/setup.html +100 -0
- data/doc/notes/CHEAT_SHEET_md.html +130 -0
- data/doc/sig/loggable_activity_rbs.html +101 -0
- data/docs/LoggableActivity/Activity.html +494 -0
- data/docs/LoggableActivity/Configuration.html +183 -0
- data/docs/LoggableActivity/Encryption.html +220 -0
- data/docs/LoggableActivity/EncryptionError.html +99 -0
- data/docs/LoggableActivity/EncryptionKey.html +327 -0
- data/docs/LoggableActivity/Error.html +97 -0
- data/docs/LoggableActivity/Hooks.html +172 -0
- data/docs/LoggableActivity/Payload.html +159 -0
- data/docs/LoggableActivity/PayloadsBuilder.html +154 -0
- data/docs/LoggableActivity/UpdatePayloadsBuilder.html +199 -0
- data/docs/LoggableActivity.html +100 -0
- data/docs/created.rid +10 -0
- data/docs/css/fonts.css +167 -0
- data/docs/css/rdoc.css +687 -0
- data/docs/fonts/Lato-Light.ttf +0 -0
- data/docs/fonts/Lato-LightItalic.ttf +0 -0
- data/docs/fonts/Lato-Regular.ttf +0 -0
- data/docs/fonts/Lato-RegularItalic.ttf +0 -0
- data/docs/fonts/SourceCodePro-Bold.ttf +0 -0
- data/docs/fonts/SourceCodePro-Regular.ttf +0 -0
- data/docs/images/add.png +0 -0
- data/docs/images/arrow_up.png +0 -0
- data/docs/images/brick.png +0 -0
- data/docs/images/brick_link.png +0 -0
- data/docs/images/bug.png +0 -0
- data/docs/images/bullet_black.png +0 -0
- data/docs/images/bullet_toggle_minus.png +0 -0
- data/docs/images/bullet_toggle_plus.png +0 -0
- data/docs/images/date.png +0 -0
- data/docs/images/delete.png +0 -0
- data/docs/images/find.png +0 -0
- data/docs/images/loadingAnimation.gif +0 -0
- data/docs/images/macFFBgHack.png +0 -0
- data/docs/images/package.png +0 -0
- data/docs/images/page_green.png +0 -0
- data/docs/images/page_white_text.png +0 -0
- data/docs/images/page_white_width.png +0 -0
- data/docs/images/plugin.png +0 -0
- data/docs/images/ruby.png +0 -0
- data/docs/images/tag_blue.png +0 -0
- data/docs/images/tag_green.png +0 -0
- data/docs/images/transparent.png +0 -0
- data/docs/images/wrench.png +0 -0
- data/docs/images/wrench_orange.png +0 -0
- data/docs/images/zoom.png +0 -0
- data/docs/index.html +91 -0
- data/docs/js/darkfish.js +97 -0
- data/docs/js/navigation.js +105 -0
- data/docs/js/navigation.js.gz +0 -0
- data/docs/js/search.js +110 -0
- data/docs/js/search_index.js +1 -0
- data/docs/js/search_index.js.gz +0 -0
- data/docs/js/searcher.js +229 -0
- data/docs/js/searcher.js.gz +0 -0
- data/docs/table_of_contents.html +184 -0
- data/lib/generators/loggable_activity/install_generator.rb +2 -1
- data/lib/generators/loggable_activity/templates/current_user.rb +1 -1
- data/lib/generators/loggable_activity/templates/loggable_activity.yml +29 -0
- data/lib/loggable_activity/activity.rb +208 -59
- data/lib/loggable_activity/configuration.rb +18 -0
- data/lib/loggable_activity/encryption.rb +20 -1
- data/lib/loggable_activity/encryption_key.rb +81 -14
- data/lib/loggable_activity/hooks.rb +10 -7
- data/lib/loggable_activity/payload.rb +45 -11
- data/lib/loggable_activity/payloads_builder.rb +50 -4
- data/lib/loggable_activity/update_payloads_builder.rb +64 -2
- data/lib/loggable_activity/version.rb +1 -1
- metadata +81 -9
- data/.DS_Store +0 -0
- data/loggable_activity-0.1.32.gem +0 -0
- data/loggable_activity-0.1.33.gem +0 -0
- data/loggable_activity-0.1.34.gem +0 -0
@@ -0,0 +1,159 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>class LoggableActivity::Payload - RDoc Documentation</title>
|
8
|
+
|
9
|
+
<script type="text/javascript">
|
10
|
+
var rdoc_rel_prefix = "../";
|
11
|
+
var index_rel_prefix = "../";
|
12
|
+
</script>
|
13
|
+
|
14
|
+
<script src="../js/navigation.js" defer></script>
|
15
|
+
<script src="../js/search.js" defer></script>
|
16
|
+
<script src="../js/search_index.js" defer></script>
|
17
|
+
<script src="../js/searcher.js" defer></script>
|
18
|
+
<script src="../js/darkfish.js" defer></script>
|
19
|
+
|
20
|
+
<link href="../css/fonts.css" rel="stylesheet">
|
21
|
+
<link href="../css/rdoc.css" rel="stylesheet">
|
22
|
+
|
23
|
+
|
24
|
+
<body id="top" role="document" class="class">
|
25
|
+
<nav role="navigation">
|
26
|
+
<div id="project-navigation">
|
27
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
28
|
+
<h2>
|
29
|
+
<a href="../index.html" rel="home">Home</a>
|
30
|
+
</h2>
|
31
|
+
|
32
|
+
<div id="table-of-contents-navigation">
|
33
|
+
<a href="../table_of_contents.html#pages">Pages</a>
|
34
|
+
<a href="../table_of_contents.html#classes">Classes</a>
|
35
|
+
<a href="../table_of_contents.html#methods">Methods</a>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
|
39
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
40
|
+
<form action="#" method="get" accept-charset="utf-8">
|
41
|
+
<div id="search-field-wrapper">
|
42
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
43
|
+
aria-autocomplete="list" aria-controls="search-results"
|
44
|
+
type="text" name="search" placeholder="Search (/) for a class, method, ..." spellcheck="false"
|
45
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
46
|
+
</div>
|
47
|
+
|
48
|
+
<ul id="search-results" aria-label="Search Results"
|
49
|
+
aria-busy="false" aria-expanded="false"
|
50
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
51
|
+
</form>
|
52
|
+
</div>
|
53
|
+
|
54
|
+
</div>
|
55
|
+
|
56
|
+
|
57
|
+
|
58
|
+
<div id="class-metadata">
|
59
|
+
|
60
|
+
|
61
|
+
<div id="parent-class-section" class="nav-section">
|
62
|
+
<h3>Parent</h3>
|
63
|
+
|
64
|
+
<p class="link">ActiveRecord::Base
|
65
|
+
</div>
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
<!-- Method Quickref -->
|
71
|
+
<div id="method-list-section" class="nav-section">
|
72
|
+
<h3>Methods</h3>
|
73
|
+
|
74
|
+
<ul class="link-list" role="directory">
|
75
|
+
<li ><a href="#method-i-attrs">#attrs</a>
|
76
|
+
</ul>
|
77
|
+
</div>
|
78
|
+
|
79
|
+
</div>
|
80
|
+
</nav>
|
81
|
+
|
82
|
+
<main role="main" aria-labelledby="class-LoggableActivity::Payload">
|
83
|
+
<h1 id="class-LoggableActivity::Payload" class="class">
|
84
|
+
class LoggableActivity::Payload
|
85
|
+
</h1>
|
86
|
+
|
87
|
+
<section class="description">
|
88
|
+
|
89
|
+
<p>This class represents a payload in the log, containing encrypted data of one record in the database. When the record is deleted, the encryption key for the payload is also deleted. Payloads come in different types, each serving a specific purpose.</p>
|
90
|
+
|
91
|
+
</section>
|
92
|
+
|
93
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
<section id="public-instance-5Buntitled-5D-method-details" class="method-section">
|
100
|
+
<header>
|
101
|
+
<h3>Public Instance Methods</h3>
|
102
|
+
</header>
|
103
|
+
|
104
|
+
<div id="method-i-attrs" class="method-detail ">
|
105
|
+
<div class="method-header">
|
106
|
+
<div class="method-heading">
|
107
|
+
<span class="method-name">attrs</span><span
|
108
|
+
class="method-args">()</span>
|
109
|
+
<span class="method-click-advice">click to toggle source</span>
|
110
|
+
</div>
|
111
|
+
</div>
|
112
|
+
|
113
|
+
<div class="method-description">
|
114
|
+
<p>Returns the decrypted attributes of the payload based on its type.</p>
|
115
|
+
|
116
|
+
<p>@return [Hash] The decrypted attributes.</p>
|
117
|
+
|
118
|
+
<p>Example:</p>
|
119
|
+
|
120
|
+
<pre>payload.attrs
|
121
|
+
|
122
|
+
Returns:
|
123
|
+
{
|
124
|
+
"street" => "Machu Picchu",
|
125
|
+
"city" => "Aguas Calientes",
|
126
|
+
"country" => "Peru",
|
127
|
+
"postal_code" => "08680"
|
128
|
+
}</pre>
|
129
|
+
|
130
|
+
<div class="method-source-code" id="attrs-source">
|
131
|
+
<pre><span class="ruby-comment"># File lib/loggable_activity/payload.rb, line 38</span>
|
132
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">attrs</span>
|
133
|
+
<span class="ruby-keyword">return</span> <span class="ruby-identifier">deleted_attrs</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">record</span>.<span class="ruby-identifier">nil?</span>
|
134
|
+
|
135
|
+
<span class="ruby-keyword">case</span> <span class="ruby-identifier">payload_type</span>
|
136
|
+
<span class="ruby-keyword">when</span> <span class="ruby-string">'current_association'</span>, <span class="ruby-string">'primary_payload'</span>, <span class="ruby-string">'previous_association'</span>
|
137
|
+
<span class="ruby-identifier">decrypted_attrs</span>
|
138
|
+
<span class="ruby-keyword">when</span> <span class="ruby-string">'update_payload'</span>
|
139
|
+
<span class="ruby-identifier">decrypted_update_attrs</span>
|
140
|
+
<span class="ruby-keyword">end</span>
|
141
|
+
<span class="ruby-keyword">end</span></pre>
|
142
|
+
</div>
|
143
|
+
</div>
|
144
|
+
|
145
|
+
|
146
|
+
</div>
|
147
|
+
|
148
|
+
</section>
|
149
|
+
|
150
|
+
</section>
|
151
|
+
</main>
|
152
|
+
|
153
|
+
|
154
|
+
<footer id="validator-badges" role="contentinfo">
|
155
|
+
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
156
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.6.2.
|
157
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
158
|
+
</footer>
|
159
|
+
|
@@ -0,0 +1,154 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>module LoggableActivity::PayloadsBuilder - RDoc Documentation</title>
|
8
|
+
|
9
|
+
<script type="text/javascript">
|
10
|
+
var rdoc_rel_prefix = "../";
|
11
|
+
var index_rel_prefix = "../";
|
12
|
+
</script>
|
13
|
+
|
14
|
+
<script src="../js/navigation.js" defer></script>
|
15
|
+
<script src="../js/search.js" defer></script>
|
16
|
+
<script src="../js/search_index.js" defer></script>
|
17
|
+
<script src="../js/searcher.js" defer></script>
|
18
|
+
<script src="../js/darkfish.js" defer></script>
|
19
|
+
|
20
|
+
<link href="../css/fonts.css" rel="stylesheet">
|
21
|
+
<link href="../css/rdoc.css" rel="stylesheet">
|
22
|
+
|
23
|
+
|
24
|
+
<body id="top" role="document" class="module">
|
25
|
+
<nav role="navigation">
|
26
|
+
<div id="project-navigation">
|
27
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
28
|
+
<h2>
|
29
|
+
<a href="../index.html" rel="home">Home</a>
|
30
|
+
</h2>
|
31
|
+
|
32
|
+
<div id="table-of-contents-navigation">
|
33
|
+
<a href="../table_of_contents.html#pages">Pages</a>
|
34
|
+
<a href="../table_of_contents.html#classes">Classes</a>
|
35
|
+
<a href="../table_of_contents.html#methods">Methods</a>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
|
39
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
40
|
+
<form action="#" method="get" accept-charset="utf-8">
|
41
|
+
<div id="search-field-wrapper">
|
42
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
43
|
+
aria-autocomplete="list" aria-controls="search-results"
|
44
|
+
type="text" name="search" placeholder="Search (/) for a class, method, ..." spellcheck="false"
|
45
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
46
|
+
</div>
|
47
|
+
|
48
|
+
<ul id="search-results" aria-label="Search Results"
|
49
|
+
aria-busy="false" aria-expanded="false"
|
50
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
51
|
+
</form>
|
52
|
+
</div>
|
53
|
+
|
54
|
+
</div>
|
55
|
+
|
56
|
+
|
57
|
+
|
58
|
+
<div id="class-metadata">
|
59
|
+
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
|
64
|
+
<!-- Method Quickref -->
|
65
|
+
<div id="method-list-section" class="nav-section">
|
66
|
+
<h3>Methods</h3>
|
67
|
+
|
68
|
+
<ul class="link-list" role="directory">
|
69
|
+
<li ><a href="#method-i-build_payloads">#build_payloads</a>
|
70
|
+
</ul>
|
71
|
+
</div>
|
72
|
+
|
73
|
+
</div>
|
74
|
+
</nav>
|
75
|
+
|
76
|
+
<main role="main" aria-labelledby="module-LoggableActivity::PayloadsBuilder">
|
77
|
+
<h1 id="module-LoggableActivity::PayloadsBuilder" class="module">
|
78
|
+
module LoggableActivity::PayloadsBuilder
|
79
|
+
</h1>
|
80
|
+
|
81
|
+
<section class="description">
|
82
|
+
|
83
|
+
<p>This module is responsible for building payloads used in loggable activities.</p>
|
84
|
+
|
85
|
+
</section>
|
86
|
+
|
87
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
<section id="public-instance-5Buntitled-5D-method-details" class="method-section">
|
94
|
+
<header>
|
95
|
+
<h3>Public Instance Methods</h3>
|
96
|
+
</header>
|
97
|
+
|
98
|
+
<div id="method-i-build_payloads" class="method-detail ">
|
99
|
+
<div class="method-header">
|
100
|
+
<div class="method-heading">
|
101
|
+
<span class="method-name">build_payloads</span><span
|
102
|
+
class="method-args">()</span>
|
103
|
+
<span class="method-click-advice">click to toggle source</span>
|
104
|
+
</div>
|
105
|
+
</div>
|
106
|
+
|
107
|
+
<div class="method-description">
|
108
|
+
<p>Builds payloads for the loggable activity.</p>
|
109
|
+
|
110
|
+
<pre>Example:
|
111
|
+
build_payloads
|
112
|
+
|
113
|
+
Returns:
|
114
|
+
#<LoggableActivity::Payload:0x0000000109658718> {
|
115
|
+
:id => 129,
|
116
|
+
:record_type => "Demo::Club",
|
117
|
+
:record_id => 4,
|
118
|
+
:encrypted_attrs => {
|
119
|
+
"name" => "z/jigjcm3Fb89L7QT8XiNhvVgjtRXKkmg/xohR6wIc0=\n"
|
120
|
+
},
|
121
|
+
:payload_type => "current_association",
|
122
|
+
:data_owner => nil,
|
123
|
+
:activity_id => 50,
|
124
|
+
:created_at => Wed, 14 Feb 2024 13:21:13.964339000 UTC +00:00,
|
125
|
+
:updated_at => Wed, 14 Feb 2024 13:21:13.964339000 UTC +00:00
|
126
|
+
}</pre>
|
127
|
+
|
128
|
+
<div class="method-source-code" id="build_payloads-source">
|
129
|
+
<pre><span class="ruby-comment"># File lib/loggable_activity/payloads_builder.rb, line 26</span>
|
130
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">build_payloads</span>
|
131
|
+
<span class="ruby-identifier">build_primary_payload</span>
|
132
|
+
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">relations</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">relation_config</span><span class="ruby-operator">|</span>
|
133
|
+
<span class="ruby-identifier">build_relation_payload</span>(<span class="ruby-identifier">relation_config</span>)
|
134
|
+
<span class="ruby-keyword">end</span>
|
135
|
+
<span class="ruby-ivar">@payloads</span>
|
136
|
+
<span class="ruby-keyword">end</span></pre>
|
137
|
+
</div>
|
138
|
+
</div>
|
139
|
+
|
140
|
+
|
141
|
+
</div>
|
142
|
+
|
143
|
+
</section>
|
144
|
+
|
145
|
+
</section>
|
146
|
+
</main>
|
147
|
+
|
148
|
+
|
149
|
+
<footer id="validator-badges" role="contentinfo">
|
150
|
+
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
151
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.6.2.
|
152
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
153
|
+
</footer>
|
154
|
+
|
@@ -0,0 +1,199 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>module LoggableActivity::UpdatePayloadsBuilder - RDoc Documentation</title>
|
8
|
+
|
9
|
+
<script type="text/javascript">
|
10
|
+
var rdoc_rel_prefix = "../";
|
11
|
+
var index_rel_prefix = "../";
|
12
|
+
</script>
|
13
|
+
|
14
|
+
<script src="../js/navigation.js" defer></script>
|
15
|
+
<script src="../js/search.js" defer></script>
|
16
|
+
<script src="../js/search_index.js" defer></script>
|
17
|
+
<script src="../js/searcher.js" defer></script>
|
18
|
+
<script src="../js/darkfish.js" defer></script>
|
19
|
+
|
20
|
+
<link href="../css/fonts.css" rel="stylesheet">
|
21
|
+
<link href="../css/rdoc.css" rel="stylesheet">
|
22
|
+
|
23
|
+
|
24
|
+
<body id="top" role="document" class="module">
|
25
|
+
<nav role="navigation">
|
26
|
+
<div id="project-navigation">
|
27
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
28
|
+
<h2>
|
29
|
+
<a href="../index.html" rel="home">Home</a>
|
30
|
+
</h2>
|
31
|
+
|
32
|
+
<div id="table-of-contents-navigation">
|
33
|
+
<a href="../table_of_contents.html#pages">Pages</a>
|
34
|
+
<a href="../table_of_contents.html#classes">Classes</a>
|
35
|
+
<a href="../table_of_contents.html#methods">Methods</a>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
|
39
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
40
|
+
<form action="#" method="get" accept-charset="utf-8">
|
41
|
+
<div id="search-field-wrapper">
|
42
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
43
|
+
aria-autocomplete="list" aria-controls="search-results"
|
44
|
+
type="text" name="search" placeholder="Search (/) for a class, method, ..." spellcheck="false"
|
45
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
46
|
+
</div>
|
47
|
+
|
48
|
+
<ul id="search-results" aria-label="Search Results"
|
49
|
+
aria-busy="false" aria-expanded="false"
|
50
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
51
|
+
</form>
|
52
|
+
</div>
|
53
|
+
|
54
|
+
</div>
|
55
|
+
|
56
|
+
|
57
|
+
|
58
|
+
<div id="class-metadata">
|
59
|
+
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
|
64
|
+
<!-- Method Quickref -->
|
65
|
+
<div id="method-list-section" class="nav-section">
|
66
|
+
<h3>Methods</h3>
|
67
|
+
|
68
|
+
<ul class="link-list" role="directory">
|
69
|
+
<li ><a href="#method-i-build_update_payloads">#build_update_payloads</a>
|
70
|
+
</ul>
|
71
|
+
</div>
|
72
|
+
|
73
|
+
</div>
|
74
|
+
</nav>
|
75
|
+
|
76
|
+
<main role="main" aria-labelledby="module-LoggableActivity::UpdatePayloadsBuilder">
|
77
|
+
<h1 id="module-LoggableActivity::UpdatePayloadsBuilder" class="module">
|
78
|
+
module LoggableActivity::UpdatePayloadsBuilder
|
79
|
+
</h1>
|
80
|
+
|
81
|
+
<section class="description">
|
82
|
+
|
83
|
+
<p>This module is responsible for building update payloads used in loggable activities.</p>
|
84
|
+
|
85
|
+
</section>
|
86
|
+
|
87
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
<section id="public-instance-5Buntitled-5D-method-details" class="method-section">
|
94
|
+
<header>
|
95
|
+
<h3>Public Instance Methods</h3>
|
96
|
+
</header>
|
97
|
+
|
98
|
+
<div id="method-i-build_update_payloads" class="method-detail ">
|
99
|
+
<div class="method-header">
|
100
|
+
<div class="method-heading">
|
101
|
+
<span class="method-name">build_update_payloads</span><span
|
102
|
+
class="method-args">()</span>
|
103
|
+
<span class="method-click-advice">click to toggle source</span>
|
104
|
+
</div>
|
105
|
+
</div>
|
106
|
+
|
107
|
+
<div class="method-description">
|
108
|
+
<p>Builds payloads for an activity update event.</p>
|
109
|
+
|
110
|
+
<pre>Example:
|
111
|
+
build_update_payloads
|
112
|
+
|
113
|
+
Returns:
|
114
|
+
[
|
115
|
+
[0] #<LoggableActivity::Payload:0x00000001047d31d8> {
|
116
|
+
:id => nil,
|
117
|
+
:record_type => "Demo::Club",
|
118
|
+
:record_id => 7,
|
119
|
+
:encrypted_attrs => {
|
120
|
+
"changes" => [
|
121
|
+
[0] {
|
122
|
+
"name" => {
|
123
|
+
"from" => "+aQznZK64KLQ8wsyZlSOGQbqm+J8gDX93rNFeF+wY68=\n",
|
124
|
+
"to" => "OdS834ZDS06+AYxmz4cUjhtgk7Jc8NoOVAAqR81Is7w=\n"
|
125
|
+
}
|
126
|
+
}
|
127
|
+
]
|
128
|
+
},
|
129
|
+
:payload_type => "update_payload",
|
130
|
+
:data_owner => false,
|
131
|
+
:activity_id => nil,
|
132
|
+
:created_at => nil,
|
133
|
+
:updated_at => nil
|
134
|
+
},
|
135
|
+
[1] #<LoggableActivity::Payload:0x0000000107847f80> {
|
136
|
+
:id => nil,
|
137
|
+
:record_type => "Demo::Address",
|
138
|
+
:record_id => 7,
|
139
|
+
:encrypted_attrs => {
|
140
|
+
"street" => "W7cmT22Bb5TKVmtxTYJt1w==\n",
|
141
|
+
"city" => "AAwdTI7Xo86cMbFBAMsMIw==\n",
|
142
|
+
"country" => "7gu5wdu6O9tD7Q7+EDOqAg==\n",
|
143
|
+
"postal_code" => "ljjfT6MXGNK33/PUyi6Nmw==\n"
|
144
|
+
},
|
145
|
+
:payload_type => "previous_association",
|
146
|
+
:data_owner => false,
|
147
|
+
:activity_id => nil,
|
148
|
+
:created_at => nil,
|
149
|
+
:updated_at => nil
|
150
|
+
},
|
151
|
+
[2] #<LoggableActivity::Payload:0x0000000107802a98> {
|
152
|
+
:id => nil,
|
153
|
+
:record_type => "Demo::Address",
|
154
|
+
:record_id => 8,
|
155
|
+
:encrypted_attrs => {
|
156
|
+
"street" => "CuULVgIEgrOcWBxegKEvSg==\n",
|
157
|
+
"city" => "QbvodOYMvNFpkvsCprqGqg==\n",
|
158
|
+
"country" => "/N03d1OL3TY+aaiPUQ5N1A==\n",
|
159
|
+
"postal_code" => "ZZu3S5tnaTeq+wBu0dPKBw==\n"
|
160
|
+
},
|
161
|
+
:payload_type => "current_association",
|
162
|
+
:data_owner => false,
|
163
|
+
:activity_id => nil,
|
164
|
+
:created_at => nil,
|
165
|
+
:updated_at => nil
|
166
|
+
}
|
167
|
+
]</pre>
|
168
|
+
|
169
|
+
<div class="method-source-code" id="build_update_payloads-source">
|
170
|
+
<pre><span class="ruby-comment"># File lib/loggable_activity/update_payloads_builder.rb, line 69</span>
|
171
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">build_update_payloads</span>
|
172
|
+
<span class="ruby-ivar">@update_payloads</span> = []
|
173
|
+
|
174
|
+
<span class="ruby-identifier">previous_values</span>, <span class="ruby-identifier">current_values</span> = <span class="ruby-identifier">primary_update_attrs</span>
|
175
|
+
<span class="ruby-identifier">build_primary_update_payload</span>(<span class="ruby-identifier">previous_values</span>, <span class="ruby-identifier">current_values</span>)
|
176
|
+
|
177
|
+
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">relations</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">relation_config</span><span class="ruby-operator">|</span>
|
178
|
+
<span class="ruby-identifier">build_update_relation_payloads</span>(<span class="ruby-identifier">relation_config</span>)
|
179
|
+
<span class="ruby-keyword">end</span>
|
180
|
+
<span class="ruby-ivar">@update_payloads</span>
|
181
|
+
<span class="ruby-keyword">end</span></pre>
|
182
|
+
</div>
|
183
|
+
</div>
|
184
|
+
|
185
|
+
|
186
|
+
</div>
|
187
|
+
|
188
|
+
</section>
|
189
|
+
|
190
|
+
</section>
|
191
|
+
</main>
|
192
|
+
|
193
|
+
|
194
|
+
<footer id="validator-badges" role="contentinfo">
|
195
|
+
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
196
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.6.2.
|
197
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
198
|
+
</footer>
|
199
|
+
|
@@ -0,0 +1,100 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>module LoggableActivity - RDoc Documentation</title>
|
8
|
+
|
9
|
+
<script type="text/javascript">
|
10
|
+
var rdoc_rel_prefix = "./";
|
11
|
+
var index_rel_prefix = "./";
|
12
|
+
</script>
|
13
|
+
|
14
|
+
<script src="./js/navigation.js" defer></script>
|
15
|
+
<script src="./js/search.js" defer></script>
|
16
|
+
<script src="./js/search_index.js" defer></script>
|
17
|
+
<script src="./js/searcher.js" defer></script>
|
18
|
+
<script src="./js/darkfish.js" defer></script>
|
19
|
+
|
20
|
+
<link href="./css/fonts.css" rel="stylesheet">
|
21
|
+
<link href="./css/rdoc.css" rel="stylesheet">
|
22
|
+
|
23
|
+
|
24
|
+
<body id="top" role="document" class="module">
|
25
|
+
<nav role="navigation">
|
26
|
+
<div id="project-navigation">
|
27
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
28
|
+
<h2>
|
29
|
+
<a href="./index.html" rel="home">Home</a>
|
30
|
+
</h2>
|
31
|
+
|
32
|
+
<div id="table-of-contents-navigation">
|
33
|
+
<a href="./table_of_contents.html#pages">Pages</a>
|
34
|
+
<a href="./table_of_contents.html#classes">Classes</a>
|
35
|
+
<a href="./table_of_contents.html#methods">Methods</a>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
|
39
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
40
|
+
<form action="#" method="get" accept-charset="utf-8">
|
41
|
+
<div id="search-field-wrapper">
|
42
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
43
|
+
aria-autocomplete="list" aria-controls="search-results"
|
44
|
+
type="text" name="search" placeholder="Search (/) for a class, method, ..." spellcheck="false"
|
45
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
46
|
+
</div>
|
47
|
+
|
48
|
+
<ul id="search-results" aria-label="Search Results"
|
49
|
+
aria-busy="false" aria-expanded="false"
|
50
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
51
|
+
</form>
|
52
|
+
</div>
|
53
|
+
|
54
|
+
</div>
|
55
|
+
|
56
|
+
|
57
|
+
|
58
|
+
<div id="class-metadata">
|
59
|
+
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
|
64
|
+
</div>
|
65
|
+
</nav>
|
66
|
+
|
67
|
+
<main role="main" aria-labelledby="module-LoggableActivity">
|
68
|
+
<h1 id="module-LoggableActivity" class="module">
|
69
|
+
module LoggableActivity
|
70
|
+
</h1>
|
71
|
+
|
72
|
+
<section class="description">
|
73
|
+
|
74
|
+
</section>
|
75
|
+
|
76
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
77
|
+
|
78
|
+
|
79
|
+
<section class="constants-list">
|
80
|
+
<header>
|
81
|
+
<h3>Constants</h3>
|
82
|
+
</header>
|
83
|
+
<dl>
|
84
|
+
<dt id="VERSION">VERSION
|
85
|
+
<dd>
|
86
|
+
</dl>
|
87
|
+
</section>
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
</section>
|
92
|
+
</main>
|
93
|
+
|
94
|
+
|
95
|
+
<footer id="validator-badges" role="contentinfo">
|
96
|
+
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
97
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.6.2.
|
98
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
99
|
+
</footer>
|
100
|
+
|
data/docs/created.rid
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
Wed, 14 Feb 2024 14:57:12 +0100
|
2
|
+
lib/loggable_activity/activity.rb Wed, 14 Feb 2024 10:08:28 +0100
|
3
|
+
lib/loggable_activity/configuration.rb Wed, 14 Feb 2024 13:20:10 +0100
|
4
|
+
lib/loggable_activity/encryption.rb Wed, 14 Feb 2024 13:37:21 +0100
|
5
|
+
lib/loggable_activity/encryption_key.rb Wed, 14 Feb 2024 14:11:17 +0100
|
6
|
+
lib/loggable_activity/hooks.rb Wed, 14 Feb 2024 14:32:53 +0100
|
7
|
+
lib/loggable_activity/payload.rb Wed, 14 Feb 2024 14:45:48 +0100
|
8
|
+
lib/loggable_activity/payloads_builder.rb Wed, 14 Feb 2024 14:27:06 +0100
|
9
|
+
lib/loggable_activity/update_payloads_builder.rb Wed, 14 Feb 2024 14:41:36 +0100
|
10
|
+
lib/loggable_activity/version.rb Mon, 12 Feb 2024 14:25:00 +0100
|