ballast 1.9.3 → 2.0.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 +35 -0
- data/.travis-gemfile +4 -5
- data/.travis.yml +3 -2
- data/CHANGELOG.md +62 -6
- data/Gemfile +7 -8
- data/README.md +2 -2
- data/ballast.gemspec +9 -12
- data/doc/Ballast/AjaxResponse.html +1380 -0
- data/doc/Ballast/Concerns/AjaxHandling.html +662 -0
- data/doc/Ballast/Concerns/Common.html +81 -361
- data/doc/Ballast/Concerns/ErrorsHandling.html +18 -36
- data/doc/Ballast/Concerns/View.html +181 -157
- data/doc/Ballast/Concerns.html +6 -6
- data/doc/Ballast/Configuration.html +204 -31
- data/doc/Ballast/Emoji/Character.html +411 -0
- data/doc/Ballast/Emoji/Utils.html +794 -0
- data/doc/Ballast/Emoji.html +125 -0
- data/doc/Ballast/Errors/{BaseError.html → Base.html} +61 -34
- data/doc/Ballast/Errors/{PerformError.html → Failure.html} +21 -17
- data/doc/Ballast/Errors/InvalidDomain.html +11 -11
- data/doc/Ballast/Errors/{ValidationError.html → ValidationFailure.html} +24 -16
- data/doc/Ballast/Errors.html +5 -5
- data/doc/Ballast/Middlewares/DefaultHost.html +6 -6
- data/doc/Ballast/Middlewares.html +4 -4
- data/doc/Ballast/RequestDomainMatcher.html +28 -28
- data/doc/Ballast/Service/Response.html +1243 -0
- data/doc/Ballast/Service.html +1314 -0
- data/doc/Ballast/Version.html +7 -7
- data/doc/Ballast.html +15 -15
- data/doc/_index.html +59 -30
- data/doc/class_list.html +6 -2
- data/doc/css/style.css +1 -0
- data/doc/file.README.html +6 -6
- data/doc/file_list.html +5 -1
- data/doc/frames.html +1 -1
- data/doc/index.html +6 -6
- data/doc/js/full_list.js +4 -1
- data/doc/method_list.html +167 -79
- data/doc/top-level-namespace.html +41 -4
- data/lib/ballast/ajax_response.rb +76 -0
- data/lib/ballast/concerns/ajax_handling.rb +73 -0
- data/lib/ballast/concerns/common.rb +25 -47
- data/lib/ballast/concerns/errors_handling.rb +21 -30
- data/lib/ballast/concerns/view.rb +24 -22
- data/lib/ballast/configuration.rb +30 -10
- data/lib/ballast/emoji.rb +114 -0
- data/lib/ballast/errors.rb +16 -13
- data/lib/ballast/middlewares/default_host.rb +3 -3
- data/lib/ballast/request_domain_matcher.rb +7 -7
- data/lib/ballast/service.rb +147 -0
- data/lib/ballast/version.rb +3 -3
- data/lib/ballast.rb +22 -22
- data/spec/ballast/ajax_response_spec.rb +61 -0
- data/spec/ballast/concerns/ajax_handling_spec.rb +86 -0
- data/spec/ballast/concerns/common_spec.rb +17 -52
- data/spec/ballast/concerns/errors_handling_spec.rb +35 -29
- data/spec/ballast/concerns/view_spec.rb +21 -32
- data/spec/ballast/configuration_spec.rb +66 -16
- data/spec/ballast/emoji_spec.rb +103 -0
- data/spec/ballast/errors_spec.rb +5 -5
- data/spec/ballast/middlewares/default_host_spec.rb +3 -5
- data/spec/ballast/request_domain_matcher_spec.rb +4 -4
- data/spec/ballast/service_spec.rb +137 -0
- data/spec/spec_helper.rb +1 -13
- metadata +42 -80
- data/doc/Ballast/Concerns/Ajax.html +0 -945
- data/doc/Ballast/Context.html +0 -417
- data/doc/Ballast/Operation.html +0 -1304
- data/doc/Ballast/OperationsChain.html +0 -597
- data/lib/ballast/concerns/ajax.rb +0 -134
- data/lib/ballast/context.rb +0 -38
- data/lib/ballast/operation.rb +0 -136
- data/lib/ballast/operations_chain.rb +0 -45
- data/spec/ballast/concerns/ajax_spec.rb +0 -141
- data/spec/ballast/context_spec.rb +0 -23
- data/spec/ballast/operation_spec.rb +0 -177
- data/spec/ballast/operations_chain_spec.rb +0 -61
@@ -4,9 +4,9 @@
|
|
4
4
|
<head>
|
5
5
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
6
|
<title>
|
7
|
-
Exception: Ballast::Errors::
|
7
|
+
Exception: Ballast::Errors::ValidationFailure
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.7.
|
9
|
+
— Documentation by YARD 0.8.7.6
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -17,7 +17,7 @@
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
18
18
|
hasFrames = window.top.frames.main ? true : false;
|
19
19
|
relpath = '../../';
|
20
|
-
framesUrl = "../../frames.html#!"
|
20
|
+
framesUrl = "../../frames.html#!Ballast/Errors/ValidationFailure.html";
|
21
21
|
</script>
|
22
22
|
|
23
23
|
|
@@ -34,7 +34,7 @@
|
|
34
34
|
<a href="../../_index.html">Index (V)</a> »
|
35
35
|
<span class='title'><span class='object_link'><a href="../../Ballast.html" title="Ballast (module)">Ballast</a></span></span> » <span class='title'><span class='object_link'><a href="../Errors.html" title="Ballast::Errors (module)">Errors</a></span></span>
|
36
36
|
»
|
37
|
-
<span class="title">
|
37
|
+
<span class="title">ValidationFailure</span>
|
38
38
|
|
39
39
|
|
40
40
|
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
@@ -63,7 +63,7 @@
|
|
63
63
|
|
64
64
|
<iframe id="search_frame"></iframe>
|
65
65
|
|
66
|
-
<div id="content"><h1>Exception: Ballast::Errors::
|
66
|
+
<div id="content"><h1>Exception: Ballast::Errors::ValidationFailure
|
67
67
|
|
68
68
|
|
69
69
|
|
@@ -73,16 +73,18 @@
|
|
73
73
|
|
74
74
|
<dt class="r1">Inherits:</dt>
|
75
75
|
<dd class="r1">
|
76
|
-
<span class="inheritName"><span class='object_link'><a href="
|
76
|
+
<span class="inheritName"><span class='object_link'><a href="Failure.html" title="Ballast::Errors::Failure (class)">Failure</a></span></span>
|
77
77
|
|
78
78
|
<ul class="fullTree">
|
79
79
|
<li>Object</li>
|
80
80
|
|
81
81
|
<li class="next">RuntimeError</li>
|
82
82
|
|
83
|
-
<li class="next"><span class='object_link'><a href="
|
83
|
+
<li class="next"><span class='object_link'><a href="Base.html" title="Ballast::Errors::Base (class)">Base</a></span></li>
|
84
84
|
|
85
|
-
<li class="next"
|
85
|
+
<li class="next"><span class='object_link'><a href="Failure.html" title="Ballast::Errors::Failure (class)">Failure</a></span></li>
|
86
|
+
|
87
|
+
<li class="next">Ballast::Errors::ValidationFailure</li>
|
86
88
|
|
87
89
|
</ul>
|
88
90
|
<a href="#" class="inheritanceTree">show all</a>
|
@@ -105,7 +107,7 @@
|
|
105
107
|
|
106
108
|
<h2>Overview</h2><div class="docstring">
|
107
109
|
<div class="discussion">
|
108
|
-
<p>This is raised when some invalid parameters are passed to a operation.</p>
|
110
|
+
<p>This is raised when some invalid parameters are passed to a operation or a service.</p>
|
109
111
|
|
110
112
|
|
111
113
|
</div>
|
@@ -121,8 +123,8 @@
|
|
121
123
|
|
122
124
|
<h2>Instance Attribute Summary</h2>
|
123
125
|
|
124
|
-
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="
|
125
|
-
<p class="inherited"><span class='object_link'><a href="
|
126
|
+
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Base.html" title="Ballast::Errors::Base (class)">Base</a></span></h3>
|
127
|
+
<p class="inherited"><span class='object_link'><a href="Base.html#details-instance_method" title="Ballast::Errors::Base#details (method)">#details</a></span></p>
|
126
128
|
|
127
129
|
|
128
130
|
|
@@ -132,15 +134,21 @@
|
|
132
134
|
|
133
135
|
|
134
136
|
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
135
143
|
<h2>Method Summary</h2>
|
136
144
|
|
137
|
-
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="
|
138
|
-
<p class="inherited"><span class='object_link'><a href="
|
145
|
+
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="Base.html" title="Ballast::Errors::Base (class)">Base</a></span></h3>
|
146
|
+
<p class="inherited"><span class='object_link'><a href="Base.html#initialize-instance_method" title="Ballast::Errors::Base#initialize (method)">#initialize</a></span></p>
|
139
147
|
|
140
148
|
<div id="constructor_details" class="method_details_list">
|
141
149
|
<h2>Constructor Details</h2>
|
142
150
|
|
143
|
-
<p class="notice">This class inherits a constructor from <span class='object_link'><a href="
|
151
|
+
<p class="notice">This class inherits a constructor from <span class='object_link'><a href="Base.html#initialize-instance_method" title="Ballast::Errors::Base#initialize (method)">Ballast::Errors::Base</a></span></p>
|
144
152
|
|
145
153
|
</div>
|
146
154
|
|
@@ -148,9 +156,9 @@
|
|
148
156
|
</div>
|
149
157
|
|
150
158
|
<div id="footer">
|
151
|
-
Generated on
|
159
|
+
Generated on Sun Nov 2 09:40:00 2014 by
|
152
160
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
153
|
-
0.8.7.
|
161
|
+
0.8.7.6 (ruby-2.1.3).
|
154
162
|
</div>
|
155
163
|
|
156
164
|
</body>
|
data/doc/Ballast/Errors.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Module: Ballast::Errors
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.7.
|
9
|
+
— Documentation by YARD 0.8.7.6
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -17,7 +17,7 @@
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
18
18
|
hasFrames = window.top.frames.main ? true : false;
|
19
19
|
relpath = '../';
|
20
|
-
framesUrl = "../frames.html#!"
|
20
|
+
framesUrl = "../frames.html#!Ballast/Errors.html";
|
21
21
|
</script>
|
22
22
|
|
23
23
|
|
@@ -100,7 +100,7 @@
|
|
100
100
|
|
101
101
|
|
102
102
|
|
103
|
-
<strong class="classes">Classes:</strong> <span class='object_link'><a href="Errors/
|
103
|
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="Errors/Base.html" title="Ballast::Errors::Base (class)">Base</a></span>, <span class='object_link'><a href="Errors/Failure.html" title="Ballast::Errors::Failure (class)">Failure</a></span>, <span class='object_link'><a href="Errors/InvalidDomain.html" title="Ballast::Errors::InvalidDomain (class)">InvalidDomain</a></span>, <span class='object_link'><a href="Errors/ValidationFailure.html" title="Ballast::Errors::ValidationFailure (class)">ValidationFailure</a></span>
|
104
104
|
|
105
105
|
|
106
106
|
</p>
|
@@ -116,9 +116,9 @@
|
|
116
116
|
</div>
|
117
117
|
|
118
118
|
<div id="footer">
|
119
|
-
Generated on
|
119
|
+
Generated on Sun Nov 2 09:40:00 2014 by
|
120
120
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
121
|
-
0.8.7.
|
121
|
+
0.8.7.6 (ruby-2.1.3).
|
122
122
|
</div>
|
123
123
|
|
124
124
|
</body>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: Ballast::Middlewares::DefaultHost
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.7.
|
9
|
+
— Documentation by YARD 0.8.7.6
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -17,7 +17,7 @@
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
18
18
|
hasFrames = window.top.frames.main ? true : false;
|
19
19
|
relpath = '../../';
|
20
|
-
framesUrl = "../../frames.html#!"
|
20
|
+
framesUrl = "../../frames.html#!Ballast/Middlewares/DefaultHost.html";
|
21
21
|
</script>
|
22
22
|
|
23
23
|
|
@@ -324,9 +324,9 @@
|
|
324
324
|
|
325
325
|
<span class='kw'>def</span> <span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='id identifier rubyid_env'>env</span><span class='rparen'>)</span>
|
326
326
|
<span class='id identifier rubyid_old_host'>old_host</span> <span class='op'>=</span> <span class='id identifier rubyid_env'>env</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>SERVER_NAME</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_ensure_string'>ensure_string</span>
|
327
|
-
<span class='id identifier rubyid_new_host'>new_host</span> <span class='op'>=</span> <span class='ivar'>@hosts</span><span class='lbracket'>[</span><span class='const'>ENV</span><span class='
|
327
|
+
<span class='id identifier rubyid_new_host'>new_host</span> <span class='op'>=</span> <span class='ivar'>@hosts</span><span class='lbracket'>[</span><span class='const'>ENV</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>RACK_ENV</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>production</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='rbracket'>]</span>
|
328
328
|
|
329
|
-
<span class='kw'>if</span> <span class='id identifier rubyid_old_host'>old_host</span> <span class='op'>=~</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^\d</span><span class='regexp_end'>/</span></span> <span class='op'>&&</span> <span class='id identifier rubyid_new_host'>new_host</span>
|
329
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_old_host'>old_host</span> <span class='op'>=~</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^\d</span><span class='regexp_end'>/</span></span> <span class='op'>&&</span> <span class='id identifier rubyid_new_host'>new_host</span>
|
330
330
|
<span class='id identifier rubyid_env'>env</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>ORIG_SERVER_NAME</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_old_host'>old_host</span>
|
331
331
|
<span class='id identifier rubyid_env'>env</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>ORIG_HTTP_HOST</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_env'>env</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>HTTP_HOST</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span>
|
332
332
|
<span class='id identifier rubyid_env'>env</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>SERVER_NAME</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_new_host'>new_host</span>
|
@@ -345,9 +345,9 @@
|
|
345
345
|
</div>
|
346
346
|
|
347
347
|
<div id="footer">
|
348
|
-
Generated on
|
348
|
+
Generated on Sun Nov 2 09:40:01 2014 by
|
349
349
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
350
|
-
0.8.7.
|
350
|
+
0.8.7.6 (ruby-2.1.3).
|
351
351
|
</div>
|
352
352
|
|
353
353
|
</body>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Module: Ballast::Middlewares
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.7.
|
9
|
+
— Documentation by YARD 0.8.7.6
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -17,7 +17,7 @@
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
18
18
|
hasFrames = window.top.frames.main ? true : false;
|
19
19
|
relpath = '../';
|
20
|
-
framesUrl = "../frames.html#!"
|
20
|
+
framesUrl = "../frames.html#!Ballast/Middlewares.html";
|
21
21
|
</script>
|
22
22
|
|
23
23
|
|
@@ -116,9 +116,9 @@
|
|
116
116
|
</div>
|
117
117
|
|
118
118
|
<div id="footer">
|
119
|
-
Generated on
|
119
|
+
Generated on Sun Nov 2 09:40:00 2014 by
|
120
120
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
121
|
-
0.8.7.
|
121
|
+
0.8.7.6 (ruby-2.1.3).
|
122
122
|
</div>
|
123
123
|
|
124
124
|
</body>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: Ballast::RequestDomainMatcher
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.7.
|
9
|
+
— Documentation by YARD 0.8.7.6
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -17,7 +17,7 @@
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
18
18
|
hasFrames = window.top.frames.main ? true : false;
|
19
19
|
relpath = '../';
|
20
|
-
framesUrl = "../frames.html#!"
|
20
|
+
framesUrl = "../frames.html#!Ballast/RequestDomainMatcher.html";
|
21
21
|
</script>
|
22
22
|
|
23
23
|
|
@@ -162,7 +162,7 @@
|
|
162
162
|
|
163
163
|
|
164
164
|
|
165
|
-
<span class="summary_desc"><div class='inline'><p>A block to use
|
165
|
+
<span class="summary_desc"><div class='inline'><p>A block to use to manipulate the request host before trying the match.</p>
|
166
166
|
</div></span>
|
167
167
|
|
168
168
|
</li>
|
@@ -188,7 +188,7 @@
|
|
188
188
|
|
189
189
|
|
190
190
|
|
191
|
-
<span class="summary_desc"><div class='inline'><p>A optional pattern to
|
191
|
+
<span class="summary_desc"><div class='inline'><p>A optional pattern to manipulate the request host before trying the match.</p>
|
192
192
|
</div></span>
|
193
193
|
|
194
194
|
</li>
|
@@ -214,7 +214,7 @@
|
|
214
214
|
|
215
215
|
|
216
216
|
|
217
|
-
<span class="summary_desc"><div class='inline'><p>A string to
|
217
|
+
<span class="summary_desc"><div class='inline'><p>A string to manipulate the request host before trying the match.</p>
|
218
218
|
</div></span>
|
219
219
|
|
220
220
|
</li>
|
@@ -334,7 +334,7 @@
|
|
334
334
|
|
335
335
|
|
336
336
|
—
|
337
|
-
<div class='inline'><p>A optional pattern to
|
337
|
+
<div class='inline'><p>A optional pattern to manipulate the request host before trying the match. See <code>String#gsub</code>.</p>
|
338
338
|
</div>
|
339
339
|
|
340
340
|
</li>
|
@@ -351,7 +351,7 @@
|
|
351
351
|
|
352
352
|
|
353
353
|
—
|
354
|
-
<div class='inline'><p>A string to
|
354
|
+
<div class='inline'><p>A string to manipulate the request host before trying the match. See <code>String#gsub</code>.</p>
|
355
355
|
</div>
|
356
356
|
|
357
357
|
</li>
|
@@ -366,7 +366,7 @@
|
|
366
366
|
|
367
367
|
|
368
368
|
—
|
369
|
-
<div class='inline'><p>A block to use
|
369
|
+
<div class='inline'><p>A block to use to manipulate the request host before trying the match. See <code>String#gsub</code>.</p>
|
370
370
|
</div>
|
371
371
|
|
372
372
|
</li>
|
@@ -485,9 +485,9 @@
|
|
485
485
|
<span class='comment'># Creates a new matcher.
|
486
486
|
</span> <span class='comment'>#
|
487
487
|
</span> <span class='comment'># @param domains [String|Array] The list of domains which mark a positive match.
|
488
|
-
</span> <span class='comment'># @param replace_pattern [String|Regexp] A optional pattern to
|
489
|
-
</span> <span class='comment'># @param replace_string [String] A string to
|
490
|
-
</span> <span class='comment'># @param replace_block [Proc] A block to use
|
488
|
+
</span> <span class='comment'># @param replace_pattern [String|Regexp] A optional pattern to manipulate the request host before trying the match. See `String#gsub`.
|
489
|
+
</span> <span class='comment'># @param replace_string [String] A string to manipulate the request host before trying the match. See `String#gsub`.
|
490
|
+
</span> <span class='comment'># @param replace_block [Proc] A block to use to manipulate the request host before trying the match. See `String#gsub`.
|
491
491
|
</span> <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_domains'>domains</span><span class='comma'>,</span> <span class='id identifier rubyid_replace_pattern'>replace_pattern</span> <span class='op'>=</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>\.dev$</span><span class='regexp_end'>/</span></span><span class='comma'>,</span> <span class='id identifier rubyid_replace_string'>replace_string</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_replace_block'>replace_block</span><span class='rparen'>)</span>
|
492
492
|
<span class='ivar'>@domains</span> <span class='op'>=</span> <span class='id identifier rubyid_domains'>domains</span><span class='period'>.</span><span class='id identifier rubyid_ensure_array'>ensure_array</span>
|
493
493
|
<span class='ivar'>@replace_pattern</span> <span class='op'>=</span> <span class='id identifier rubyid_replace_pattern'>replace_pattern</span>
|
@@ -522,7 +522,7 @@
|
|
522
522
|
|
523
523
|
</h3><div class="docstring">
|
524
524
|
<div class="discussion">
|
525
|
-
<p>Returns A block to use
|
525
|
+
<p>Returns A block to use to manipulate the request host before trying the match. See <code>String#gsub</code>.</p>
|
526
526
|
|
527
527
|
|
528
528
|
</div>
|
@@ -540,7 +540,7 @@
|
|
540
540
|
|
541
541
|
|
542
542
|
—
|
543
|
-
<div class='inline'><p>A block to use
|
543
|
+
<div class='inline'><p>A block to use to manipulate the request host before trying the match. See <code>String#gsub</code>.</p>
|
544
544
|
</div>
|
545
545
|
|
546
546
|
</li>
|
@@ -588,9 +588,9 @@
|
|
588
588
|
<span class='comment'># Creates a new matcher.
|
589
589
|
</span> <span class='comment'>#
|
590
590
|
</span> <span class='comment'># @param domains [String|Array] The list of domains which mark a positive match.
|
591
|
-
</span> <span class='comment'># @param replace_pattern [String|Regexp] A optional pattern to
|
592
|
-
</span> <span class='comment'># @param replace_string [String] A string to
|
593
|
-
</span> <span class='comment'># @param replace_block [Proc] A block to use
|
591
|
+
</span> <span class='comment'># @param replace_pattern [String|Regexp] A optional pattern to manipulate the request host before trying the match. See `String#gsub`.
|
592
|
+
</span> <span class='comment'># @param replace_string [String] A string to manipulate the request host before trying the match. See `String#gsub`.
|
593
|
+
</span> <span class='comment'># @param replace_block [Proc] A block to use to manipulate the request host before trying the match. See `String#gsub`.
|
594
594
|
</span> <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_domains'>domains</span><span class='comma'>,</span> <span class='id identifier rubyid_replace_pattern'>replace_pattern</span> <span class='op'>=</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>\.dev$</span><span class='regexp_end'>/</span></span><span class='comma'>,</span> <span class='id identifier rubyid_replace_string'>replace_string</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_replace_block'>replace_block</span><span class='rparen'>)</span>
|
595
595
|
<span class='ivar'>@domains</span> <span class='op'>=</span> <span class='id identifier rubyid_domains'>domains</span><span class='period'>.</span><span class='id identifier rubyid_ensure_array'>ensure_array</span>
|
596
596
|
<span class='ivar'>@replace_pattern</span> <span class='op'>=</span> <span class='id identifier rubyid_replace_pattern'>replace_pattern</span>
|
@@ -625,7 +625,7 @@
|
|
625
625
|
|
626
626
|
</h3><div class="docstring">
|
627
627
|
<div class="discussion">
|
628
|
-
<p>Returns A optional pattern to
|
628
|
+
<p>Returns A optional pattern to manipulate the request host before trying the match. See <code>String#gsub</code>.</p>
|
629
629
|
|
630
630
|
|
631
631
|
</div>
|
@@ -643,7 +643,7 @@
|
|
643
643
|
|
644
644
|
|
645
645
|
—
|
646
|
-
<div class='inline'><p>A optional pattern to
|
646
|
+
<div class='inline'><p>A optional pattern to manipulate the request host before trying the match. See <code>String#gsub</code>.</p>
|
647
647
|
</div>
|
648
648
|
|
649
649
|
</li>
|
@@ -691,9 +691,9 @@
|
|
691
691
|
<span class='comment'># Creates a new matcher.
|
692
692
|
</span> <span class='comment'>#
|
693
693
|
</span> <span class='comment'># @param domains [String|Array] The list of domains which mark a positive match.
|
694
|
-
</span> <span class='comment'># @param replace_pattern [String|Regexp] A optional pattern to
|
695
|
-
</span> <span class='comment'># @param replace_string [String] A string to
|
696
|
-
</span> <span class='comment'># @param replace_block [Proc] A block to use
|
694
|
+
</span> <span class='comment'># @param replace_pattern [String|Regexp] A optional pattern to manipulate the request host before trying the match. See `String#gsub`.
|
695
|
+
</span> <span class='comment'># @param replace_string [String] A string to manipulate the request host before trying the match. See `String#gsub`.
|
696
|
+
</span> <span class='comment'># @param replace_block [Proc] A block to use to manipulate the request host before trying the match. See `String#gsub`.
|
697
697
|
</span> <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_domains'>domains</span><span class='comma'>,</span> <span class='id identifier rubyid_replace_pattern'>replace_pattern</span> <span class='op'>=</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>\.dev$</span><span class='regexp_end'>/</span></span><span class='comma'>,</span> <span class='id identifier rubyid_replace_string'>replace_string</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_replace_block'>replace_block</span><span class='rparen'>)</span>
|
698
698
|
<span class='ivar'>@domains</span> <span class='op'>=</span> <span class='id identifier rubyid_domains'>domains</span><span class='period'>.</span><span class='id identifier rubyid_ensure_array'>ensure_array</span>
|
699
699
|
<span class='ivar'>@replace_pattern</span> <span class='op'>=</span> <span class='id identifier rubyid_replace_pattern'>replace_pattern</span>
|
@@ -728,7 +728,7 @@
|
|
728
728
|
|
729
729
|
</h3><div class="docstring">
|
730
730
|
<div class="discussion">
|
731
|
-
<p>Returns A string to
|
731
|
+
<p>Returns A string to manipulate the request host before trying the match. See <code>String#gsub</code>.</p>
|
732
732
|
|
733
733
|
|
734
734
|
</div>
|
@@ -746,7 +746,7 @@
|
|
746
746
|
|
747
747
|
|
748
748
|
—
|
749
|
-
<div class='inline'><p>A string to
|
749
|
+
<div class='inline'><p>A string to manipulate the request host before trying the match. See <code>String#gsub</code>.</p>
|
750
750
|
</div>
|
751
751
|
|
752
752
|
</li>
|
@@ -794,9 +794,9 @@
|
|
794
794
|
<span class='comment'># Creates a new matcher.
|
795
795
|
</span> <span class='comment'>#
|
796
796
|
</span> <span class='comment'># @param domains [String|Array] The list of domains which mark a positive match.
|
797
|
-
</span> <span class='comment'># @param replace_pattern [String|Regexp] A optional pattern to
|
798
|
-
</span> <span class='comment'># @param replace_string [String] A string to
|
799
|
-
</span> <span class='comment'># @param replace_block [Proc] A block to use
|
797
|
+
</span> <span class='comment'># @param replace_pattern [String|Regexp] A optional pattern to manipulate the request host before trying the match. See `String#gsub`.
|
798
|
+
</span> <span class='comment'># @param replace_string [String] A string to manipulate the request host before trying the match. See `String#gsub`.
|
799
|
+
</span> <span class='comment'># @param replace_block [Proc] A block to use to manipulate the request host before trying the match. See `String#gsub`.
|
800
800
|
</span> <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_domains'>domains</span><span class='comma'>,</span> <span class='id identifier rubyid_replace_pattern'>replace_pattern</span> <span class='op'>=</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>\.dev$</span><span class='regexp_end'>/</span></span><span class='comma'>,</span> <span class='id identifier rubyid_replace_string'>replace_string</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_replace_block'>replace_block</span><span class='rparen'>)</span>
|
801
801
|
<span class='ivar'>@domains</span> <span class='op'>=</span> <span class='id identifier rubyid_domains'>domains</span><span class='period'>.</span><span class='id identifier rubyid_ensure_array'>ensure_array</span>
|
802
802
|
<span class='ivar'>@replace_pattern</span> <span class='op'>=</span> <span class='id identifier rubyid_replace_pattern'>replace_pattern</span>
|
@@ -908,9 +908,9 @@
|
|
908
908
|
</div>
|
909
909
|
|
910
910
|
<div id="footer">
|
911
|
-
Generated on
|
911
|
+
Generated on Sun Nov 2 09:40:01 2014 by
|
912
912
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
913
|
-
0.8.7.
|
913
|
+
0.8.7.6 (ruby-2.1.3).
|
914
914
|
</div>
|
915
915
|
|
916
916
|
</body>
|