ballast 1.5.3 → 1.6.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/CHANGELOG.md +9 -3
- data/Gemfile +1 -1
- data/ballast.gemspec +2 -3
- data/doc/Ballast.html +1 -1
- data/doc/Ballast/Concerns.html +1 -1
- data/doc/Ballast/Concerns/Ajax.html +103 -20
- data/doc/Ballast/Concerns/Common.html +173 -42
- data/doc/Ballast/Concerns/ErrorsHandling.html +1 -1
- data/doc/Ballast/Concerns/View.html +1 -1
- data/doc/Ballast/Configuration.html +2 -2
- data/doc/Ballast/Context.html +1 -1
- data/doc/Ballast/Errors.html +1 -1
- data/doc/Ballast/Errors/BaseError.html +1 -1
- data/doc/Ballast/Errors/InvalidDomain.html +1 -1
- data/doc/Ballast/Errors/PerformError.html +1 -1
- data/doc/Ballast/Errors/ValidationError.html +1 -1
- data/doc/Ballast/Middlewares.html +1 -1
- data/doc/Ballast/Middlewares/DefaultHost.html +1 -1
- data/doc/Ballast/Operation.html +1 -1
- data/doc/Ballast/OperationsChain.html +18 -6
- data/doc/Ballast/RequestDomainMatcher.html +1 -1
- data/doc/Ballast/Version.html +3 -3
- data/doc/_index.html +1 -1
- data/doc/file.README.html +1 -1
- data/doc/index.html +1 -1
- data/doc/method_list.html +22 -16
- data/doc/top-level-namespace.html +1 -1
- data/lib/ballast/concerns/ajax.rb +13 -5
- data/lib/ballast/concerns/common.rb +11 -1
- data/lib/ballast/configuration.rb +1 -14
- data/lib/ballast/operations_chain.rb +8 -1
- data/lib/ballast/version.rb +2 -2
- data/spec/ballast/concerns/ajax_spec.rb +12 -0
- data/spec/ballast/concerns/common_spec.rb +12 -0
- data/spec/ballast/operations_chain_spec.rb +43 -15
- metadata +6 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 463cb004e99736cfb55f1584675a52703512152c
|
4
|
+
data.tar.gz: 20a3acc71cb71779579b0dd078888cda80829f76
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a5a813ea90cc5ed5b344eeeb75c0cc2574c95295e48969522c737908dee2866bb66db94d2d37109b54d6f6cbda4e560406834a23a29d9f83eab55cf887faf91
|
7
|
+
data.tar.gz: c119cbe42811bb8042975c3088a36816f6e76918669f57247796bb174ddd77a1923960b7f1f11b446916290fe62f02cb797c5019eb60179b010b3fc7d16d53a8
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
### 1.6.0 / 2014-01-25
|
2
|
+
|
3
|
+
* `Ballast::Concerns::Ajax#allow_cors`'s parameters are now customizable.
|
4
|
+
* Added `Ballast::Concerns::Common::perform_operations_chain`.
|
5
|
+
* Fixed `Ballast::OperationsChain` behavior.
|
6
|
+
|
1
7
|
### 1.5.3 / 2014-01-04
|
2
8
|
|
3
9
|
* Do not join backtrace in errors.
|
@@ -12,11 +18,11 @@
|
|
12
18
|
|
13
19
|
### 1.5.0 / 2014-01-04
|
14
20
|
|
15
|
-
* Added is_json? to Concerns::Common
|
21
|
+
* Added is_json? to `Ballast::Concerns::Common`.
|
16
22
|
|
17
23
|
### 1.4.0 / 2014-01-04
|
18
24
|
|
19
|
-
* Added format parameter to ErrorsHandling#handle_error
|
25
|
+
* Added format parameter to `Ballast::ErrorsHandling#handle_error`.
|
20
26
|
|
21
27
|
### 1.3.0 / 2013-12-30
|
22
28
|
|
@@ -28,7 +34,7 @@
|
|
28
34
|
|
29
35
|
### 1.1.2 / 2013-12-25
|
30
36
|
|
31
|
-
* Made Concerns::Common#format_short_amount second parameter optional.
|
37
|
+
* Made `Ballast::Concerns::Common#format_short_amount`'s second parameter optional.
|
32
38
|
|
33
39
|
### 1.1.1 / 2013-12-25
|
34
40
|
|
data/Gemfile
CHANGED
data/ballast.gemspec
CHANGED
@@ -24,11 +24,10 @@ Gem::Specification.new do |gem|
|
|
24
24
|
|
25
25
|
gem.required_ruby_version = ">= 2.0"
|
26
26
|
|
27
|
-
gem.add_dependency("actionpack", "
|
27
|
+
gem.add_dependency("actionpack", ">= 4.0.0")
|
28
28
|
gem.add_dependency("rack", "~> 1.5.2")
|
29
29
|
gem.add_dependency("oj", "~> 2.5.3")
|
30
|
-
gem.add_dependency("
|
31
|
-
gem.add_dependency("brauser", "~> 3.2.4")
|
30
|
+
gem.add_dependency("brauser", "~> 3.2.5")
|
32
31
|
gem.add_dependency("interactor", "~> 2.1.0")
|
33
32
|
gem.add_dependency("addressable", "~> 2.3.5")
|
34
33
|
gem.add_dependency("rack-fiber_pool", ">= 0.9.3")
|
data/doc/Ballast.html
CHANGED
@@ -121,7 +121,7 @@ Licensed under the MIT license, which can be found at http://www.opensource.org/
|
|
121
121
|
</div>
|
122
122
|
|
123
123
|
<div id="footer">
|
124
|
-
Generated on Sat Jan
|
124
|
+
Generated on Sat Jan 25 11:54:04 2014 by
|
125
125
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
126
126
|
0.8.7.3 (ruby-2.1.0).
|
127
127
|
</div>
|
data/doc/Ballast/Concerns.html
CHANGED
@@ -118,7 +118,7 @@
|
|
118
118
|
</div>
|
119
119
|
|
120
120
|
<div id="footer">
|
121
|
-
Generated on Sat Jan
|
121
|
+
Generated on Sat Jan 25 11:54:04 2014 by
|
122
122
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
123
123
|
0.8.7.3 (ruby-2.1.0).
|
124
124
|
</div>
|
@@ -116,7 +116,7 @@
|
|
116
116
|
<li class="public ">
|
117
117
|
<span class="summary_signature">
|
118
118
|
|
119
|
-
<a href="#allow_cors-instance_method" title="#allow_cors (instance method)">- (Object) <strong>allow_cors</strong> </a>
|
119
|
+
<a href="#allow_cors-instance_method" title="#allow_cors (instance method)">- (Object) <strong>allow_cors</strong>(allow_origin: "*", allow_methods: [:post, :get, :options], allow_headers: "*", max_age: 1.year, allow_credentials: false) </a>
|
120
120
|
|
121
121
|
|
122
122
|
|
@@ -287,7 +287,7 @@
|
|
287
287
|
<div class="method_details first">
|
288
288
|
<h3 class="signature first" id="allow_cors-instance_method">
|
289
289
|
|
290
|
-
- (<tt>Object</tt>) <strong>allow_cors</strong>
|
290
|
+
- (<tt>Object</tt>) <strong>allow_cors</strong>(allow_origin: "*", allow_methods: [:post, :get, :options], allow_headers: "*", max_age: 1.year, allow_credentials: false)
|
291
291
|
|
292
292
|
|
293
293
|
|
@@ -301,7 +301,86 @@
|
|
301
301
|
</div>
|
302
302
|
</div>
|
303
303
|
<div class="tags">
|
304
|
+
<p class="tag_title">Parameters:</p>
|
305
|
+
<ul class="param">
|
306
|
+
|
307
|
+
<li>
|
308
|
+
|
309
|
+
<span class='name'>allow_origin</span>
|
310
|
+
|
311
|
+
|
312
|
+
<span class='type'>(<tt>String</tt>)</span>
|
313
|
+
|
314
|
+
|
315
|
+
|
316
|
+
—
|
317
|
+
<div class='inline'><p>The value for the <code>Access-Control-Allow-Origin</code> header.</p>
|
318
|
+
</div>
|
319
|
+
|
320
|
+
</li>
|
321
|
+
|
322
|
+
<li>
|
323
|
+
|
324
|
+
<span class='name'>allow_methods</span>
|
325
|
+
|
326
|
+
|
327
|
+
<span class='type'>(<tt>Array</tt>)</span>
|
328
|
+
|
329
|
+
|
330
|
+
|
331
|
+
—
|
332
|
+
<div class='inline'><p>A list of methods for the <code>Access-Control-Allow-Methods</code> header.</p>
|
333
|
+
</div>
|
334
|
+
|
335
|
+
</li>
|
336
|
+
|
337
|
+
<li>
|
338
|
+
|
339
|
+
<span class='name'>allow_headers</span>
|
340
|
+
|
341
|
+
|
342
|
+
<span class='type'>(<tt>String</tt>)</span>
|
343
|
+
|
344
|
+
|
345
|
+
|
346
|
+
—
|
347
|
+
<div class='inline'><p>The value for the <code>Access-Control-Allow-Headers</code> header.</p>
|
348
|
+
</div>
|
349
|
+
|
350
|
+
</li>
|
351
|
+
|
352
|
+
<li>
|
353
|
+
|
354
|
+
<span class='name'>max_age</span>
|
355
|
+
|
356
|
+
|
357
|
+
<span class='type'>(<tt>Float|Fixnum</tt>)</span>
|
358
|
+
|
359
|
+
|
360
|
+
|
361
|
+
—
|
362
|
+
<div class='inline'><p>The value for the <code>Access-Control-Max-Age</code> header.</p>
|
363
|
+
</div>
|
364
|
+
|
365
|
+
</li>
|
304
366
|
|
367
|
+
<li>
|
368
|
+
|
369
|
+
<span class='name'>allow_credentials</span>
|
370
|
+
|
371
|
+
|
372
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
373
|
+
|
374
|
+
|
375
|
+
|
376
|
+
—
|
377
|
+
<div class='inline'><p>The value for the <code>Access-Control-Allow-Credentials</code> header.</p>
|
378
|
+
</div>
|
379
|
+
|
380
|
+
</li>
|
381
|
+
|
382
|
+
</ul>
|
383
|
+
|
305
384
|
|
306
385
|
</div><table class="source_code">
|
307
386
|
<tr>
|
@@ -309,25 +388,29 @@
|
|
309
388
|
<pre class="lines">
|
310
389
|
|
311
390
|
|
312
|
-
76
|
313
|
-
77
|
314
|
-
78
|
315
|
-
79
|
316
|
-
80
|
317
|
-
81
|
318
391
|
82
|
319
|
-
83
|
392
|
+
83
|
393
|
+
84
|
394
|
+
85
|
395
|
+
86
|
396
|
+
87
|
397
|
+
88
|
398
|
+
89
|
399
|
+
90
|
400
|
+
91</pre>
|
320
401
|
</td>
|
321
402
|
<td>
|
322
|
-
<pre class="code"><span class="info file"># File 'lib/ballast/concerns/ajax.rb', line
|
403
|
+
<pre class="code"><span class="info file"># File 'lib/ballast/concerns/ajax.rb', line 82</span>
|
323
404
|
|
324
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_allow_cors'>allow_cors</span>
|
405
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_allow_cors'>allow_cors</span><span class='lparen'>(</span><span class='label'>allow_origin:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>*</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='label'>allow_methods:</span> <span class='lbracket'>[</span><span class='symbol'>:post</span><span class='comma'>,</span> <span class='symbol'>:get</span><span class='comma'>,</span> <span class='symbol'>:options</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='label'>allow_headers:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>*</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='label'>max_age:</span> <span class='int'>1</span><span class='period'>.</span><span class='id identifier rubyid_year'>year</span><span class='comma'>,</span> <span class='label'>allow_credentials:</span> <span class='kw'>false</span><span class='rparen'>)</span>
|
325
406
|
<span class='id identifier rubyid_headers'>headers</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='lbrace'>{</span>
|
326
|
-
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Access-Control-Allow-Origin</span><span class='tstring_end'>"</span></span> <span class='op'>=></span> <span class='
|
327
|
-
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Access-Control-Allow-Methods</span><span class='tstring_end'>"</span></span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'
|
328
|
-
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Access-Control-Allow-Headers</span><span class='tstring_end'>"</span></span> <span class='op'>=></span> <span class='
|
329
|
-
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Access-Control-Max-Age</span><span class='tstring_end'>"</span></span> <span class='op'>=></span> <span class='
|
407
|
+
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Access-Control-Allow-Origin</span><span class='tstring_end'>"</span></span> <span class='op'>=></span> <span class='id identifier rubyid_allow_origin'>allow_origin</span><span class='comma'>,</span>
|
408
|
+
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Access-Control-Allow-Methods</span><span class='tstring_end'>"</span></span> <span class='op'>=></span> <span class='id identifier rubyid_allow_methods'>allow_methods</span><span class='period'>.</span><span class='id identifier rubyid_collect'>collect</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_m'>m</span><span class='op'>|</span> <span class='id identifier rubyid_m'>m</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_upcase'>upcase</span> <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>, </span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='comma'>,</span>
|
409
|
+
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Access-Control-Allow-Headers</span><span class='tstring_end'>"</span></span> <span class='op'>=></span> <span class='id identifier rubyid_allow_headers'>allow_headers</span><span class='comma'>,</span>
|
410
|
+
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Access-Control-Max-Age</span><span class='tstring_end'>"</span></span> <span class='op'>=></span> <span class='id identifier rubyid_max_age'>max_age</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
|
330
411
|
<span class='rbrace'>}</span><span class='rparen'>)</span>
|
412
|
+
|
413
|
+
<span class='id identifier rubyid_headers'>headers</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Access-Control-Allow-Credentials</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>true</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_allow_credentials'>allow_credentials</span>
|
331
414
|
<span class='kw'>end</span></pre>
|
332
415
|
</td>
|
333
416
|
</tr>
|
@@ -359,12 +442,12 @@
|
|
359
442
|
<pre class="lines">
|
360
443
|
|
361
444
|
|
362
|
-
|
363
|
-
|
364
|
-
|
445
|
+
94
|
446
|
+
95
|
447
|
+
96</pre>
|
365
448
|
</td>
|
366
449
|
<td>
|
367
|
-
<pre class="code"><span class="info file"># File 'lib/ballast/concerns/ajax.rb', line
|
450
|
+
<pre class="code"><span class="info file"># File 'lib/ballast/concerns/ajax.rb', line 94</span>
|
368
451
|
|
369
452
|
<span class='kw'>def</span> <span class='id identifier rubyid_disallow_robots'>disallow_robots</span>
|
370
453
|
<span class='id identifier rubyid_render'>render</span><span class='lparen'>(</span><span class='label'>text:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>User-agent: *\nDisallow: /</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='label'>content_type:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>text/plain</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
@@ -812,7 +895,7 @@
|
|
812
895
|
</div>
|
813
896
|
|
814
897
|
<div id="footer">
|
815
|
-
Generated on Sat Jan
|
898
|
+
Generated on Sat Jan 25 11:54:04 2014 by
|
816
899
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
817
900
|
0.8.7.3 (ruby-2.1.0).
|
818
901
|
</div>
|
@@ -244,6 +244,29 @@
|
|
244
244
|
<span class="summary_desc"><div class='inline'><p>Performs an operation, using itself as owner by default.</p>
|
245
245
|
</div></span>
|
246
246
|
|
247
|
+
</li>
|
248
|
+
|
249
|
+
|
250
|
+
<li class="public ">
|
251
|
+
<span class="summary_signature">
|
252
|
+
|
253
|
+
<a href="#perform_operations_chain-instance_method" title="#perform_operations_chain (instance method)">- (OperationChain) <strong>perform_operations_chain</strong>(klasses, owner = nil, **kwargs) </a>
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
</span>
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
|
264
|
+
|
265
|
+
|
266
|
+
|
267
|
+
<span class="summary_desc"><div class='inline'><p>Performs an operations chain, using itself as owner by default.</p>
|
268
|
+
</div></span>
|
269
|
+
|
247
270
|
</li>
|
248
271
|
|
249
272
|
|
@@ -374,20 +397,20 @@
|
|
374
397
|
<pre class="lines">
|
375
398
|
|
376
399
|
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
400
|
+
98
|
401
|
+
99
|
402
|
+
100
|
403
|
+
101
|
404
|
+
102
|
405
|
+
103
|
406
|
+
104
|
407
|
+
105
|
408
|
+
106
|
409
|
+
107
|
410
|
+
108</pre>
|
388
411
|
</td>
|
389
412
|
<td>
|
390
|
-
<pre class="code"><span class="info file"># File 'lib/ballast/concerns/common.rb', line
|
413
|
+
<pre class="code"><span class="info file"># File 'lib/ballast/concerns/common.rb', line 98</span>
|
391
414
|
|
392
415
|
<span class='kw'>def</span> <span class='id identifier rubyid_authenticate_user'>authenticate_user</span><span class='lparen'>(</span><span class='id identifier rubyid_area'>area</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_title'>title</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_message'>message</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_authenticator'>authenticator</span><span class='rparen'>)</span>
|
393
416
|
<span class='id identifier rubyid_area'>area</span> <span class='op'>||=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Private Area</span><span class='tstring_end'>"</span></span>
|
@@ -484,14 +507,14 @@ and <code>%:Z</code> for the zone name considering also DST.</p>
|
|
484
507
|
<pre class="lines">
|
485
508
|
|
486
509
|
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
510
|
+
86
|
511
|
+
87
|
512
|
+
88
|
513
|
+
89
|
514
|
+
90</pre>
|
492
515
|
</td>
|
493
516
|
<td>
|
494
|
-
<pre class="code"><span class="info file"># File 'lib/ballast/concerns/common.rb', line
|
517
|
+
<pre class="code"><span class="info file"># File 'lib/ballast/concerns/common.rb', line 86</span>
|
495
518
|
|
496
519
|
<span class='kw'>def</span> <span class='id identifier rubyid_format_long_date'>format_long_date</span><span class='lparen'>(</span><span class='id identifier rubyid_date'>date</span><span class='comma'>,</span> <span class='id identifier rubyid_separator'>separator</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>•</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_format'>format</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>%I:%M%p %- %b %o, %Y (%:Z)</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
497
520
|
<span class='id identifier rubyid_tz'>tz</span> <span class='op'>=</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_zone'>zone</span>
|
@@ -581,18 +604,18 @@ and <code>%:Z</code> for the zone name considering also DST.</p>
|
|
581
604
|
<pre class="lines">
|
582
605
|
|
583
606
|
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
607
|
+
70
|
608
|
+
71
|
609
|
+
72
|
610
|
+
73
|
611
|
+
74
|
612
|
+
75
|
613
|
+
76
|
614
|
+
77
|
615
|
+
78</pre>
|
593
616
|
</td>
|
594
617
|
<td>
|
595
|
-
<pre class="code"><span class="info file"># File 'lib/ballast/concerns/common.rb', line
|
618
|
+
<pre class="code"><span class="info file"># File 'lib/ballast/concerns/common.rb', line 70</span>
|
596
619
|
|
597
620
|
<span class='kw'>def</span> <span class='id identifier rubyid_format_short_amount'>format_short_amount</span><span class='lparen'>(</span><span class='id identifier rubyid_amount'>amount</span><span class='comma'>,</span> <span class='id identifier rubyid_suffix'>suffix</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
598
621
|
<span class='kw'>if</span> <span class='id identifier rubyid_amount'>amount</span> <span class='op'><</span> <span class='int'>1</span><span class='period'>.</span><span class='id identifier rubyid_minute'>minute</span> <span class='kw'>then</span>
|
@@ -703,23 +726,23 @@ and <code>%:Z</code> for the zone name considering also DST.</p>
|
|
703
726
|
<pre class="lines">
|
704
727
|
|
705
728
|
|
706
|
-
40
|
707
|
-
41
|
708
|
-
42
|
709
|
-
43
|
710
|
-
44
|
711
|
-
45
|
712
|
-
46
|
713
|
-
47
|
714
|
-
48
|
715
|
-
49
|
716
729
|
50
|
717
730
|
51
|
718
731
|
52
|
719
|
-
53
|
732
|
+
53
|
733
|
+
54
|
734
|
+
55
|
735
|
+
56
|
736
|
+
57
|
737
|
+
58
|
738
|
+
59
|
739
|
+
60
|
740
|
+
61
|
741
|
+
62
|
742
|
+
63</pre>
|
720
743
|
</td>
|
721
744
|
<td>
|
722
|
-
<pre class="code"><span class="info file"># File 'lib/ballast/concerns/common.rb', line
|
745
|
+
<pre class="code"><span class="info file"># File 'lib/ballast/concerns/common.rb', line 50</span>
|
723
746
|
|
724
747
|
<span class='kw'>def</span> <span class='id identifier rubyid_format_short_duration'>format_short_duration</span><span class='lparen'>(</span><span class='id identifier rubyid_date'>date</span><span class='comma'>,</span> <span class='id identifier rubyid_reference'>reference</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_suffix'>suffix</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
725
748
|
<span class='id identifier rubyid_reference'>reference</span> <span class='op'>||=</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span>
|
@@ -877,7 +900,7 @@ and <code>%:Z</code> for the zone name considering also DST.</p>
|
|
877
900
|
|
878
901
|
|
879
902
|
—
|
880
|
-
<div class='inline'><p>The performed operation
|
903
|
+
<div class='inline'><p>The performed operation.</p>
|
881
904
|
</div>
|
882
905
|
|
883
906
|
</li>
|
@@ -903,6 +926,114 @@ and <code>%:Z</code> for the zone name considering also DST.</p>
|
|
903
926
|
</td>
|
904
927
|
</tr>
|
905
928
|
</table>
|
929
|
+
</div>
|
930
|
+
|
931
|
+
<div class="method_details ">
|
932
|
+
<h3 class="signature " id="perform_operations_chain-instance_method">
|
933
|
+
|
934
|
+
- (<tt>OperationChain</tt>) <strong>perform_operations_chain</strong>(klasses, owner = nil, **kwargs)
|
935
|
+
|
936
|
+
|
937
|
+
|
938
|
+
|
939
|
+
|
940
|
+
</h3><div class="docstring">
|
941
|
+
<div class="discussion">
|
942
|
+
<p>Performs an operations chain, using itself as owner by default.</p>
|
943
|
+
|
944
|
+
|
945
|
+
</div>
|
946
|
+
</div>
|
947
|
+
<div class="tags">
|
948
|
+
<p class="tag_title">Parameters:</p>
|
949
|
+
<ul class="param">
|
950
|
+
|
951
|
+
<li>
|
952
|
+
|
953
|
+
<span class='name'>klasses</span>
|
954
|
+
|
955
|
+
|
956
|
+
<span class='type'>(<tt>Array</tt>)</span>
|
957
|
+
|
958
|
+
|
959
|
+
|
960
|
+
—
|
961
|
+
<div class='inline'><p>The operations to perform.</p>
|
962
|
+
</div>
|
963
|
+
|
964
|
+
</li>
|
965
|
+
|
966
|
+
<li>
|
967
|
+
|
968
|
+
<span class='name'>owner</span>
|
969
|
+
|
970
|
+
|
971
|
+
<span class='type'>(<tt>Object</tt>)</span>
|
972
|
+
|
973
|
+
|
974
|
+
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
975
|
+
|
976
|
+
|
977
|
+
—
|
978
|
+
<div class='inline'><p>The owner to use. By default it uses itself.</p>
|
979
|
+
</div>
|
980
|
+
|
981
|
+
</li>
|
982
|
+
|
983
|
+
<li>
|
984
|
+
|
985
|
+
<span class='name'>kwargs</span>
|
986
|
+
|
987
|
+
|
988
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
989
|
+
|
990
|
+
|
991
|
+
|
992
|
+
—
|
993
|
+
<div class='inline'><p>The arguments for performing.</p>
|
994
|
+
</div>
|
995
|
+
|
996
|
+
</li>
|
997
|
+
|
998
|
+
</ul>
|
999
|
+
|
1000
|
+
<p class="tag_title">Returns:</p>
|
1001
|
+
<ul class="return">
|
1002
|
+
|
1003
|
+
<li>
|
1004
|
+
|
1005
|
+
|
1006
|
+
<span class='type'>(<tt>OperationChain</tt>)</span>
|
1007
|
+
|
1008
|
+
|
1009
|
+
|
1010
|
+
—
|
1011
|
+
<div class='inline'><p>The performed operation chain.</p>
|
1012
|
+
</div>
|
1013
|
+
|
1014
|
+
</li>
|
1015
|
+
|
1016
|
+
</ul>
|
1017
|
+
|
1018
|
+
</div><table class="source_code">
|
1019
|
+
<tr>
|
1020
|
+
<td>
|
1021
|
+
<pre class="lines">
|
1022
|
+
|
1023
|
+
|
1024
|
+
40
|
1025
|
+
41
|
1026
|
+
42</pre>
|
1027
|
+
</td>
|
1028
|
+
<td>
|
1029
|
+
<pre class="code"><span class="info file"># File 'lib/ballast/concerns/common.rb', line 40</span>
|
1030
|
+
|
1031
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_perform_operations_chain'>perform_operations_chain</span><span class='lparen'>(</span><span class='id identifier rubyid_klasses'>klasses</span><span class='comma'>,</span> <span class='id identifier rubyid_owner'>owner</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_kwargs'>kwargs</span><span class='rparen'>)</span>
|
1032
|
+
<span class='ivar'>@operation</span> <span class='op'>=</span> <span class='const'>Ballast</span><span class='op'>::</span><span class='const'>OperationsChain</span><span class='period'>.</span><span class='id identifier rubyid_perform'>perform</span><span class='lparen'>(</span><span class='id identifier rubyid_owner'>owner</span> <span class='op'>||</span> <span class='kw'>self</span><span class='comma'>,</span> <span class='id identifier rubyid_klasses'>klasses</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_kwargs'>kwargs</span><span class='rparen'>)</span>
|
1033
|
+
<span class='kw'>end</span></pre>
|
1034
|
+
</td>
|
1035
|
+
</tr>
|
1036
|
+
</table>
|
906
1037
|
</div>
|
907
1038
|
|
908
1039
|
<div class="method_details ">
|
@@ -967,7 +1098,7 @@ and <code>%:Z</code> for the zone name considering also DST.</p>
|
|
967
1098
|
</div>
|
968
1099
|
|
969
1100
|
<div id="footer">
|
970
|
-
Generated on Sat Jan
|
1101
|
+
Generated on Sat Jan 25 11:54:04 2014 by
|
971
1102
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
972
1103
|
0.8.7.3 (ruby-2.1.0).
|
973
1104
|
</div>
|