tainted_love 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -1
  3. data/Gemfile.lock +1 -1
  4. data/README.md +8 -0
  5. data/example/Gemfile.lock +1 -1
  6. data/example/test/test_helper.rb +3 -1
  7. data/lib/tainted_love/replacer/replace_action_view.rb +1 -1
  8. data/lib/tainted_love/reporter/file_reporter.rb +9 -5
  9. data/lib/tainted_love/reporter/stdout_reporter.rb +29 -9
  10. data/lib/tainted_love/validator/railties_yaml_load.rb +16 -0
  11. data/lib/tainted_love/version.rb +1 -1
  12. data/tools/web/.gitignore +1 -0
  13. data/tools/web/Gemfile +3 -0
  14. data/tools/web/application.rb +39 -0
  15. data/tools/web/public/application.css +79 -0
  16. data/tools/web/public/application.js +0 -0
  17. data/tools/web/views/index.erb +57 -0
  18. data/tools/web/views/layout.erb +25 -0
  19. data/tools/web/views/line.erb +11 -0
  20. data/tools/web/views/warning.erb +3 -0
  21. data/tools/web/views/warnings.erb +3 -0
  22. metadata +13 -53
  23. data/docs/TaintedLove.html +0 -482
  24. data/docs/TaintedLove/Configuration.html +0 -499
  25. data/docs/TaintedLove/Replacer.html +0 -129
  26. data/docs/TaintedLove/Replacer/ActionViewHelpersMod.html +0 -230
  27. data/docs/TaintedLove/Replacer/Base.html +0 -320
  28. data/docs/TaintedLove/Replacer/HelperMod.html +0 -226
  29. data/docs/TaintedLove/Replacer/HelpersMod.html +0 -230
  30. data/docs/TaintedLove/Replacer/MarshalMod.html +0 -178
  31. data/docs/TaintedLove/Replacer/ObjectMod.html +0 -282
  32. data/docs/TaintedLove/Replacer/ReplaceActionController.html +0 -329
  33. data/docs/TaintedLove/Replacer/ReplaceActionView.html +0 -317
  34. data/docs/TaintedLove/Replacer/ReplaceActiveRecord.html +0 -341
  35. data/docs/TaintedLove/Replacer/ReplaceDigest.html +0 -369
  36. data/docs/TaintedLove/Replacer/ReplaceFile.html +0 -245
  37. data/docs/TaintedLove/Replacer/ReplaceKernel.html +0 -211
  38. data/docs/TaintedLove/Replacer/ReplaceMarshal.html +0 -219
  39. data/docs/TaintedLove/Replacer/ReplaceObject.html +0 -231
  40. data/docs/TaintedLove/Replacer/ReplaceRailsUserInput.html +0 -374
  41. data/docs/TaintedLove/Replacer/ReplaceSprokets.html +0 -297
  42. data/docs/TaintedLove/Replacer/SprocketsHelperMod.html +0 -226
  43. data/docs/TaintedLove/Reporter.html +0 -117
  44. data/docs/TaintedLove/Reporter/Base.html +0 -466
  45. data/docs/TaintedLove/Reporter/RackReporter.html +0 -309
  46. data/docs/TaintedLove/Reporter/SinatraReporter.html +0 -402
  47. data/docs/TaintedLove/Reporter/SinatraReporter/App.html +0 -210
  48. data/docs/TaintedLove/Reporter/StdoutReporter.html +0 -305
  49. data/docs/TaintedLove/SinatraReporter.html +0 -387
  50. data/docs/TaintedLove/SinatraReporter/App.html +0 -210
  51. data/docs/TaintedLove/StackTrace.html +0 -650
  52. data/docs/TaintedLove/Utils.html +0 -550
  53. data/docs/TaintedLove/Validator.html +0 -129
  54. data/docs/TaintedLove/Validator/ActionViewObjectSend.html +0 -233
  55. data/docs/TaintedLove/Validator/Base.html +0 -200
  56. data/docs/TaintedLove/Validator/ErbEval.html +0 -229
  57. data/docs/TaintedLove/Validator/RedisStoreSerialization.html +0 -238
  58. data/docs/TaintedLove/Validator/SproketsMarshal.html +0 -233
  59. data/docs/TaintedLove/Warning.html +0 -665
  60. data/docs/_index.html +0 -371
  61. data/docs/class_list.html +0 -51
  62. data/docs/css/common.css +0 -1
  63. data/docs/css/full_list.css +0 -58
  64. data/docs/css/style.css +0 -496
  65. data/docs/file.README.html +0 -134
  66. data/docs/file_list.html +0 -56
  67. data/docs/frames.html +0 -17
  68. data/docs/index.html +0 -134
  69. data/docs/js/app.js +0 -292
  70. data/docs/js/full_list.js +0 -216
  71. data/docs/js/jquery.js +0 -4
  72. data/docs/method_list.html +0 -523
  73. data/docs/top-level-namespace.html +0 -110
