simple-service 0.1.3 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -2
  3. data/.rubocop.yml +10 -2
  4. data/Gemfile +3 -1
  5. data/Makefile +7 -11
  6. data/README.md +67 -2
  7. data/TODO.txt +3 -0
  8. data/VERSION +1 -1
  9. data/doc/Simple/Service/Action/Comment/Extractor.html +347 -0
  10. data/doc/Simple/Service/Action/Comment.html +451 -0
  11. data/doc/Simple/Service/Action/MethodReflection.html +285 -0
  12. data/doc/Simple/Service/Action/Parameter.html +816 -0
  13. data/doc/Simple/Service/Action.html +923 -0
  14. data/doc/Simple/Service/ArgumentError.html +128 -0
  15. data/doc/Simple/Service/ClassMethods.html +187 -0
  16. data/doc/Simple/Service/Context.html +379 -0
  17. data/doc/Simple/Service/ContextMissingError.html +124 -0
  18. data/doc/Simple/Service/ContextReadOnlyError.html +206 -0
  19. data/doc/Simple/Service/ExtraArguments.html +428 -0
  20. data/doc/Simple/Service/GemHelper.html +190 -0
  21. data/doc/Simple/Service/MissingArguments.html +426 -0
  22. data/doc/Simple/Service/NoSuchAction.html +433 -0
  23. data/doc/Simple/Service.html +865 -0
  24. data/doc/Simple.html +117 -0
  25. data/doc/_index.html +274 -0
  26. data/doc/class_list.html +51 -0
  27. data/doc/css/common.css +1 -0
  28. data/doc/css/full_list.css +58 -0
  29. data/doc/css/style.css +496 -0
  30. data/doc/file.README.html +146 -0
  31. data/doc/file.TODO.html +70 -0
  32. data/doc/file_list.html +61 -0
  33. data/doc/frames.html +17 -0
  34. data/doc/index.html +146 -0
  35. data/doc/js/app.js +303 -0
  36. data/doc/js/full_list.js +216 -0
  37. data/doc/js/jquery.js +4 -0
  38. data/doc/method_list.html +483 -0
  39. data/doc/top-level-namespace.html +110 -0
  40. data/lib/simple/service/action/comment.rb +2 -2
  41. data/lib/simple/service/action/method_reflection.rb +1 -1
  42. data/lib/simple/service/action/parameter.rb +1 -1
  43. data/lib/simple/service/action.rb +34 -46
  44. data/lib/simple/service/errors.rb +4 -3
  45. data/lib/simple/service/version.rb +2 -2
  46. data/lib/simple/service.rb +109 -34
  47. data/lib/simple/workflow/context.rb +105 -0
  48. data/lib/simple/workflow/current_context.rb +33 -0
  49. data/lib/simple/workflow/reloader.rb +84 -0
  50. data/lib/simple/workflow/rspec_helper.rb +15 -0
  51. data/lib/simple/workflow.rb +96 -0
  52. data/lib/simple-workflow.rb +3 -0
  53. data/scripts/test +2 -0
  54. data/simple-service.gemspec +1 -0
  55. data/spec/simple/service/action_invoke3_spec.rb +258 -0
  56. data/spec/simple/service/action_invoke_spec.rb +49 -87
  57. data/spec/simple/service/service_spec.rb +40 -32
  58. data/spec/simple/workflow/context_spec.rb +90 -0
  59. data/spec/simple/workflow/current_context_spec.rb +41 -0
  60. data/spec/simple/workflow/reloader_spec/example1.rb +10 -0
  61. data/spec/simple/workflow/reloader_spec/example2.rb +7 -0
  62. data/spec/simple/workflow/reloader_spec.rb +48 -0
  63. data/spec/spec_helper.rb +2 -1
  64. data/spec/support/spec_services.rb +8 -2
  65. metadata +74 -9
  66. data/lib/simple/service/action/indie_hash.rb +0 -37
  67. data/lib/simple/service/context.rb +0 -94
  68. data/spec/simple/service/action_invoke2_spec.rb +0 -166
  69. data/spec/simple/service/context_spec.rb +0 -69
