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.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +35 -0
  3. data/.travis-gemfile +4 -5
  4. data/.travis.yml +3 -2
  5. data/CHANGELOG.md +62 -6
  6. data/Gemfile +7 -8
  7. data/README.md +2 -2
  8. data/ballast.gemspec +9 -12
  9. data/doc/Ballast/AjaxResponse.html +1380 -0
  10. data/doc/Ballast/Concerns/AjaxHandling.html +662 -0
  11. data/doc/Ballast/Concerns/Common.html +81 -361
  12. data/doc/Ballast/Concerns/ErrorsHandling.html +18 -36
  13. data/doc/Ballast/Concerns/View.html +181 -157
  14. data/doc/Ballast/Concerns.html +6 -6
  15. data/doc/Ballast/Configuration.html +204 -31
  16. data/doc/Ballast/Emoji/Character.html +411 -0
  17. data/doc/Ballast/Emoji/Utils.html +794 -0
  18. data/doc/Ballast/Emoji.html +125 -0
  19. data/doc/Ballast/Errors/{BaseError.html → Base.html} +61 -34
  20. data/doc/Ballast/Errors/{PerformError.html → Failure.html} +21 -17
  21. data/doc/Ballast/Errors/InvalidDomain.html +11 -11
  22. data/doc/Ballast/Errors/{ValidationError.html → ValidationFailure.html} +24 -16
  23. data/doc/Ballast/Errors.html +5 -5
  24. data/doc/Ballast/Middlewares/DefaultHost.html +6 -6
  25. data/doc/Ballast/Middlewares.html +4 -4
  26. data/doc/Ballast/RequestDomainMatcher.html +28 -28
  27. data/doc/Ballast/Service/Response.html +1243 -0
  28. data/doc/Ballast/Service.html +1314 -0
  29. data/doc/Ballast/Version.html +7 -7
  30. data/doc/Ballast.html +15 -15
  31. data/doc/_index.html +59 -30
  32. data/doc/class_list.html +6 -2
  33. data/doc/css/style.css +1 -0
  34. data/doc/file.README.html +6 -6
  35. data/doc/file_list.html +5 -1
  36. data/doc/frames.html +1 -1
  37. data/doc/index.html +6 -6
  38. data/doc/js/full_list.js +4 -1
  39. data/doc/method_list.html +167 -79
  40. data/doc/top-level-namespace.html +41 -4
  41. data/lib/ballast/ajax_response.rb +76 -0
  42. data/lib/ballast/concerns/ajax_handling.rb +73 -0
  43. data/lib/ballast/concerns/common.rb +25 -47
  44. data/lib/ballast/concerns/errors_handling.rb +21 -30
  45. data/lib/ballast/concerns/view.rb +24 -22
  46. data/lib/ballast/configuration.rb +30 -10
  47. data/lib/ballast/emoji.rb +114 -0
  48. data/lib/ballast/errors.rb +16 -13
  49. data/lib/ballast/middlewares/default_host.rb +3 -3
  50. data/lib/ballast/request_domain_matcher.rb +7 -7
  51. data/lib/ballast/service.rb +147 -0
  52. data/lib/ballast/version.rb +3 -3
  53. data/lib/ballast.rb +22 -22
  54. data/spec/ballast/ajax_response_spec.rb +61 -0
  55. data/spec/ballast/concerns/ajax_handling_spec.rb +86 -0
  56. data/spec/ballast/concerns/common_spec.rb +17 -52
  57. data/spec/ballast/concerns/errors_handling_spec.rb +35 -29
  58. data/spec/ballast/concerns/view_spec.rb +21 -32
  59. data/spec/ballast/configuration_spec.rb +66 -16
  60. data/spec/ballast/emoji_spec.rb +103 -0
  61. data/spec/ballast/errors_spec.rb +5 -5
  62. data/spec/ballast/middlewares/default_host_spec.rb +3 -5
  63. data/spec/ballast/request_domain_matcher_spec.rb +4 -4
  64. data/spec/ballast/service_spec.rb +137 -0
  65. data/spec/spec_helper.rb +1 -13
  66. metadata +42 -80
  67. data/doc/Ballast/Concerns/Ajax.html +0 -945
  68. data/doc/Ballast/Context.html +0 -417
  69. data/doc/Ballast/Operation.html +0 -1304
  70. data/doc/Ballast/OperationsChain.html +0 -597
  71. data/lib/ballast/concerns/ajax.rb +0 -134
  72. data/lib/ballast/context.rb +0 -38
  73. data/lib/ballast/operation.rb +0 -136
  74. data/lib/ballast/operations_chain.rb +0 -45
  75. data/spec/ballast/concerns/ajax_spec.rb +0 -141
  76. data/spec/ballast/context_spec.rb +0 -23
  77. data/spec/ballast/operation_spec.rb +0 -177
  78. 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::ValidationError
7
+ Exception: Ballast::Errors::ValidationFailure
8
8
 
9
- &mdash; Documentation by YARD 0.8.7.3
9
+ &mdash; 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#!" + escape(window.location.href);
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> &raquo;
35
35
  <span class='title'><span class='object_link'><a href="../../Ballast.html" title="Ballast (module)">Ballast</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Errors.html" title="Ballast::Errors (module)">Errors</a></span></span>
36
36
  &raquo;
