ballast 1.9.0 → 1.9.1
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/.DS_Store +0 -0
- data/CHANGELOG.md +4 -0
- data/ballast.gemspec +1 -1
- data/doc/Ballast.html +1 -1
- data/doc/Ballast/Concerns.html +1 -1
- data/doc/Ballast/Concerns/Ajax.html +1 -1
- data/doc/Ballast/Concerns/Common.html +1 -1
- data/doc/Ballast/Concerns/ErrorsHandling.html +1 -1
- data/doc/Ballast/Concerns/View.html +1 -1
- data/doc/Ballast/Configuration.html +4 -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 +1 -1
- data/doc/Ballast/RequestDomainMatcher.html +1 -1
- data/doc/Ballast/Version.html +2 -2
- data/doc/_index.html +1 -1
- data/doc/file.README.html +1 -1
- data/doc/index.html +1 -1
- data/doc/top-level-namespace.html +1 -1
- data/lib/ballast/configuration.rb +1 -0
- data/lib/ballast/version.rb +1 -1
- data/spec/ballast/configuration_spec.rb +4 -4
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e262e645bbaa4d5bbd251e8f78a8a234e6868e8d
|
4
|
+
data.tar.gz: b9dc8f5a95ff0c8117b53a5b2883e989bbfcfd2f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 14a9cd8b49bac63e05a5d892800c9d594af66fd9f101d8190d976f04e408f7b2debac26321e707b5ac2f385cf2875e16e71f0e03239fd219cda610d260cd8271
|
7
|
+
data.tar.gz: 856764b23b919a0e333033a7f6f4be09115ff16d0072b8a7f4110887024b8428d1233ad517d20628d23223d98ceb4540fd4d4ff0c88a44b70dedf2a7d74d1d26
|
data/.DS_Store
ADDED
Binary file
|
data/CHANGELOG.md
CHANGED
data/ballast.gemspec
CHANGED
@@ -24,7 +24,7 @@ Gem::Specification.new do |gem|
|
|
24
24
|
|
25
25
|
gem.required_ruby_version = ">= 2.0"
|
26
26
|
|
27
|
-
gem.add_dependency("actionpack", ">= 4.0.
|
27
|
+
gem.add_dependency("actionpack", ">= 4.0.3")
|
28
28
|
gem.add_dependency("rack", "~> 1.5.2")
|
29
29
|
gem.add_dependency("oj", "~> 2.5.4")
|
30
30
|
gem.add_dependency("brauser", "~> 3.2.6")
|
data/doc/Ballast.html
CHANGED
@@ -259,7 +259,7 @@ Licensed under the MIT license, which can be found at http://www.opensource.org/
|
|
259
259
|
</div>
|
260
260
|
|
261
261
|
<div id="footer">
|
262
|
-
Generated on
|
262
|
+
Generated on Sat Mar 8 10:05:53 2014 by
|
263
263
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
264
264
|
0.8.7.3 (ruby-2.1.0).
|
265
265
|
</div>
|
data/doc/Ballast/Concerns.html
CHANGED
@@ -118,7 +118,7 @@
|
|
118
118
|
</div>
|
119
119
|
|
120
120
|
<div id="footer">
|
121
|
-
Generated on
|
121
|
+
Generated on Sat Mar 8 10:05:53 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>
|
@@ -895,7 +895,7 @@
|
|
895
895
|
</div>
|
896
896
|
|
897
897
|
<div id="footer">
|
898
|
-
Generated on
|
898
|
+
Generated on Sat Mar 8 10:05:53 2014 by
|
899
899
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
900
900
|
0.8.7.3 (ruby-2.1.0).
|
901
901
|
</div>
|
@@ -1098,7 +1098,7 @@ and <code>%:Z</code> for the zone name considering also DST.</p>
|
|
1098
1098
|
</div>
|
1099
1099
|
|
1100
1100
|
<div id="footer">
|
1101
|
-
Generated on
|
1101
|
+
Generated on Sat Mar 8 10:05:53 2014 by
|
1102
1102
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1103
1103
|
0.8.7.3 (ruby-2.1.0).
|
1104
1104
|
</div>
|
@@ -291,7 +291,7 @@
|
|
291
291
|
</div>
|
292
292
|
|
293
293
|
<div id="footer">
|
294
|
-
Generated on
|
294
|
+
Generated on Sat Mar 8 10:05:53 2014 by
|
295
295
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
296
296
|
0.8.7.3 (ruby-2.1.0).
|
297
297
|
</div>
|
@@ -850,7 +850,7 @@
|
|
850
850
|
</div>
|
851
851
|
|
852
852
|
<div id="footer">
|
853
|
-
Generated on
|
853
|
+
Generated on Sat Mar 8 10:05:53 2014 by
|
854
854
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
855
855
|
0.8.7.3 (ruby-2.1.0).
|
856
856
|
</div>
|
@@ -245,7 +245,8 @@ Subfolders are not supported.</p>
|
|
245
245
|
24
|
246
246
|
25
|
247
247
|
26
|
248
|
-
27
|
248
|
+
27
|
249
|
+
28</pre>
|
249
250
|
</td>
|
250
251
|
<td>
|
251
252
|
<pre class="code"><span class="info file"># File 'lib/ballast/configuration.rb', line 16</span>
|
@@ -258,6 +259,7 @@ Subfolders are not supported.</p>
|
|
258
259
|
<span class='id identifier rubyid_sections'>sections</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_section'>section</span><span class='op'>|</span>
|
259
260
|
<span class='id identifier rubyid_content'>content</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='const'>YAML</span><span class='period'>.</span><span class='id identifier rubyid_load_file'>load_file</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_root'>root</span><span class='embexpr_end'>}</span><span class='tstring_content'>/config/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_section'>section</span><span class='embexpr_end'>}</span><span class='tstring_content'>.yml</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> <span class='kw'>rescue</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_with_indifferent_access'>with_indifferent_access</span>
|
260
261
|
<span class='kw'>self</span><span class='lbracket'>[</span><span class='id identifier rubyid_section'>section</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_content'>content</span><span class='lbracket'>[</span><span class='id identifier rubyid_environment'>environment</span><span class='rbracket'>]</span>
|
262
|
+
<span class='kw'>self</span><span class='lbracket'>[</span><span class='id identifier rubyid_section'>section</span><span class='period'>.</span><span class='id identifier rubyid_underscore'>underscore</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='kw'>self</span><span class='lbracket'>[</span><span class='id identifier rubyid_section'>section</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_section'>section</span><span class='period'>.</span><span class='id identifier rubyid_index'>index</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>
|
261
263
|
<span class='kw'>end</span>
|
262
264
|
|
263
265
|
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_enable_dotted_access'>enable_dotted_access</span>
|
@@ -273,7 +275,7 @@ Subfolders are not supported.</p>
|
|
273
275
|
</div>
|
274
276
|
|
275
277
|
<div id="footer">
|
276
|
-
Generated on
|
278
|
+
Generated on Sat Mar 8 10:05:54 2014 by
|
277
279
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
278
280
|
0.8.7.3 (ruby-2.1.0).
|
279
281
|
</div>
|
data/doc/Ballast/Context.html
CHANGED
@@ -408,7 +408,7 @@
|
|
408
408
|
</div>
|
409
409
|
|
410
410
|
<div id="footer">
|
411
|
-
Generated on
|
411
|
+
Generated on Sat Mar 8 10:05:54 2014 by
|
412
412
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
413
413
|
0.8.7.3 (ruby-2.1.0).
|
414
414
|
</div>
|
data/doc/Ballast/Errors.html
CHANGED
@@ -116,7 +116,7 @@
|
|
116
116
|
</div>
|
117
117
|
|
118
118
|
<div id="footer">
|
119
|
-
Generated on
|
119
|
+
Generated on Sat Mar 8 10:05:53 2014 by
|
120
120
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
121
121
|
0.8.7.3 (ruby-2.1.0).
|
122
122
|
</div>
|
@@ -317,7 +317,7 @@
|
|
317
317
|
</div>
|
318
318
|
|
319
319
|
<div id="footer">
|
320
|
-
Generated on
|
320
|
+
Generated on Sat Mar 8 10:05:53 2014 by
|
321
321
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
322
322
|
0.8.7.3 (ruby-2.1.0).
|
323
323
|
</div>
|
@@ -148,7 +148,7 @@
|
|
148
148
|
</div>
|
149
149
|
|
150
150
|
<div id="footer">
|
151
|
-
Generated on
|
151
|
+
Generated on Sat Mar 8 10:05:54 2014 by
|
152
152
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
153
153
|
0.8.7.3 (ruby-2.1.0).
|
154
154
|
</div>
|
@@ -148,7 +148,7 @@
|
|
148
148
|
</div>
|
149
149
|
|
150
150
|
<div id="footer">
|
151
|
-
Generated on
|
151
|
+
Generated on Sat Mar 8 10:05:54 2014 by
|
152
152
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
153
153
|
0.8.7.3 (ruby-2.1.0).
|
154
154
|
</div>
|
@@ -148,7 +148,7 @@
|
|
148
148
|
</div>
|
149
149
|
|
150
150
|
<div id="footer">
|
151
|
-
Generated on
|
151
|
+
Generated on Sat Mar 8 10:05:54 2014 by
|
152
152
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
153
153
|
0.8.7.3 (ruby-2.1.0).
|
154
154
|
</div>
|
@@ -116,7 +116,7 @@
|
|
116
116
|
</div>
|
117
117
|
|
118
118
|
<div id="footer">
|
119
|
-
Generated on
|
119
|
+
Generated on Sat Mar 8 10:05:53 2014 by
|
120
120
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
121
121
|
0.8.7.3 (ruby-2.1.0).
|
122
122
|
</div>
|
@@ -345,7 +345,7 @@
|
|
345
345
|
</div>
|
346
346
|
|
347
347
|
<div id="footer">
|
348
|
-
Generated on
|
348
|
+
Generated on Sat Mar 8 10:05:54 2014 by
|
349
349
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
350
350
|
0.8.7.3 (ruby-2.1.0).
|
351
351
|
</div>
|
data/doc/Ballast/Operation.html
CHANGED
@@ -1295,7 +1295,7 @@ as owner will be created.</p>
|
|
1295
1295
|
</div>
|
1296
1296
|
|
1297
1297
|
<div id="footer">
|
1298
|
-
Generated on
|
1298
|
+
Generated on Sat Mar 8 10:05:54 2014 by
|
1299
1299
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1300
1300
|
0.8.7.3 (ruby-2.1.0).
|
1301
1301
|
</div>
|
@@ -588,7 +588,7 @@ as owner will be created.</p>
|
|
588
588
|
</div>
|
589
589
|
|
590
590
|
<div id="footer">
|
591
|
-
Generated on
|
591
|
+
Generated on Sat Mar 8 10:05:54 2014 by
|
592
592
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
593
593
|
0.8.7.3 (ruby-2.1.0).
|
594
594
|
</div>
|
@@ -908,7 +908,7 @@
|
|
908
908
|
</div>
|
909
909
|
|
910
910
|
<div id="footer">
|
911
|
-
Generated on
|
911
|
+
Generated on Sat Mar 8 10:05:54 2014 by
|
912
912
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
913
913
|
0.8.7.3 (ruby-2.1.0).
|
914
914
|
</div>
|
data/doc/Ballast/Version.html
CHANGED
@@ -149,7 +149,7 @@
|
|
149
149
|
|
150
150
|
</div>
|
151
151
|
</dt>
|
152
|
-
<dd><pre class="code"><span class='int'>
|
152
|
+
<dd><pre class="code"><span class='int'>1</span></pre></dd>
|
153
153
|
|
154
154
|
<dt id="STRING-constant" class="">STRING =
|
155
155
|
<div class="docstring">
|
@@ -180,7 +180,7 @@
|
|
180
180
|
</div>
|
181
181
|
|
182
182
|
<div id="footer">
|
183
|
-
Generated on
|
183
|
+
Generated on Sat Mar 8 10:05:53 2014 by
|
184
184
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
185
185
|
0.8.7.3 (ruby-2.1.0).
|
186
186
|
</div>
|
data/doc/_index.html
CHANGED
@@ -310,7 +310,7 @@
|
|
310
310
|
</div>
|
311
311
|
|
312
312
|
<div id="footer">
|
313
|
-
Generated on
|
313
|
+
Generated on Sat Mar 8 10:05:53 2014 by
|
314
314
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
315
315
|
0.8.7.3 (ruby-2.1.0).
|
316
316
|
</div>
|
data/doc/file.README.html
CHANGED
@@ -106,7 +106,7 @@
|
|
106
106
|
</div></div>
|
107
107
|
|
108
108
|
<div id="footer">
|
109
|
-
Generated on
|
109
|
+
Generated on Sat Mar 8 10:05:53 2014 by
|
110
110
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
111
111
|
0.8.7.3 (ruby-2.1.0).
|
112
112
|
</div>
|
data/doc/index.html
CHANGED
@@ -106,7 +106,7 @@
|
|
106
106
|
</div></div>
|
107
107
|
|
108
108
|
<div id="footer">
|
109
|
-
Generated on
|
109
|
+
Generated on Sat Mar 8 10:05:53 2014 by
|
110
110
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
111
111
|
0.8.7.3 (ruby-2.1.0).
|
112
112
|
</div>
|
@@ -103,7 +103,7 @@
|
|
103
103
|
</div>
|
104
104
|
|
105
105
|
<div id="footer">
|
106
|
-
Generated on
|
106
|
+
Generated on Sat Mar 8 10:05:53 2014 by
|
107
107
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
108
108
|
0.8.7.3 (ruby-2.1.0).
|
109
109
|
</div>
|
@@ -21,6 +21,7 @@ module Ballast
|
|
21
21
|
sections.each do |section|
|
22
22
|
content = (YAML.load_file("#{root}/config/#{section}.yml") rescue {}).with_indifferent_access
|
23
23
|
self[section] = content[environment]
|
24
|
+
self[section.underscore] = self[section] if section.index("-")
|
24
25
|
end
|
25
26
|
|
26
27
|
self.enable_dotted_access
|
data/lib/ballast/version.rb
CHANGED
@@ -9,21 +9,21 @@ describe Ballast::Configuration do
|
|
9
9
|
describe "#initialize" do
|
10
10
|
before(:each) do
|
11
11
|
expect(YAML).to receive(:load_file).with("ROOT/config/section_a.yml").and_return({"ENV" => {a: {b: 1}}, "OTHER" => {aa: 3}})
|
12
|
-
expect(YAML).to receive(:load_file).with("ROOT/config/
|
12
|
+
expect(YAML).to receive(:load_file).with("ROOT/config/section-b.yml").and_return({"ENV" => {c: {d: 2}}, "OTHER" => {cc: 4}})
|
13
13
|
end
|
14
14
|
|
15
15
|
it "should load a list of sections" do
|
16
|
-
Ballast::Configuration.new(sections: ["section_a", "
|
16
|
+
Ballast::Configuration.new(sections: ["section_a", "section-b"], root: "ROOT", environment: "ENV")
|
17
17
|
end
|
18
18
|
|
19
19
|
it "should only load specific environment" do
|
20
|
-
subject = Ballast::Configuration.new(sections: ["section_a", "
|
20
|
+
subject = Ballast::Configuration.new(sections: ["section_a", "section-b"], root: "ROOT", environment: "ENV")
|
21
21
|
expect(subject["section_a"].keys).to eq(["a"])
|
22
22
|
expect(subject["section_b"].keys).to eq(["c"])
|
23
23
|
end
|
24
24
|
|
25
25
|
it "should enable dotted access" do
|
26
|
-
subject = Ballast::Configuration.new(sections: ["section_a", "
|
26
|
+
subject = Ballast::Configuration.new(sections: ["section_a", "section-b"], root: "ROOT", environment: "ENV")
|
27
27
|
|
28
28
|
expect(subject.section_a.a.b).to eq(1)
|
29
29
|
expect(subject.section_b.c).to eq({"d" => 2})
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ballast
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.9.
|
4
|
+
version: 1.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shogun
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-03-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 4.0.
|
19
|
+
version: 4.0.3
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 4.0.
|
26
|
+
version: 4.0.3
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rack
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -129,6 +129,7 @@ executables: []
|
|
129
129
|
extensions: []
|
130
130
|
extra_rdoc_files: []
|
131
131
|
files:
|
132
|
+
- ".DS_Store"
|
132
133
|
- ".gitignore"
|
133
134
|
- ".travis-gemfile"
|
134
135
|
- ".travis.yml"
|
@@ -218,7 +219,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
218
219
|
version: '0'
|
219
220
|
requirements: []
|
220
221
|
rubyforge_project: ballast
|
221
|
-
rubygems_version: 2.2.
|
222
|
+
rubygems_version: 2.2.2
|
222
223
|
signing_key:
|
223
224
|
specification_version: 4
|
224
225
|
summary: A collection of base utilities for Ruby on Rails.
|