@@ -1,341 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>
7
- Class: TaintedLove::Replacer::ReplaceActiveRecord
8
-
9
- &mdash; Documentation by YARD 0.9.18
10
-
11
- </title>
12
-
13
- <link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
14
-
15
- <link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
16
-
17
- <script type="text/javascript" charset="utf-8">
18
- pathId = "TaintedLove::Replacer::ReplaceActiveRecord";
19
- relpath = '../../';
20
- </script>
21
-
22
-
23
- <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
24
-
25
- <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
26
-
27
-
28
- </head>
29
- <body>
30
- <div class="nav_wrap">
31
- <iframe id="nav" src="../../class_list.html?1"></iframe>
32
- <div id="resizer"></div>
33
- </div>
34
-
35
- <div id="main" tabindex="-1">
36
- <div id="header">
37
- <div id="menu">
38
-
39
- <a href="../../_index.html">Index (R)</a> &raquo;
40
- <span class='title'><span class='object_link'><a href="../../TaintedLove.html" title="TaintedLove (module)">TaintedLove</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Replacer.html" title="TaintedLove::Replacer (module)">Replacer</a></span></span>
41
- &raquo;
42
- <span class="title">ReplaceActiveRecord</span>
43
-
44
- </div>
45
-
46
- <div id="search">
47
-
48
- <a class="full_list_link" id="class_list_link"
49
- href="../../class_list.html">
50
-
51
- <svg width="24" height="24">
52
- <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
- <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
- <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
- </svg>
56
- </a>
57
-
58
- </div>
59
- <div class="clear"></div>
60
- </div>
61
-
62
- <div id="content"><h1>Class: TaintedLove::Replacer::ReplaceActiveRecord
63
-
64
-
65
-
66
- </h1>
67
- <div class="box_info">
68
-
69
- <dl>
70
- <dt>Inherits:</dt>
71
- <dd>
72
- <span class="inheritName"><span class='object_link'><a href="Base.html" title="TaintedLove::Replacer::Base (class)">Base</a></span></span>
73
-
74
- <ul class="fullTree">
75
- <li>Object</li>
76
-
77
- <li class="next"><span class='object_link'><a href="Base.html" title="TaintedLove::Replacer::Base (class)">Base</a></span></li>
78
-
79
- <li class="next">TaintedLove::Replacer::ReplaceActiveRecord</li>
80
-
81
- </ul>
82
- <a href="#" class="inheritanceTree">show all</a>
83
-
84
- </dd>
85
- </dl>
86
-
87
-
88
-
89
-
90
-
91
-
92
-
93
-
94
-
95
-
96
-
97
- <dl>
98
- <dt>Defined in:</dt>
99
- <dd>lib/tainted_love/replacer/replace_active_record.rb</dd>
100
- </dl>
101
-
102
- </div>
103
-
104
-
105
-
106
-
107
-
108
-
109
-
110
-
111
-
112
- <h2>
113
- Instance Method Summary
114
- <small><a href="#" class="summary_toggle">collapse</a></small>
115
- </h2>
116
-
117
- <ul class="summary">
118
-
119
- <li class="public ">
120
- <span class="summary_signature">
121
-
122
- <a href="#replace!-instance_method" title="#replace! (instance method)">#<strong>replace!</strong> &#x21d2; Object </a>
123
-
124
-
125
-
126
- </span>
127
-
128
-
129
-
130
-
131
-
132
-
133
-
134
-
135
-
136
- <span class="summary_desc"><div class='inline'></div></span>
137
-
138
- </li>
139
-
140
-
141
- <li class="public ">
142
- <span class="summary_signature">
143
-
144
- <a href="#should_replace%3F-instance_method" title="#should_replace? (instance method)">#<strong>should_replace?</strong> &#x21d2; Boolean </a>
145
-
146
-
147
-
148
- </span>
149
-
150
-
151
-
152
-
153
-
154
-
155
-
156
-
157
-
158
- <span class="summary_desc"><div class='inline'></div></span>
159
-
160
- </li>
161
-
162
-
163
- </ul>
164
-
165
-
166
-
167
-
168
-
169
-
170
-
171
-
172
-
173
-
174
-
175
- <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Base.html" title="TaintedLove::Replacer::Base (class)">Base</a></span></h3>
176
- <p class="inherited"><span class='object_link'><a href="Base.html#replacers-class_method" title="TaintedLove::Replacer::Base.replacers (method)">replacers</a></span></p>
177
-
178
-
179
- <div id="instance_method_details" class="method_details_list">
180
- <h2>Instance Method Details</h2>
181
-
182
-
183
- <div class="method_details first">
184
- <h3 class="signature first" id="replace!-instance_method">
185
-
186
- #<strong>replace!</strong> &#x21d2; <tt>Object</tt>
187
-
188
-
189
-
190
-
191
-
192
- </h3><table class="source_code">
193
- <tr>
194
- <td>
195
- <pre class="lines">
196
-
197
-
198
- 10
199
- 11
200
- 12
201
- 13
202
- 14
203
- 15
204
- 16
205
- 17
206
- 18
207
- 19
208
- 20
209
- 21
210
- 22
211
- 23
212
- 24
213
- 25
214
- 26
215
- 27
216
- 28
217
- 29
218
- 30
219
- 31
220
- 32
221
- 33
222
- 34
223
- 35
224
- 36
225
- 37
226
- 38
227
- 39
228
- 40
229
- 41
230
- 42
231
- 43
232
- 44</pre>
233
- </td>
234
- <td>
235
- <pre class="code"><span class="info file"># File 'lib/tainted_love/replacer/replace_active_record.rb', line 10</span>
236
-
237
- <span class='kw'>def</span> <span class='id identifier rubyid_replace!'>replace!</span>
238
- <span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>active_record/relation</span><span class='tstring_end'>&#39;</span></span>
239
-
240
- <span class='const'><span class='object_link'><a href="../../TaintedLove.html" title="TaintedLove (module)">TaintedLove</a></span></span><span class='period'>.</span><span class='id identifier rubyid_proxy_method'><span class='object_link'><a href="../Utils.html#proxy_method-instance_method" title="TaintedLove::Utils#proxy_method (method)">proxy_method</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>ActiveRecord::QueryMethods</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='symbol'>:where</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid__'>_</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='op'>|</span>
241
- <span class='kw'>unless</span> <span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
242
- <span class='id identifier rubyid_f'>f</span> <span class='op'>=</span> <span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span>
243
- <span class='kw'>if</span> <span class='id identifier rubyid_f'>f</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>String</span><span class='rparen'>)</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_f'>f</span><span class='period'>.</span><span class='id identifier rubyid_tainted?'>tainted?</span>
244
- <span class='const'><span class='object_link'><a href="../../TaintedLove.html" title="TaintedLove (module)">TaintedLove</a></span></span><span class='period'>.</span><span class='id identifier rubyid_report'><span class='object_link'><a href="../../TaintedLove.html#report-class_method" title="TaintedLove.report (method)">report</a></span></span><span class='lparen'>(</span><span class='symbol'>:ReplaceActiveRecord</span><span class='comma'>,</span> <span class='id identifier rubyid_f'>f</span><span class='rparen'>)</span>
245
- <span class='kw'>end</span>
246
- <span class='kw'>end</span>
247
- <span class='kw'>end</span>
248
-
249
- <span class='const'><span class='object_link'><a href="../../TaintedLove.html" title="TaintedLove (module)">TaintedLove</a></span></span><span class='period'>.</span><span class='id identifier rubyid_proxy_method'><span class='object_link'><a href="../Utils.html#proxy_method-instance_method" title="TaintedLove::Utils#proxy_method (method)">proxy_method</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>ActiveRecord::QueryMethods</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='symbol'>:select</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid__'>_</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='op'>|</span>
250
- <span class='kw'>unless</span> <span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
251
- <span class='id identifier rubyid_f'>f</span> <span class='op'>=</span> <span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span>
252
- <span class='kw'>if</span> <span class='id identifier rubyid_f'>f</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>String</span><span class='rparen'>)</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_f'>f</span><span class='period'>.</span><span class='id identifier rubyid_tainted?'>tainted?</span>
253
- <span class='const'><span class='object_link'><a href="../../TaintedLove.html" title="TaintedLove (module)">TaintedLove</a></span></span><span class='period'>.</span><span class='id identifier rubyid_report'><span class='object_link'><a href="../../TaintedLove.html#report-class_method" title="TaintedLove.report (method)">report</a></span></span><span class='lparen'>(</span><span class='symbol'>:ReplaceActiveRecord</span><span class='comma'>,</span> <span class='id identifier rubyid_f'>f</span><span class='rparen'>)</span>
254
- <span class='kw'>end</span>
255
- <span class='kw'>end</span>
256
- <span class='kw'>end</span>
257
-
258
- <span class='id identifier rubyid_mod'>mod</span> <span class='op'>=</span> <span class='const'>Module</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='kw'>do</span>
259
- <span class='lbracket'>[</span><span class='symbol'>:find_by_sql</span><span class='comma'>,</span> <span class='symbol'>:count_by_sql</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_method'>method</span><span class='op'>|</span>
260
- <span class='id identifier rubyid_define_method'>define_method</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='op'>|</span>
261
- <span class='kw'>if</span> <span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span><span class='period'>.</span><span class='id identifier rubyid_tainted?'>tainted?</span>
262
- <span class='const'><span class='object_link'><a href="../../TaintedLove.html" title="TaintedLove (module)">TaintedLove</a></span></span><span class='period'>.</span><span class='id identifier rubyid_report'><span class='object_link'><a href="../../TaintedLove.html#report-class_method" title="TaintedLove.report (method)">report</a></span></span><span class='lparen'>(</span><span class='symbol'>:ReplaceActiveRecord</span><span class='comma'>,</span> <span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span><span class='rparen'>)</span>
263
- <span class='kw'>end</span>
264
-
265
- <span class='kw'>super</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
266
- <span class='kw'>end</span>
267
- <span class='kw'>end</span>
268
- <span class='kw'>end</span>
269
-
270
- <span class='const'>ActiveRecord</span><span class='op'>::</span><span class='const'>Base</span><span class='period'>.</span><span class='id identifier rubyid_extend'>extend</span><span class='lparen'>(</span><span class='id identifier rubyid_mod'>mod</span><span class='rparen'>)</span>
271
- <span class='kw'>end</span></pre>
272
- </td>
273
- </tr>
274
- </table>
275
- </div>
276
-
277
- <div class="method_details ">
278
- <h3 class="signature " id="should_replace?-instance_method">
279
-
280
- #<strong>should_replace?</strong> &#x21d2; <tt>Boolean</tt>
281
-
282
-
283
-
284
-
285
-
286
- </h3><div class="docstring">
287
- <div class="discussion">
288
-
289
-
290
- </div>
291
- </div>
292
- <div class="tags">
293
-
294
- <p class="tag_title">Returns:</p>
295
- <ul class="return">
296
-
297
- <li>
298
-
299
-
300
- <span class='type'>(<tt>Boolean</tt>)</span>
301
-
302
-
303
-
304
- </li>
305
-
306
- </ul>
307
-
308
- </div><table class="source_code">
309
- <tr>
310
- <td>
311
- <pre class="lines">
312
-
313
-
314
- 6
315
- 7
316
- 8</pre>
317
- </td>
318
- <td>
319
- <pre class="code"><span class="info file"># File 'lib/tainted_love/replacer/replace_active_record.rb', line 6</span>
320
-
321
- <span class='kw'>def</span> <span class='id identifier rubyid_should_replace?'>should_replace?</span>
322
- <span class='const'>Object</span><span class='period'>.</span><span class='id identifier rubyid_const_defined?'>const_defined?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>ActiveRecord</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
323
- <span class='kw'>end</span></pre>
324
- </td>
325
- </tr>
326
- </table>
327
- </div>
328
-
329
- </div>
330
-
331
- </div>
332
-
333
- <div id="footer">
334
- Generated on Tue Apr 2 15:50:34 2019 by
335
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
336
- 0.9.18 (ruby-2.5.3).
337
- </div>
338
-
339
- </div>
340
- </body>
341
- </html>
@@ -1,369 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>
7
- Class: TaintedLove::Replacer::ReplaceDigest
8
-
9
- &mdash; Documentation by YARD 0.9.18
10
-
11
- </title>
12
-
13
- <link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
14
-
15
- <link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
16
-
17
- <script type="text/javascript" charset="utf-8">
18
- pathId = "TaintedLove::Replacer::ReplaceDigest";
19
- relpath = '../../';
20
- </script>
21
-
22
-
23
- <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
24
-
25
- <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
26
-
27
-
28
- </head>
29
- <body>
30
- <div class="nav_wrap">
31
- <iframe id="nav" src="../../class_list.html?1"></iframe>
32
- <div id="resizer"></div>
33
- </div>
34
-
35
- <div id="main" tabindex="-1">
36
- <div id="header">
37
- <div id="menu">
38
-
39
- <a href="../../_index.html">Index (R)</a> &raquo;
40
- <span class='title'><span class='object_link'><a href="../../TaintedLove.html" title="TaintedLove (module)">TaintedLove</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Replacer.html" title="TaintedLove::Replacer (module)">Replacer</a></span></span>
41
- &raquo;
42
- <span class="title">ReplaceDigest</span>
43
-
44
- </div>
45
-
46
- <div id="search">
47
-
48
- <a class="full_list_link" id="class_list_link"
49
- href="../../class_list.html">
50
-
51
- <svg width="24" height="24">
52
- <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
- <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
- <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
- </svg>
56
- </a>
57
-
58
- </div>
59
- <div class="clear"></div>
60
- </div>
61
-
62
- <div id="content"><h1>Class: TaintedLove::Replacer::ReplaceDigest
63
-
64
-
65
-
66
- </h1>
67
- <div class="box_info">
68
-
69
- <dl>
70
- <dt>Inherits:</dt>
71
- <dd>
72
- <span class="inheritName"><span class='object_link'><a href="Base.html" title="TaintedLove::Replacer::Base (class)">Base</a></span></span>
73
-
74
- <ul class="fullTree">
75
- <li>Object</li>
76
-
77
- <li class="next"><span class='object_link'><a href="Base.html" title="TaintedLove::Replacer::Base (class)">Base</a></span></li>
78
-
79
- <li class="next">TaintedLove::Replacer::ReplaceDigest</li>
80
-
81
- </ul>
82
- <a href="#" class="inheritanceTree">show all</a>
83
-
84
- </dd>
85
- </dl>
86
-
87
-
88
-
89
-
90
-
91
-
92
-
93
-
94
-
95
-
96
-
97
- <dl>
98
- <dt>Defined in:</dt>
99
- <dd>lib/tainted_love/replacer/replace_digest.rb</dd>
100
- </dl>
101
-
102
- </div>
103
-
104
-
105
-
106
-
107
-
108
-
109
-
110
-
111
-
112
- <h2>
113
- Instance Method Summary
114
- <small><a href="#" class="summary_toggle">collapse</a></small>
115
- </h2>
116
-
117
- <ul class="summary">
118
-
119
- <li class="public ">
120
- <span class="summary_signature">
121
-
122
- <a href="#create_module-instance_method" title="#create_module (instance method)">#<strong>create_module</strong>(digest_class) &#x21d2; Object </a>
123
-
124
-
125
-
126
- </span>
127
-
128
-
129
-
130
-
131
-
132
-
133
-
134
-
135
-
136
- <span class="summary_desc"><div class='inline'></div></span>
137
-
138
- </li>
139
-
140
-
141
- <li class="public ">
142
- <span class="summary_signature">
143
-
144
- <a href="#replace!-instance_method" title="#replace! (instance method)">#<strong>replace!</strong> &#x21d2; Object </a>
145
-
146
-
147
-
148
- </span>
149
-
150
-
151
-
152
-
153
-
154
-
155
-
156
-
157
-
158
- <span class="summary_desc"><div class='inline'></div></span>
159
-
160
- </li>
161
-
162
-
163
- <li class="public ">
164
- <span class="summary_signature">
165
-
166
- <a href="#should_replace%3F-instance_method" title="#should_replace? (instance method)">#<strong>should_replace?</strong> &#x21d2; Boolean </a>
167
-
168
-
169
-
170
- </span>
171
-
172
-
173
-
174
-
175
-
176
-
177
-
178
-
179
-
180
- <span class="summary_desc"><div class='inline'></div></span>
181
-
182
- </li>
183
-
184
-
185
- </ul>
186
-
187
-
188
-
189
-
190
-
191
-
192
-
193
-
194
-
195
-
196
-
197
- <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Base.html" title="TaintedLove::Replacer::Base (class)">Base</a></span></h3>
198
- <p class="inherited"><span class='object_link'><a href="Base.html#replacers-class_method" title="TaintedLove::Replacer::Base.replacers (method)">replacers</a></span></p>
199
-
200
-
201
- <div id="instance_method_details" class="method_details_list">
202
- <h2>Instance Method Details</h2>
203
-
204
-
205
- <div class="method_details first">
206
- <h3 class="signature first" id="create_module-instance_method">
207
-
208
- #<strong>create_module</strong>(digest_class) &#x21d2; <tt>Object</tt>
209
-
210
-
211
-
212
-
213
-
214
- </h3><table class="source_code">
215
- <tr>
216
- <td>
217
- <pre class="lines">
218
-
219
-
220
- 19
221
- 20
222
- 21
223
- 22
224
- 23
225
- 24
226
- 25
227
- 26
228
- 27
229
- 28
230
- 29
231
- 30
232
- 31
233
- 32
234
- 33
235
- 34
236
- 35
237
- 36</pre>
238
- </td>
239
- <td>
240
- <pre class="code"><span class="info file"># File 'lib/tainted_love/replacer/replace_digest.rb', line 19</span>
241
-
242
- <span class='kw'>def</span> <span class='id identifier rubyid_create_module'>create_module</span><span class='lparen'>(</span><span class='id identifier rubyid_digest_class'>digest_class</span><span class='rparen'>)</span>
243
- <span class='id identifier rubyid_module_code'>module_code</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>%{</span><span class='tstring_content'>
244
- Module.new do
245
- def hexdigest(value)
246
- digest = super
247
-
248
- digest.instance_eval do
249
- def tainted_love_origin
250
- </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_digest_class'>digest_class</span><span class='embexpr_end'>}</span><span class='tstring_content'>
251
- end
252
- end
253
-
254
- digest
255
- end
256
- end
257
- </span><span class='tstring_end'>}</span></span>
258
- <span class='id identifier rubyid_eval'>eval</span><span class='lparen'>(</span><span class='id identifier rubyid_module_code'>module_code</span><span class='rparen'>)</span>
259
- <span class='kw'>end</span></pre>
260
- </td>
261
- </tr>
262
- </table>
263
- </div>
264
-
265
- <div class="method_details ">
266
- <h3 class="signature " id="replace!-instance_method">
267
-
268
- #<strong>replace!</strong> &#x21d2; <tt>Object</tt>
269
-
270
-
271
-
272
-
273
-
274
- </h3><table class="source_code">
275
- <tr>
276
- <td>
277
- <pre class="lines">
278
-
279
-
280
- 10
281
- 11
282
- 12
283
- 13
284
- 14
285
- 15
286
- 16
287
- 17</pre>
288
- </td>
289
- <td>
290
- <pre class="code"><span class="info file"># File 'lib/tainted_love/replacer/replace_digest.rb', line 10</span>
291
-
292
- <span class='kw'>def</span> <span class='id identifier rubyid_replace!'>replace!</span>
293
- <span class='id identifier rubyid_digests'>digests</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='symbol'>:MD5</span><span class='comma'>,</span> <span class='symbol'>:SHA256</span><span class='comma'>,</span> <span class='symbol'>:SHA512</span><span class='comma'>,</span> <span class='symbol'>:SHA2</span><span class='comma'>,</span> <span class='symbol'>:SHA384</span><span class='comma'>,</span> <span class='symbol'>:SHA1</span><span class='rbracket'>]</span>
294
-
295
- <span class='id identifier rubyid_digests'>digests</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_digest'>digest</span><span class='op'>|</span>
296
- <span class='id identifier rubyid_mod'>mod</span> <span class='op'>=</span> <span class='const'>Digest</span><span class='period'>.</span><span class='id identifier rubyid_const_get'>const_get</span><span class='lparen'>(</span><span class='id identifier rubyid_digest'>digest</span><span class='rparen'>)</span>
297
- <span class='id identifier rubyid_mod'>mod</span><span class='period'>.</span><span class='id identifier rubyid_extend'>extend</span><span class='lparen'>(</span><span class='id identifier rubyid_create_module'>create_module</span><span class='lparen'>(</span><span class='id identifier rubyid_mod'>mod</span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='const'>Object</span><span class='period'>.</span><span class='id identifier rubyid_const_defined?'>const_defined?</span><span class='lparen'>(</span><span class='id identifier rubyid_mod'>mod</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rparen'>)</span>
298
- <span class='kw'>end</span>
299
- <span class='kw'>end</span></pre>
300
- </td>
301
- </tr>
302
- </table>
303
- </div>
304
-
305
- <div class="method_details ">
306
- <h3 class="signature " id="should_replace?-instance_method">
307
-
308
- #<strong>should_replace?</strong> &#x21d2; <tt>Boolean</tt>
309
-
310
-
311
-
312
-
313
-
314
- </h3><div class="docstring">
315
- <div class="discussion">
316
-
317
-
318
- </div>
319
- </div>
320
- <div class="tags">
321
-
322
- <p class="tag_title">Returns:</p>
323
- <ul class="return">
324
-
325
- <li>
326
-
327
-
328
- <span class='type'>(<tt>Boolean</tt>)</span>
329
-
330
-
331
-
332
- </li>
333
-
334
- </ul>
335
-
336
- </div><table class="source_code">
337
- <tr>
338
- <td>
339
- <pre class="lines">
340
-
341
-
342
- 6
343
- 7
344
- 8</pre>
345
- </td>
346
- <td>
347
- <pre class="code"><span class="info file"># File 'lib/tainted_love/replacer/replace_digest.rb', line 6</span>
348
-
349
- <span class='kw'>def</span> <span class='id identifier rubyid_should_replace?'>should_replace?</span>
350
- <span class='const'>Object</span><span class='period'>.</span><span class='id identifier rubyid_const_defined?'>const_defined?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Digest</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
351
- <span class='kw'>end</span></pre>
352
- </td>
353
- </tr>
354
- </table>
355
- </div>
356
-
357
- </div>
358
-
359
- </div>
360
-
361
- <div id="footer">
362
- Generated on Tue Apr 2 15:50:34 2019 by
363
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
364
- 0.9.18 (ruby-2.5.3).
365
- </div>
366
-
367
- </div>
368
- </body>
369
- </html>