37
- <span class="title">ValidationError</span>
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::ValidationError
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="BaseError.html" title="Ballast::Errors::BaseError (class)">BaseError</a></span></span>
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="BaseError.html" title="Ballast::Errors::BaseError (class)">BaseError</a></span></li>
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">Ballast::Errors::ValidationError</li>
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="BaseError.html" title="Ballast::Errors::BaseError (class)">BaseError</a></span></h3>
125
- <p class="inherited"><span class='object_link'><a href="BaseError.html#response-instance_method" title="Ballast::Errors::BaseError#response (method)">#response</a></span></p>
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="BaseError.html" title="Ballast::Errors::BaseError (class)">BaseError</a></span></h3>
138
- <p class="inherited"><span class='object_link'><a href="BaseError.html#initialize-instance_method" title="Ballast::Errors::BaseError#initialize (method)">#initialize</a></span></p>
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="BaseError.html#initialize-instance_method" title="Ballast::Errors::BaseError#initialize (method)">Ballast::Errors::BaseError</a></span></p>
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 Sat Mar 15 14:04:13 2014 by
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.3 (ruby-2.1.0).
161
+ 0.8.7.6 (ruby-2.1.3).
154
162
  </div>
155
163
 
156
164
  </body>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Module: Ballast::Errors
8
8
 
9
- &mdash; Documentation by YARD 0.8.7.3
9
+ &mdash; 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#!" + escape(window.location.href);
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/BaseError.html" title="Ballast::Errors::BaseError (class)">BaseError</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/PerformError.html" title="Ballast::Errors::PerformError (class)">PerformError</a></span>, <span class='object_link'><a href="Errors/ValidationError.html" title="Ballast::Errors::ValidationError (class)">ValidationError</a></span>
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 Sat Mar 15 14:04:12 2014 by
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.3 (ruby-2.1.0).
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
- &mdash; Documentation by YARD 0.8.7.3
9
+ &mdash; 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#!" + escape(window.location.href);
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'>&quot;</span><span class='tstring_content'>SERVER_NAME</span><span class='tstring_end'>&quot;</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='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>RACK_ENV</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='rbracket'>]</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='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>RACK_ENV</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>production</span><span class='tstring_end'>&quot;</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'>&amp;&amp;</span> <span class='id identifier rubyid_new_host'>new_host</span> <span class='kw'>then</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'>&amp;&amp;</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'>&quot;</span><span class='tstring_content'>ORIG_SERVER_NAME</span><span class='tstring_end'>&quot;</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'>&quot;</span><span class='tstring_content'>ORIG_HTTP_HOST</span><span class='tstring_end'>&quot;</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'>&quot;</span><span class='tstring_content'>HTTP_HOST</span><span class='tstring_end'>&quot;</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'>&quot;</span><span class='tstring_content'>SERVER_NAME</span><span class='tstring_end'>&quot;</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 Sat Mar 15 14:04:13 2014 by
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.3 (ruby-2.1.0).
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
- &mdash; Documentation by YARD 0.8.7.3
9
+ &mdash; 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#!" + escape(window.location.href);
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 Sat Mar 15 14:04:13 2014 by
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.3 (ruby-2.1.0).
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
- &mdash; Documentation by YARD 0.8.7.3
9
+ &mdash; 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#!" + escape(window.location.href);
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 for replacement in the request host.</p>
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 replace in the request host.</p>
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 use for replacement in the request host.</p>
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
  &mdash;
337
- <div class='inline'><p>A optional pattern to replace in the request host. See <code>String#gsub</code>.</p>
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
  &mdash;
354
- <div class='inline'><p>A string to use for replacement in the request host. See <code>String#gsub</code>.</p>
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
  &mdash;
369
- <div class='inline'><p>A block to use for replacement in the request host. See <code>String#gsub</code>.</p>
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 replace in the request host. See `String#gsub`.
489
- </span> <span class='comment'># @param replace_string [String] A string to use for replacement in the request host. See `String#gsub`.
490
- </span> <span class='comment'># @param replace_block [Proc] A block to use for replacement in the request host. See `String#gsub`.
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'>&quot;</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='op'>&amp;</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 for replacement in the request host. See <code>String#gsub</code>.</p>
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
  &mdash;
543
- <div class='inline'><p>A block to use for replacement in the request host. See <code>String#gsub</code>.</p>
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 replace in the request host. See `String#gsub`.
592
- </span> <span class='comment'># @param replace_string [String] A string to use for replacement in the request host. See `String#gsub`.
593
- </span> <span class='comment'># @param replace_block [Proc] A block to use for replacement in the request host. See `String#gsub`.
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'>&quot;</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='op'>&amp;</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 replace in the request host. See <code>String#gsub</code>.</p>
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
  &mdash;
646
- <div class='inline'><p>A optional pattern to replace in the request host. See <code>String#gsub</code>.</p>
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 replace in the request host. See `String#gsub`.
695
- </span> <span class='comment'># @param replace_string [String] A string to use for replacement in the request host. See `String#gsub`.
696
- </span> <span class='comment'># @param replace_block [Proc] A block to use for replacement in the request host. See `String#gsub`.
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'>&quot;</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='op'>&amp;</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 use for replacement in the request host. See <code>String#gsub</code>.</p>
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
  &mdash;
749
- <div class='inline'><p>A string to use for replacement in the request host. See <code>String#gsub</code>.</p>
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 replace in the request host. See `String#gsub`.
798
- </span> <span class='comment'># @param replace_string [String] A string to use for replacement in the request host. See `String#gsub`.
799
- </span> <span class='comment'># @param replace_block [Proc] A block to use for replacement in the request host. See `String#gsub`.
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'>&quot;</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='op'>&amp;</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 Sat Mar 15 14:04:13 2014 by
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.3 (ruby-2.1.0).
913
+ 0.8.7.6 (ruby-2.1.3).
914
914
  </div>
915
915
 
916
916
  </body>