loggable_activity 0.2.1 → 0.5.0
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/.rubocop.yml +29 -42
- data/.vscode/commands.json +2 -2
- data/.vscode/terminals.json +8 -8
- data/CHEAT_SHEET.md +31 -0
- data/MIT-LICENSE +21 -0
- data/README.md +31 -45
- data/Rakefile +6 -4
- data/app/assets/config/loggable_activity_manifest.js +4 -0
- data/app/assets/javascripts/loggable_activity/application.js +2 -0
- data/app/assets/stylesheets/loggable_activity/application.scss +20 -0
- data/app/controllers/concerns/.keep +0 -0
- data/app/controllers/loggable_activity/activities_controller.rb +12 -0
- data/app/controllers/loggable_activity/application_controller.rb +6 -0
- data/app/helpers/loggable_activity/activities_helper.rb +17 -0
- data/app/helpers/loggable_activity/application_helper.rb +6 -0
- data/app/jobs/loggable_activity/application_job.rb +6 -0
- data/app/mailers/loggable_activity/application_mailer.rb +8 -0
- data/app/models/loggable_activity/application_record.rb +7 -0
- data/app/views/kaminari/kaminari-turbo-bootstrap/_first_page.html.erb +14 -0
- data/app/views/kaminari/kaminari-turbo-bootstrap/_gap.html.erb +8 -0
- data/app/views/kaminari/kaminari-turbo-bootstrap/_last_page.html.erb +13 -0
- data/app/views/kaminari/kaminari-turbo-bootstrap/_next_page.html.erb +13 -0
- data/app/views/kaminari/kaminari-turbo-bootstrap/_page.html.erb +14 -0
- data/app/views/kaminari/kaminari-turbo-bootstrap/_paginator.html.erb +27 -0
- data/app/views/kaminari/kaminari-turbo-bootstrap/_prev_page.html.erb +14 -0
- data/app/views/layouts/loggable_activity/application.html.erb +19 -0
- data/app/views/loggable_activity/activities/_activities.html.erb +56 -0
- data/app/views/loggable_activity/activities/index.html.erb +7 -0
- data/app/views/loggable_activity/activities/show.html.erb +2 -0
- data/config/initializers/kaminari_config.rb +14 -0
- data/config/routes.rb +7 -0
- data/{lib/generators/loggable_activity/templates/create_loggable_activities.rb → db/migrate/20240702092648_create_loggable_activity_tables.rb} +18 -10
- data/git-org/HEAD +1 -0
- data/git-org/config +7 -0
- data/git-org/description +1 -0
- data/git-org/hooks/applypatch-msg.sample +15 -0
- data/git-org/hooks/commit-msg.sample +24 -0
- data/git-org/hooks/fsmonitor-watchman.sample +174 -0
- data/git-org/hooks/post-update.sample +8 -0
- data/git-org/hooks/pre-applypatch.sample +14 -0
- data/git-org/hooks/pre-commit.sample +49 -0
- data/git-org/hooks/pre-merge-commit.sample +13 -0
- data/git-org/hooks/pre-push.sample +53 -0
- data/git-org/hooks/pre-rebase.sample +169 -0
- data/git-org/hooks/pre-receive.sample +24 -0
- data/git-org/hooks/prepare-commit-msg.sample +42 -0
- data/git-org/hooks/push-to-checkout.sample +78 -0
- data/git-org/hooks/update.sample +128 -0
- data/git-org/info/exclude +6 -0
- data/lib/loggable_activity/activity.rb +3 -3
- data/lib/{schemas → loggable_activity}/config_schema.json +3 -3
- data/lib/loggable_activity/configuration.rb +51 -75
- data/lib/loggable_activity/data_owner.rb +0 -1
- data/lib/loggable_activity/encryption.rb +16 -7
- data/lib/loggable_activity/encryption_key.rb +4 -7
- data/lib/loggable_activity/engine.rb +27 -0
- data/lib/loggable_activity/error.rb +0 -10
- data/lib/loggable_activity/hooks.rb +10 -5
- data/lib/loggable_activity/payload.rb +8 -11
- data/lib/loggable_activity/sanitizer.rb +6 -2
- data/lib/loggable_activity/services/base_payloads_builder.rb +14 -5
- data/lib/loggable_activity/services/destroy_payloads_builder.rb +2 -1
- data/lib/loggable_activity/services/payloads_builder.rb +9 -2
- data/lib/loggable_activity/services/update_payloads_builder.rb +30 -2
- data/lib/loggable_activity/version.rb +1 -1
- data/lib/loggable_activity.rb +51 -14
- data/lib/tasks/loggable_activity_tasks.rake +6 -0
- metadata +129 -117
- data/.document +0 -1
- data/.nojekyll +0 -1
- data/.rspec +0 -3
- data/CONSIDERTIONS.md +0 -129
- data/GETTING-STARTED.md +0 -119
- data/LICENSE.txt +0 -21
- data/PAYLOAD_EXAMPLE.md +0 -63
- data/ROADMAP.md +0 -23
- data/docs/LoggableActivity/Activity.html +0 -555
- data/docs/LoggableActivity/Configuration.html +0 -330
- data/docs/LoggableActivity/ConfigurationError.html +0 -148
- data/docs/LoggableActivity/DataOwner.html +0 -138
- data/docs/LoggableActivity/Encryption.html +0 -234
- data/docs/LoggableActivity/EncryptionError.html +0 -145
- data/docs/LoggableActivity/EncryptionKey.html +0 -351
- data/docs/LoggableActivity/Error.html +0 -145
- data/docs/LoggableActivity/Hooks.html +0 -759
- data/docs/LoggableActivity/Payload.html +0 -432
- data/docs/LoggableActivity/Services/BasePayloadsBuilder.html +0 -442
- data/docs/LoggableActivity/Services/DestroyPayloadsBuilder.html +0 -395
- data/docs/LoggableActivity/Services/PayloadsBuilder.html +0 -342
- data/docs/LoggableActivity/Services/UpdatePayloadsBuilder.html +0 -490
- data/docs/LoggableActivity/Services.html +0 -93
- data/docs/LoggableActivity.html +0 -102
- data/docs/created.rid +0 -14
- data/docs/css/fonts.css +0 -167
- data/docs/css/rdoc.css +0 -687
- 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 +0 -99
- data/docs/js/darkfish.js +0 -97
- data/docs/js/navigation.js +0 -105
- data/docs/js/navigation.js.gz +0 -0
- data/docs/js/search.js +0 -110
- data/docs/js/search_index.js +0 -1
- data/docs/js/search_index.js.gz +0 -0
- data/docs/js/searcher.js +0 -229
- data/docs/js/searcher.js.gz +0 -0
- data/docs/table_of_contents.html +0 -617
- data/help/loggable_activity_help.txt +0 -19
- data/lib/generators/.DS_Store +0 -0
- data/lib/generators/loggable_activity/.DS_Store +0 -0
- data/lib/generators/loggable_activity/install_generator.rb +0 -109
- data/lib/generators/loggable_activity/templates/.DS_Store +0 -0
- data/lib/generators/loggable_activity/templates/binary_ids/create_loggable_activities.rb +0 -30
- data/lib/generators/loggable_activity/templates/config/locales/loggable_activity.en.yml +0 -36
- data/lib/generators/loggable_activity/templates/config/loggable_activity.yaml +0 -29
- data/lib/generators/loggable_activity/templates/loggable_activity.en.yaml +0 -36
- data/pkg/loggable_activity-0.1.35.gem +0 -0
- data/sig/loggable_activity.rbs +0 -4
- /data/{.rspec_status → app/assets/images/loggable_activity/.keep} +0 -0
- /data/lib/{generators/loggable_activity/templates → loggable_activity/concerns}/current_user.rb +0 -0
@@ -1,330 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
|
3
|
-
<html>
|
4
|
-
<head>
|
5
|
-
<meta charset="UTF-8">
|
6
|
-
|
7
|
-
<title>class LoggableActivity::Configuration - 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">Object
|
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-c-current_user_model_name">::current_user_model_name</a>
|
76
|
-
<li ><a href="#method-c-fetch_current_user_name_from">::fetch_current_user_name_from</a>
|
77
|
-
<li ><a href="#method-c-for_class">::for_class</a>
|
78
|
-
<li ><a href="#method-c-load_config_file">::load_config_file</a>
|
79
|
-
<li ><a href="#method-c-load_schema">::load_schema</a>
|
80
|
-
<li ><a href="#method-c-loaded-3F">::loaded?</a>
|
81
|
-
<li ><a href="#method-c-validate_config_file">::validate_config_file</a>
|
82
|
-
</ul>
|
83
|
-
</div>
|
84
|
-
|
85
|
-
</div>
|
86
|
-
</nav>
|
87
|
-
|
88
|
-
<main role="main" aria-labelledby="class-LoggableActivity::Configuration">
|
89
|
-
<h1 id="class-LoggableActivity::Configuration" class="class">
|
90
|
-
class LoggableActivity::Configuration
|
91
|
-
</h1>
|
92
|
-
|
93
|
-
<section class="description">
|
94
|
-
|
95
|
-
<p>This class is used to load the configuration file located at config/loggable_activity.yml</p>
|
96
|
-
|
97
|
-
<p>When the LoggableActivity::Hook is included in a model it takes the model’s name and find the configuration for that model in the configuration file.</p>
|
98
|
-
|
99
|
-
</section>
|
100
|
-
|
101
|
-
<section id="5Buntitled-5D" class="documentation-section">
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
<section class="attribute-method-details" class="method-section">
|
106
|
-
<header>
|
107
|
-
<h3>Attributes</h3>
|
108
|
-
</header>
|
109
|
-
|
110
|
-
<div id="attribute-c-config_data" class="method-detail">
|
111
|
-
<div class="method-heading attribute-method-heading">
|
112
|
-
<span class="method-name">config_data</span><span
|
113
|
-
class="attribute-access-type">[R]</span>
|
114
|
-
</div>
|
115
|
-
|
116
|
-
<div class="method-description">
|
117
|
-
<p>@return [Hash]</p>
|
118
|
-
</div>
|
119
|
-
</div>
|
120
|
-
</section>
|
121
|
-
|
122
|
-
|
123
|
-
<section id="public-class-5Buntitled-5D-method-details" class="method-section">
|
124
|
-
<header>
|
125
|
-
<h3>Public Class Methods</h3>
|
126
|
-
</header>
|
127
|
-
|
128
|
-
<div id="method-c-current_user_model_name" class="method-detail ">
|
129
|
-
<div class="method-header">
|
130
|
-
<div class="method-heading">
|
131
|
-
<span class="method-name">current_user_model_name</span><span
|
132
|
-
class="method-args">()</span>
|
133
|
-
<span class="method-click-advice">click to toggle source</span>
|
134
|
-
</div>
|
135
|
-
</div>
|
136
|
-
|
137
|
-
<div class="method-description">
|
138
|
-
<p>Returns the name of the model to use for the current user.</p>
|
139
|
-
|
140
|
-
<div class="method-source-code" id="current_user_model_name-source">
|
141
|
-
<pre><span class="ruby-comment"># File lib/loggable_activity/configuration.rb, line 86</span>
|
142
|
-
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">current_user_model_name</span>
|
143
|
-
<span class="ruby-ivar">@config_data</span>[<span class="ruby-string">'current_user_model_name'</span>]
|
144
|
-
<span class="ruby-keyword">end</span></pre>
|
145
|
-
</div>
|
146
|
-
</div>
|
147
|
-
|
148
|
-
|
149
|
-
</div>
|
150
|
-
|
151
|
-
<div id="method-c-fetch_current_user_name_from" class="method-detail ">
|
152
|
-
<div class="method-header">
|
153
|
-
<div class="method-heading">
|
154
|
-
<span class="method-name">fetch_current_user_name_from</span><span
|
155
|
-
class="method-args">()</span>
|
156
|
-
<span class="method-click-advice">click to toggle source</span>
|
157
|
-
</div>
|
158
|
-
</div>
|
159
|
-
|
160
|
-
<div class="method-description">
|
161
|
-
<p>Returns the name of the field or method to use for the actor’s display name.</p>
|
162
|
-
|
163
|
-
<div class="method-source-code" id="fetch_current_user_name_from-source">
|
164
|
-
<pre><span class="ruby-comment"># File lib/loggable_activity/configuration.rb, line 81</span>
|
165
|
-
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">fetch_current_user_name_from</span>
|
166
|
-
<span class="ruby-ivar">@config_data</span>[<span class="ruby-string">'fetch_current_user_name_from'</span>]
|
167
|
-
<span class="ruby-keyword">end</span></pre>
|
168
|
-
</div>
|
169
|
-
</div>
|
170
|
-
|
171
|
-
|
172
|
-
</div>
|
173
|
-
|
174
|
-
<div id="method-c-for_class" class="method-detail ">
|
175
|
-
<div class="method-header">
|
176
|
-
<div class="method-heading">
|
177
|
-
<span class="method-name">for_class</span><span
|
178
|
-
class="method-args">(class_name)</span>
|
179
|
-
<span class="method-click-advice">click to toggle source</span>
|
180
|
-
</div>
|
181
|
-
</div>
|
182
|
-
|
183
|
-
<div class="method-description">
|
184
|
-
<p>Returns the configuration data for the given class</p>
|
185
|
-
|
186
|
-
<p>Example:</p>
|
187
|
-
|
188
|
-
<pre class="ruby"><span class="ruby-operator">::</span><span class="ruby-constant">LoggableActivity</span><span class="ruby-operator">::</span><span class="ruby-constant">Configuration</span>.<span class="ruby-identifier">for_class</span>(<span class="ruby-string">'User'</span>)
|
189
|
-
</pre>
|
190
|
-
|
191
|
-
<p>Returns:</p>
|
192
|
-
|
193
|
-
<pre>{
|
194
|
-
"fetch_record_name_from": "full_name",
|
195
|
-
"loggable_attrs": [
|
196
|
-
"first_name",
|
197
|
-
"last_name",
|
198
|
-
],
|
199
|
-
"auto_log": [
|
200
|
-
"create",
|
201
|
-
"update",
|
202
|
-
"destroy"
|
203
|
-
],
|
204
|
-
....
|
205
|
-
}</pre>
|
206
|
-
|
207
|
-
<div class="method-source-code" id="for_class-source">
|
208
|
-
<pre><span class="ruby-comment"># File lib/loggable_activity/configuration.rb, line 76</span>
|
209
|
-
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">for_class</span>(<span class="ruby-identifier">class_name</span>)
|
210
|
-
<span class="ruby-ivar">@config_data</span>[<span class="ruby-identifier">class_name</span>]
|
211
|
-
<span class="ruby-keyword">end</span></pre>
|
212
|
-
</div>
|
213
|
-
</div>
|
214
|
-
|
215
|
-
|
216
|
-
</div>
|
217
|
-
|
218
|
-
<div id="method-c-load_config_file" class="method-detail ">
|
219
|
-
<div class="method-header">
|
220
|
-
<div class="method-heading">
|
221
|
-
<span class="method-name">load_config_file</span><span
|
222
|
-
class="method-args">(config_file_path)</span>
|
223
|
-
<span class="method-click-advice">click to toggle source</span>
|
224
|
-
</div>
|
225
|
-
</div>
|
226
|
-
|
227
|
-
<div class="method-description">
|
228
|
-
<p>Loads the configuration file</p>
|
229
|
-
|
230
|
-
<div class="method-source-code" id="load_config_file-source">
|
231
|
-
<pre><span class="ruby-comment"># File lib/loggable_activity/configuration.rb, line 24</span>
|
232
|
-
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">load_config_file</span>(<span class="ruby-identifier">config_file_path</span>)
|
233
|
-
<span class="ruby-ivar">@config_data</span> = <span class="ruby-constant">YAML</span>.<span class="ruby-identifier">load_file</span>(<span class="ruby-identifier">config_file_path</span>)
|
234
|
-
<span class="ruby-identifier">validate_config_file</span>
|
235
|
-
<span class="ruby-keyword">rescue</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">ENOENT</span>
|
236
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ConfigurationError</span>, <span class="ruby-string">'config/loggable_activity.yaml not found'</span>
|
237
|
-
<span class="ruby-keyword">end</span></pre>
|
238
|
-
</div>
|
239
|
-
</div>
|
240
|
-
|
241
|
-
|
242
|
-
</div>
|
243
|
-
|
244
|
-
<div id="method-c-load_schema" class="method-detail ">
|
245
|
-
<div class="method-header">
|
246
|
-
<div class="method-heading">
|
247
|
-
<span class="method-name">load_schema</span><span
|
248
|
-
class="method-args">()</span>
|
249
|
-
<span class="method-click-advice">click to toggle source</span>
|
250
|
-
</div>
|
251
|
-
</div>
|
252
|
-
|
253
|
-
<div class="method-description">
|
254
|
-
<p>Loads the schema file for the configuration file</p>
|
255
|
-
|
256
|
-
<div class="method-source-code" id="load_schema-source">
|
257
|
-
<pre><span class="ruby-comment"># File lib/loggable_activity/configuration.rb, line 32</span>
|
258
|
-
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">load_schema</span>
|
259
|
-
<span class="ruby-identifier">schema_path</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">__dir__</span>, <span class="ruby-string">'..'</span>, <span class="ruby-string">'schemas'</span>, <span class="ruby-string">'config_schema.json'</span>)
|
260
|
-
<span class="ruby-constant">JSON</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">schema_path</span>))
|
261
|
-
<span class="ruby-keyword">end</span></pre>
|
262
|
-
</div>
|
263
|
-
</div>
|
264
|
-
|
265
|
-
|
266
|
-
</div>
|
267
|
-
|
268
|
-
<div id="method-c-loaded-3F" class="method-detail ">
|
269
|
-
<div class="method-header">
|
270
|
-
<div class="method-heading">
|
271
|
-
<span class="method-name">loaded?</span><span
|
272
|
-
class="method-args">()</span>
|
273
|
-
<span class="method-click-advice">click to toggle source</span>
|
274
|
-
</div>
|
275
|
-
</div>
|
276
|
-
|
277
|
-
<div class="method-description">
|
278
|
-
<p>Returns true if the configuration file has been loaded</p>
|
279
|
-
|
280
|
-
<div class="method-source-code" id="loaded-3F-source">
|
281
|
-
<pre><span class="ruby-comment"># File lib/loggable_activity/configuration.rb, line 48</span>
|
282
|
-
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">loaded?</span>
|
283
|
-
<span class="ruby-operator">!</span><span class="ruby-ivar">@config_data</span>.<span class="ruby-identifier">nil?</span>
|
284
|
-
<span class="ruby-keyword">end</span></pre>
|
285
|
-
</div>
|
286
|
-
</div>
|
287
|
-
|
288
|
-
|
289
|
-
</div>
|
290
|
-
|
291
|
-
<div id="method-c-validate_config_file" class="method-detail ">
|
292
|
-
<div class="method-header">
|
293
|
-
<div class="method-heading">
|
294
|
-
<span class="method-name">validate_config_file</span><span
|
295
|
-
class="method-args">()</span>
|
296
|
-
<span class="method-click-advice">click to toggle source</span>
|
297
|
-
</div>
|
298
|
-
</div>
|
299
|
-
|
300
|
-
<div class="method-description">
|
301
|
-
<p>Validates the configuration file againss the schema</p>
|
302
|
-
|
303
|
-
<div class="method-source-code" id="validate_config_file-source">
|
304
|
-
<pre><span class="ruby-comment"># File lib/loggable_activity/configuration.rb, line 38</span>
|
305
|
-
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">validate_config_file</span>
|
306
|
-
<span class="ruby-identifier">schema</span> = <span class="ruby-identifier">load_schema</span>
|
307
|
-
<span class="ruby-identifier">errors</span> = <span class="ruby-constant">JSON</span><span class="ruby-operator">::</span><span class="ruby-constant">Validator</span>.<span class="ruby-identifier">fully_validate</span>(<span class="ruby-identifier">schema</span>, <span class="ruby-ivar">@config_data</span>)
|
308
|
-
<span class="ruby-keyword">return</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">errors</span>.<span class="ruby-identifier">any?</span>
|
309
|
-
|
310
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ConfigurationError</span>,
|
311
|
-
<span class="ruby-node">"config/loggable_activity.yaml is invalid: #{errors.join(', ')}"</span>
|
312
|
-
<span class="ruby-keyword">end</span></pre>
|
313
|
-
</div>
|
314
|
-
</div>
|
315
|
-
|
316
|
-
|
317
|
-
</div>
|
318
|
-
|
319
|
-
</section>
|
320
|
-
|
321
|
-
</section>
|
322
|
-
</main>
|
323
|
-
|
324
|
-
|
325
|
-
<footer id="validator-badges" role="contentinfo">
|
326
|
-
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
327
|
-
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.6.2.
|
328
|
-
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
329
|
-
</footer>
|
330
|
-
|
@@ -1,148 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
|
3
|
-
<html>
|
4
|
-
<head>
|
5
|
-
<meta charset="UTF-8">
|
6
|
-
|
7
|
-
<title>class LoggableActivity::ConfigurationError - 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">StandardError
|
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 class="calls-super" ><a href="#method-c-new">::new</a>
|
76
|
-
</ul>
|
77
|
-
</div>
|
78
|
-
|
79
|
-
</div>
|
80
|
-
</nav>
|
81
|
-
|
82
|
-
<main role="main" aria-labelledby="class-LoggableActivity::ConfigurationError">
|
83
|
-
<h1 id="class-LoggableActivity::ConfigurationError" class="class">
|
84
|
-
class LoggableActivity::ConfigurationError
|
85
|
-
</h1>
|
86
|
-
|
87
|
-
<section class="description">
|
88
|
-
|
89
|
-
<p>This class is used to load the configuration file located at config/loggable_activity.yml</p>
|
90
|
-
|
91
|
-
<p>This class is used to load the configuration file located at config/loggable_activity.yml</p>
|
92
|
-
|
93
|
-
</section>
|
94
|
-
|
95
|
-
<section id="5Buntitled-5D" class="documentation-section">
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
<section id="public-class-5Buntitled-5D-method-details" class="method-section">
|
102
|
-
<header>
|
103
|
-
<h3>Public Class Methods</h3>
|
104
|
-
</header>
|
105
|
-
|
106
|
-
<div id="method-c-new" class="method-detail ">
|
107
|
-
<div class="method-header">
|
108
|
-
<div class="method-heading">
|
109
|
-
<span class="method-name">new</span><span
|
110
|
-
class="method-args">(msg = '')</span>
|
111
|
-
<span class="method-click-advice">click to toggle source</span>
|
112
|
-
</div>
|
113
|
-
</div>
|
114
|
-
|
115
|
-
<div class="method-description">
|
116
|
-
|
117
|
-
<div class="method-calls-super">
|
118
|
-
Calls superclass method
|
119
|
-
|
120
|
-
</div>
|
121
|
-
|
122
|
-
<div class="method-source-code" id="new-source">
|
123
|
-
<pre><span class="ruby-comment"># File lib/loggable_activity/configuration.rb, line 10</span>
|
124
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>(<span class="ruby-identifier">msg</span> = <span class="ruby-string">''</span>)
|
125
|
-
<span class="ruby-comment"># https://api.loggable_activity.com/msg</span>
|
126
|
-
<span class="ruby-identifier">puts</span> <span class="ruby-string">'---------------- LOGGABLE ACTIVITY -----------------'</span>
|
127
|
-
<span class="ruby-identifier">puts</span> <span class="ruby-identifier">msg</span>
|
128
|
-
<span class="ruby-identifier">puts</span> <span class="ruby-string">'----------------------------------------------------'</span>
|
129
|
-
<span class="ruby-keyword">super</span>(<span class="ruby-identifier">msg</span>)
|
130
|
-
<span class="ruby-keyword">end</span></pre>
|
131
|
-
</div>
|
132
|
-
</div>
|
133
|
-
|
134
|
-
|
135
|
-
</div>
|
136
|
-
|
137
|
-
</section>
|
138
|
-
|
139
|
-
</section>
|
140
|
-
</main>
|
141
|
-
|
142
|
-
|
143
|
-
<footer id="validator-badges" role="contentinfo">
|
144
|
-
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
145
|
-
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.6.2.
|
146
|
-
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
147
|
-
</footer>
|
148
|
-
|
@@ -1,138 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
|
3
|
-
<html>
|
4
|
-
<head>
|
5
|
-
<meta charset="UTF-8">
|
6
|
-
|
7
|
-
<title>class LoggableActivity::DataOwner - 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-mark_as_deleted-21">#mark_as_deleted!</a>
|
76
|
-
</ul>
|
77
|
-
</div>
|
78
|
-
|
79
|
-
</div>
|
80
|
-
</nav>
|
81
|
-
|
82
|
-
<main role="main" aria-labelledby="class-LoggableActivity::DataOwner">
|
83
|
-
<h1 id="class-LoggableActivity::DataOwner" class="class">
|
84
|
-
class LoggableActivity::DataOwner
|
85
|
-
</h1>
|
86
|
-
|
87
|
-
<section class="description">
|
88
|
-
|
89
|
-
<p>This class represends an additional data owner for a record. For it to kick in, the data_owner configuration has to be set to true in the loggable_activity.yaml file.</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-mark_as_deleted-21" class="method-detail ">
|
105
|
-
<div class="method-header">
|
106
|
-
<div class="method-heading">
|
107
|
-
<span class="method-name">mark_as_deleted!</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>When a record is deleted, all data owner added to the record is also deleted.</p>
|
115
|
-
|
116
|
-
<div class="method-source-code" id="mark_as_deleted-21-source">
|
117
|
-
<pre><span class="ruby-comment"># File lib/loggable_activity/data_owner.rb, line 15</span>
|
118
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">mark_as_deleted!</span>
|
119
|
-
<span class="ruby-identifier">encryption_key</span>.<span class="ruby-identifier">mark_as_deleted!</span>
|
120
|
-
<span class="ruby-keyword">end</span></pre>
|
121
|
-
</div>
|
122
|
-
</div>
|
123
|
-
|
124
|
-
|
125
|
-
</div>
|
126
|
-
|
127
|
-
</section>
|
128
|
-
|
129
|
-
</section>
|
130
|
-
</main>
|
131
|
-
|
132
|
-
|
133
|
-
<footer id="validator-badges" role="contentinfo">
|
134
|
-
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
135
|
-
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.6.2.
|
136
|
-
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
137
|
-
</footer>
|
138
|
-
|