@@ -0,0 +1,428 @@
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
+ Exception: Simple::Service::ExtraArguments
8
+
9
+ &mdash; Documentation by YARD 0.9.20
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 = "Simple::Service::ExtraArguments";
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 (E)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../../Simple.html" title="Simple (module)">Simple</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Service.html" title="Simple::Service (module)">Service</a></span></span>
41
+ &raquo;
42
+ <span class="title">ExtraArguments</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>Exception: Simple::Service::ExtraArguments
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="ArgumentError.html" title="Simple::Service::ArgumentError (class)">ArgumentError</a></span></span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next">ArgumentError</li>
78
+
79
+ <li class="next"><span class='object_link'><a href="ArgumentError.html" title="Simple::Service::ArgumentError (class)">ArgumentError</a></span></li>
80
+
81
+ <li class="next">Simple::Service::ExtraArguments</li>
82
+
83
+ </ul>
84
+ <a href="#" class="inheritanceTree">show all</a>
85
+
86
+ </dd>
87
+ </dl>
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+ <dl>
100
+ <dt>Defined in:</dt>
101
+ <dd>lib/simple/service/errors.rb</dd>
102
+ </dl>
103
+
104
+ </div>
105
+
106
+
107
+
108
+
109
+
110
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
111
+ <ul class="summary">
112
+
113
+ <li class="public ">
114
+ <span class="summary_signature">
115
+
116
+ <a href="#action-instance_method" title="#action (instance method)">#<strong>action</strong> &#x21d2; Object </a>
117
+
118
+
119
+
120
+ </span>
121
+
122
+
123
+
124
+
125
+ <span class="note title readonly">readonly</span>
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+ <span class="summary_desc"><div class='inline'>
136
+ <p>Returns the value of attribute action.</p>
137
+ </div></span>
138
+
139
+ </li>
140
+
141
+
142
+ <li class="public ">
143
+ <span class="summary_signature">
144
+
145
+ <a href="#arguments-instance_method" title="#arguments (instance method)">#<strong>arguments</strong> &#x21d2; Object </a>
146
+
147
+
148
+
149
+ </span>
150
+
151
+
152
+
153
+
154
+ <span class="note title readonly">readonly</span>
155
+
156
+
157
+
158
+
159
+
160
+
161
+
162
+
163
+
164
+ <span class="summary_desc"><div class='inline'>
165
+ <p>Returns the value of attribute arguments.</p>
166
+ </div></span>
167
+
168
+ </li>
169
+
170
+
171
+ </ul>
172
+
173
+
174
+
175
+
176
+
177
+ <h2>
178
+ Instance Method Summary
179
+ <small><a href="#" class="summary_toggle">collapse</a></small>
180
+ </h2>
181
+
182
+ <ul class="summary">
183
+
184
+ <li class="public ">
185
+ <span class="summary_signature">
186
+
187
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(action, arguments) &#x21d2; ExtraArguments </a>
188
+
189
+
190
+
191
+ </span>
192
+
193
+
194
+ <span class="note title constructor">constructor</span>
195
+
196
+
197
+
198
+
199
+
200
+
201
+
202
+
203
+ <span class="summary_desc"><div class='inline'>
204
+ <p>A new instance of ExtraArguments.</p>
205
+ </div></span>
206
+
207
+ </li>
208
+
209
+
210
+ <li class="public ">
211
+ <span class="summary_signature">
212
+
213
+ <a href="#to_s-instance_method" title="#to_s (instance method)">#<strong>to_s</strong> &#x21d2; Object </a>
214
+
215
+
216
+
217
+ </span>
218
+
219
+
220
+
221
+
222
+
223
+
224
+
225
+
226
+
227
+ <span class="summary_desc"><div class='inline'></div></span>
228
+
229
+ </li>
230
+
231
+
232
+ </ul>
233
+
234
+
235
+
236
+
237
+
238
+
239
+
240
+
241
+
242
+ <div id="constructor_details" class="method_details_list">
243
+ <h2>Constructor Details</h2>
244
+
245
+ <div class="method_details first">
246
+ <h3 class="signature first" id="initialize-instance_method">
247
+
248
+ #<strong>initialize</strong>(action, arguments) &#x21d2; <tt><span class='object_link'><a href="" title="Simple::Service::ExtraArguments (class)">ExtraArguments</a></span></tt>
249
+
250
+
251
+
252
+
253
+
254
+ </h3><div class="docstring">
255
+ <div class="discussion">
256
+
257
+ <p>Returns a new instance of ExtraArguments</p>
258
+
259
+
260
+ </div>
261
+ </div>
262
+ <div class="tags">
263
+
264
+
265
+ </div><table class="source_code">
266
+ <tr>
267
+ <td>
268
+ <pre class="lines">
269
+
270
+
271
+ 36
272
+ 37
273
+ 38</pre>
274
+ </td>
275
+ <td>
276
+ <pre class="code"><span class="info file"># File 'lib/simple/service/errors.rb', line 36</span>
277
+
278
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_action'>action</span><span class='comma'>,</span> <span class='id identifier rubyid_arguments'>arguments</span><span class='rparen'>)</span>
279
+ <span class='ivar'>@action</span><span class='comma'>,</span> <span class='ivar'>@arguments</span> <span class='op'>=</span> <span class='id identifier rubyid_action'>action</span><span class='comma'>,</span> <span class='id identifier rubyid_arguments'>arguments</span>
280
+ <span class='kw'>end</span></pre>
281
+ </td>
282
+ </tr>
283
+ </table>
284
+ </div>
285
+
286
+ </div>
287
+
288
+ <div id="instance_attr_details" class="attr_details">
289
+ <h2>Instance Attribute Details</h2>
290
+
291
+
292
+ <span id=""></span>
293
+ <div class="method_details first">
294
+ <h3 class="signature first" id="action-instance_method">
295
+
296
+ #<strong>action</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
297
+
298
+
299
+
300
+
301
+
302
+ </h3><div class="docstring">
303
+ <div class="discussion">
304
+
305
+ <p>Returns the value of attribute action</p>
306
+
307
+
308
+ </div>
309
+ </div>
310
+ <div class="tags">
311
+
312
+
313
+ </div><table class="source_code">
314
+ <tr>
315
+ <td>
316
+ <pre class="lines">
317
+
318
+
319
+ 33
320
+ 34
321
+ 35</pre>
322
+ </td>
323
+ <td>
324
+ <pre class="code"><span class="info file"># File 'lib/simple/service/errors.rb', line 33</span>
325
+
326
+ <span class='kw'>def</span> <span class='id identifier rubyid_action'>action</span>
327
+ <span class='ivar'>@action</span>
328
+ <span class='kw'>end</span></pre>
329
+ </td>
330
+ </tr>
331
+ </table>
332
+ </div>
333
+
334
+
335
+ <span id=""></span>
336
+ <div class="method_details ">
337
+ <h3 class="signature " id="arguments-instance_method">
338
+
339
+ #<strong>arguments</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
340
+
341
+
342
+
343
+
344
+
345
+ </h3><div class="docstring">
346
+ <div class="discussion">
347
+
348
+ <p>Returns the value of attribute arguments</p>
349
+
350
+
351
+ </div>
352
+ </div>
353
+ <div class="tags">
354
+
355
+
356
+ </div><table class="source_code">
357
+ <tr>
358
+ <td>
359
+ <pre class="lines">
360
+
361
+
362
+ 34
363
+ 35
364
+ 36</pre>
365
+ </td>
366
+ <td>
367
+ <pre class="code"><span class="info file"># File 'lib/simple/service/errors.rb', line 34</span>
368
+
369
+ <span class='kw'>def</span> <span class='id identifier rubyid_arguments'>arguments</span>
370
+ <span class='ivar'>@arguments</span>
371
+ <span class='kw'>end</span></pre>
372
+ </td>
373
+ </tr>
374
+ </table>
375
+ </div>
376
+
377
+ </div>
378
+
379
+
380
+ <div id="instance_method_details" class="method_details_list">
381
+ <h2>Instance Method Details</h2>
382
+
383
+
384
+ <div class="method_details first">
385
+ <h3 class="signature first" id="to_s-instance_method">
386
+
387
+ #<strong>to_s</strong> &#x21d2; <tt>Object</tt>
388
+
389
+
390
+
391
+
392
+
393
+ </h3><table class="source_code">
394
+ <tr>
395
+ <td>
396
+ <pre class="lines">
397
+
398
+
399
+ 40
400
+ 41
401
+ 42
402
+ 43</pre>
403
+ </td>
404
+ <td>
405
+ <pre class="code"><span class="info file"># File 'lib/simple/service/errors.rb', line 40</span>
406
+
407
+ <span class='kw'>def</span> <span class='id identifier rubyid_to_s'>to_s</span>
408
+ <span class='id identifier rubyid_str'>str</span> <span class='op'>=</span> <span class='ivar'>@arguments</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='symbol'>:inspect</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>, </span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
409
+ <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_action'>action</span><span class='embexpr_end'>}</span><span class='tstring_content'>: extra argument(s) </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_str'>str</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
410
+ <span class='kw'>end</span></pre>
411
+ </td>
412
+ </tr>
413
+ </table>
414
+ </div>
415
+
416
+ </div>
417
+
418
+ </div>
419
+
420
+ <div id="footer">
421
+ Generated on Wed Dec 4 22:57:13 2019 by
422
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
423
+ 0.9.20 (ruby-2.5.1).
424
+ </div>
425
+
426
+ </div>
427
+ </body>
428
+ </html>
@@ -0,0 +1,190 @@
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
+ Module: Simple::Service::GemHelper
8
+
9
+ &mdash; Documentation by YARD 0.9.20
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 = "Simple::Service::GemHelper";
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 (G)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../../Simple.html" title="Simple (module)">Simple</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Service.html" title="Simple::Service (module)">Service</a></span></span>
41
+ &raquo;
42
+ <span class="title">GemHelper</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>Module: Simple::Service::GemHelper
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+
70
+
71
+
72
+ <dl>
73
+ <dt>Extended by:</dt>
74
+ <dd><span class='object_link'><a href="" title="Simple::Service::GemHelper (module)">GemHelper</a></span></dd>
75
+ </dl>
76
+
77
+
78
+
79
+
80
+
81
+
82
+ <dl>
83
+ <dt>Included in:</dt>
84
+ <dd><span class='object_link'><a href="" title="Simple::Service::GemHelper (module)">GemHelper</a></span></dd>
85
+ </dl>
86
+
87
+
88
+
89
+ <dl>
90
+ <dt>Defined in:</dt>
91
+ <dd>lib/simple/service/version.rb</dd>
92
+ </dl>
93
+
94
+ </div>
95
+
96
+
97
+
98
+
99
+
100
+
101
+
102
+
103
+
104
+ <h2>
105
+ Instance Method Summary
106
+ <small><a href="#" class="summary_toggle">collapse</a></small>
107
+ </h2>
108
+
109
+ <ul class="summary">
110
+
111
+ <li class="public ">
112
+ <span class="summary_signature">
113
+
114
+ <a href="#version-instance_method" title="#version (instance method)">#<strong>version</strong>(name) &#x21d2; Object </a>
115
+
116
+
117
+
118
+ </span>
119
+
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+ <span class="summary_desc"><div class='inline'></div></span>
129
+
130
+ </li>
131
+
132
+
133
+ </ul>
134
+
135
+
136
+
137
+
138
+ <div id="instance_method_details" class="method_details_list">
139
+ <h2>Instance Method Details</h2>
140
+
141
+
142
+ <div class="method_details first">
143
+ <h3 class="signature first" id="version-instance_method">
144
+
145
+ #<strong>version</strong>(name) &#x21d2; <tt>Object</tt>
146
+
147
+
148
+
149
+
150
+
151
+ </h3><table class="source_code">
152
+ <tr>
153
+ <td>
154
+ <pre class="lines">
155
+
156
+
157
+ 8
158
+ 9
159
+ 10
160
+ 11
161
+ 12
162
+ 13</pre>
163
+ </td>
164
+ <td>
165
+ <pre class="code"><span class="info file"># File 'lib/simple/service/version.rb', line 8</span>
166
+
167
+ <span class='kw'>def</span> <span class='id identifier rubyid_version'>version</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
168
+ <span class='id identifier rubyid_spec'>spec</span> <span class='op'>=</span> <span class='const'>Gem</span><span class='period'>.</span><span class='id identifier rubyid_loaded_specs'>loaded_specs</span><span class='lbracket'>[</span><span class='id identifier rubyid_name'>name</span><span class='rbracket'>]</span>
169
+ <span class='id identifier rubyid_version'>version</span> <span class='op'>=</span> <span class='id identifier rubyid_spec'>spec</span> <span class='op'>?</span> <span class='id identifier rubyid_spec'>spec</span><span class='period'>.</span><span class='id identifier rubyid_version'>version</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>0.0.0</span><span class='tstring_end'>&quot;</span></span>
170
+ <span class='id identifier rubyid_version'>version</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>+unreleased</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_spec'>spec</span> <span class='op'>||</span> <span class='id identifier rubyid_unreleased?'>unreleased?</span><span class='lparen'>(</span><span class='id identifier rubyid_spec'>spec</span><span class='rparen'>)</span>
171
+ <span class='id identifier rubyid_version'>version</span>
172
+ <span class='kw'>end</span></pre>
173
+ </td>
174
+ </tr>
175
+ </table>
176
+ </div>
177
+
178
+ </div>
179
+
180
+ </div>
181
+
182
+ <div id="footer">
183
+ Generated on Wed Dec 4 22:57:13 2019 by
184
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
185
+ 0.9.20 (ruby-2.5.1).
186
+ </div>
187
+
188
+ </div>
189
+ </body>
190
+ </html>