configatron 2.3.2 → 2.4.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.
- data/LICENSE +21 -0
- data/README +16 -12
- data/generators/configatron_generator.rb +20 -0
- data/generators/templates/configatron/cucumber.rb +4 -0
- data/generators/templates/configatron/defaults.rb +7 -0
- data/generators/templates/configatron/development.rb +4 -0
- data/generators/templates/configatron/production.rb +4 -0
- data/generators/templates/configatron/test.rb +4 -0
- data/generators/templates/initializers/configatron.rb +2 -0
- data/lib/configatron/configatron.rb +7 -3
- data/lib/configatron/rails.rb +44 -0
- data/lib/configatron/store.rb +5 -1
- data/lib/configatron.rb +2 -1
- metadata +19 -28
- data/doc/classes/Class.html +0 -169
- data/doc/classes/Configatron/LockedNamespace.html +0 -146
- data/doc/classes/Configatron/ProtectedParameter.html +0 -146
- data/doc/classes/Configatron/Store.html +0 -830
- data/doc/classes/Configatron.html +0 -303
- data/doc/classes/Kernel.html +0 -144
- data/doc/created.rid +0 -1
- data/doc/files/README.html +0 -320
- data/doc/files/lib/configatron/configatron_rb.html +0 -108
- data/doc/files/lib/configatron/core_ext/class_rb.html +0 -101
- data/doc/files/lib/configatron/core_ext/kernel_rb.html +0 -101
- data/doc/files/lib/configatron/core_ext/object_rb.html +0 -101
- data/doc/files/lib/configatron/core_ext/string_rb.html +0 -101
- data/doc/files/lib/configatron/errors_rb.html +0 -101
- data/doc/files/lib/configatron/store_rb.html +0 -101
- data/doc/files/lib/configatron_rb.html +0 -108
- data/doc/fr_class_index.html +0 -32
- data/doc/fr_file_index.html +0 -35
- data/doc/fr_method_index.html +0 -56
- data/doc/index.html +0 -24
- data/doc/rdoc-style.css +0 -208
@@ -1,303 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
-
<head>
|
8
|
-
<title>Class: Configatron</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
-
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
12
|
-
<script type="text/javascript">
|
13
|
-
// <![CDATA[
|
14
|
-
|
15
|
-
function popupCode( url ) {
|
16
|
-
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
-
}
|
18
|
-
|
19
|
-
function toggleCode( id ) {
|
20
|
-
if ( document.getElementById )
|
21
|
-
elem = document.getElementById( id );
|
22
|
-
else if ( document.all )
|
23
|
-
elem = eval( "document.all." + id );
|
24
|
-
else
|
25
|
-
return false;
|
26
|
-
|
27
|
-
elemStyle = elem.style;
|
28
|
-
|
29
|
-
if ( elemStyle.display != "block" ) {
|
30
|
-
elemStyle.display = "block"
|
31
|
-
} else {
|
32
|
-
elemStyle.display = "none"
|
33
|
-
}
|
34
|
-
|
35
|
-
return true;
|
36
|
-
}
|
37
|
-
|
38
|
-
// Make codeblocks hidden by default
|
39
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
-
|
41
|
-
// ]]>
|
42
|
-
</script>
|
43
|
-
|
44
|
-
</head>
|
45
|
-
<body>
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
<div id="classHeader">
|
50
|
-
<table class="header-table">
|
51
|
-
<tr class="top-aligned-row">
|
52
|
-
<td><strong>Class</strong></td>
|
53
|
-
<td class="class-name-in-header">Configatron</td>
|
54
|
-
</tr>
|
55
|
-
<tr class="top-aligned-row">
|
56
|
-
<td><strong>In:</strong></td>
|
57
|
-
<td>
|
58
|
-
<a href="../files/lib/configatron/configatron_rb.html">
|
59
|
-
lib/configatron/configatron.rb
|
60
|
-
</a>
|
61
|
-
<br />
|
62
|
-
<a href="../files/lib/configatron/errors_rb.html">
|
63
|
-
lib/configatron/errors.rb
|
64
|
-
</a>
|
65
|
-
<br />
|
66
|
-
<a href="../files/lib/configatron/store_rb.html">
|
67
|
-
lib/configatron/store.rb
|
68
|
-
</a>
|
69
|
-
<br />
|
70
|
-
</td>
|
71
|
-
</tr>
|
72
|
-
|
73
|
-
<tr class="top-aligned-row">
|
74
|
-
<td><strong>Parent:</strong></td>
|
75
|
-
<td>
|
76
|
-
Object
|
77
|
-
</td>
|
78
|
-
</tr>
|
79
|
-
</table>
|
80
|
-
</div>
|
81
|
-
<!-- banner header -->
|
82
|
-
|
83
|
-
<div id="bodyContent">
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
<div id="contextContent">
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
</div>
|
92
|
-
|
93
|
-
<div id="method-list">
|
94
|
-
<h3 class="section-bar">Methods</h3>
|
95
|
-
|
96
|
-
<div class="name-list">
|
97
|
-
<a href="#M000002">method_missing</a>
|
98
|
-
<a href="#M000003">reset!</a>
|
99
|
-
<a href="#M000004">temp</a>
|
100
|
-
<a href="#M000006">temp_end</a>
|
101
|
-
<a href="#M000005">temp_start</a>
|
102
|
-
</div>
|
103
|
-
</div>
|
104
|
-
|
105
|
-
</div>
|
106
|
-
|
107
|
-
|
108
|
-
<!-- if includes -->
|
109
|
-
<div id="includes">
|
110
|
-
<h3 class="section-bar">Included Modules</h3>
|
111
|
-
|
112
|
-
<div id="includes-list">
|
113
|
-
<span class="include-name">Singleton</span>
|
114
|
-
</div>
|
115
|
-
</div>
|
116
|
-
|
117
|
-
<div id="section">
|
118
|
-
|
119
|
-
<div id="class-list">
|
120
|
-
<h3 class="section-bar">Classes and Modules</h3>
|
121
|
-
|
122
|
-
Class <a href="Configatron/LockedNamespace.html" class="link">Configatron::LockedNamespace</a><br />
|
123
|
-
Class <a href="Configatron/ProtectedParameter.html" class="link">Configatron::ProtectedParameter</a><br />
|
124
|
-
Class <a href="Configatron/Store.html" class="link">Configatron::Store</a><br />
|
125
|
-
|
126
|
-
</div>
|
127
|
-
|
128
|
-
|
129
|
-
<div id="aliases-list">
|
130
|
-
<h3 class="section-bar">External Aliases</h3>
|
131
|
-
|
132
|
-
<div class="name-list">
|
133
|
-
<table summary="aliases">
|
134
|
-
<tr class="top-aligned-row context-row">
|
135
|
-
<td class="context-item-name">send</td>
|
136
|
-
<td>-></td>
|
137
|
-
<td class="context-item-value">send!</td>
|
138
|
-
</tr>
|
139
|
-
</table>
|
140
|
-
</div>
|
141
|
-
</div>
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
<!-- if method_list -->
|
148
|
-
<div id="methods">
|
149
|
-
<h3 class="section-bar">Public Instance methods</h3>
|
150
|
-
|
151
|
-
<div id="method-M000002" class="method-detail">
|
152
|
-
<a name="M000002"></a>
|
153
|
-
|
154
|
-
<div class="method-heading">
|
155
|
-
<a href="#M000002" class="method-signature">
|
156
|
-
<span class="method-name">method_missing</span><span class="method-args">(sym, *args)</span>
|
157
|
-
</a>
|
158
|
-
</div>
|
159
|
-
|
160
|
-
<div class="method-description">
|
161
|
-
<p>
|
162
|
-
Forwards the method call onto the ‘namespaced’ <a
|
163
|
-
href="Configatron/Store.html">Configatron::Store</a>
|
164
|
-
</p>
|
165
|
-
<p><a class="source-toggle" href="#"
|
166
|
-
onclick="toggleCode('M000002-source');return false;">[Source]</a></p>
|
167
|
-
<div class="method-source-code" id="M000002-source">
|
168
|
-
<pre>
|
169
|
-
<span class="ruby-comment cmt"># File lib/configatron/configatron.rb, line 14</span>
|
170
|
-
14: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">method_missing</span>(<span class="ruby-identifier">sym</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
171
|
-
15: <span class="ruby-ivar">@_store</span>[<span class="ruby-ivar">@_namespace</span>.<span class="ruby-identifier">last</span>].<span class="ruby-identifier">send</span>(<span class="ruby-identifier">sym</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
172
|
-
16: <span class="ruby-keyword kw">end</span>
|
173
|
-
</pre>
|
174
|
-
</div>
|
175
|
-
</div>
|
176
|
-
</div>
|
177
|
-
|
178
|
-
<div id="method-M000003" class="method-detail">
|
179
|
-
<a name="M000003"></a>
|
180
|
-
|
181
|
-
<div class="method-heading">
|
182
|
-
<a href="#M000003" class="method-signature">
|
183
|
-
<span class="method-name">reset!</span><span class="method-args">()</span>
|
184
|
-
</a>
|
185
|
-
</div>
|
186
|
-
|
187
|
-
<div class="method-description">
|
188
|
-
<p>
|
189
|
-
Removes ALL configuration parameters
|
190
|
-
</p>
|
191
|
-
<p><a class="source-toggle" href="#"
|
192
|
-
onclick="toggleCode('M000003-source');return false;">[Source]</a></p>
|
193
|
-
<div class="method-source-code" id="M000003-source">
|
194
|
-
<pre>
|
195
|
-
<span class="ruby-comment cmt"># File lib/configatron/configatron.rb, line 19</span>
|
196
|
-
19: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reset!</span>
|
197
|
-
20: <span class="ruby-ivar">@_store</span> = {<span class="ruby-identifier">:default</span> =<span class="ruby-operator">></span> <span class="ruby-constant">Configatron</span><span class="ruby-operator">::</span><span class="ruby-constant">Store</span>.<span class="ruby-identifier">new</span>}
|
198
|
-
21: <span class="ruby-keyword kw">end</span>
|
199
|
-
</pre>
|
200
|
-
</div>
|
201
|
-
</div>
|
202
|
-
</div>
|
203
|
-
|
204
|
-
<div id="method-M000004" class="method-detail">
|
205
|
-
<a name="M000004"></a>
|
206
|
-
|
207
|
-
<div class="method-heading">
|
208
|
-
<a href="#M000004" class="method-signature">
|
209
|
-
<span class="method-name">temp</span><span class="method-args">(options = nil) {|| ...}</span>
|
210
|
-
</a>
|
211
|
-
</div>
|
212
|
-
|
213
|
-
<div class="method-description">
|
214
|
-
<p>
|
215
|
-
Allows for the temporary overriding of parameters in a block. Takes an
|
216
|
-
optional Hash of parameters that will be applied before the block gets
|
217
|
-
called. At the end of the block, the temporary settings are deleted and the
|
218
|
-
original settings are reinstated.
|
219
|
-
</p>
|
220
|
-
<p><a class="source-toggle" href="#"
|
221
|
-
onclick="toggleCode('M000004-source');return false;">[Source]</a></p>
|
222
|
-
<div class="method-source-code" id="M000004-source">
|
223
|
-
<pre>
|
224
|
-
<span class="ruby-comment cmt"># File lib/configatron/configatron.rb, line 27</span>
|
225
|
-
27: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">temp</span>(<span class="ruby-identifier">options</span> = <span class="ruby-keyword kw">nil</span>)
|
226
|
-
28: <span class="ruby-keyword kw">begin</span>
|
227
|
-
29: <span class="ruby-identifier">temp_start</span>(<span class="ruby-identifier">options</span>)
|
228
|
-
30: <span class="ruby-keyword kw">yield</span>
|
229
|
-
31: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">e</span>
|
230
|
-
32: <span class="ruby-identifier">raise</span> <span class="ruby-identifier">e</span>
|
231
|
-
33: <span class="ruby-keyword kw">ensure</span>
|
232
|
-
34: <span class="ruby-identifier">temp_end</span>
|
233
|
-
35: <span class="ruby-keyword kw">end</span>
|
234
|
-
36: <span class="ruby-keyword kw">end</span>
|
235
|
-
</pre>
|
236
|
-
</div>
|
237
|
-
</div>
|
238
|
-
</div>
|
239
|
-
|
240
|
-
<div id="method-M000006" class="method-detail">
|
241
|
-
<a name="M000006"></a>
|
242
|
-
|
243
|
-
<div class="method-heading">
|
244
|
-
<a href="#M000006" class="method-signature">
|
245
|
-
<span class="method-name">temp_end</span><span class="method-args">()</span>
|
246
|
-
</a>
|
247
|
-
</div>
|
248
|
-
|
249
|
-
<div class="method-description">
|
250
|
-
<p><a class="source-toggle" href="#"
|
251
|
-
onclick="toggleCode('M000006-source');return false;">[Source]</a></p>
|
252
|
-
<div class="method-source-code" id="M000006-source">
|
253
|
-
<pre>
|
254
|
-
<span class="ruby-comment cmt"># File lib/configatron/configatron.rb, line 47</span>
|
255
|
-
47: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">temp_end</span>
|
256
|
-
48: <span class="ruby-ivar">@_store</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-ivar">@_namespace</span>.<span class="ruby-identifier">pop</span>)
|
257
|
-
49: <span class="ruby-keyword kw">end</span>
|
258
|
-
</pre>
|
259
|
-
</div>
|
260
|
-
</div>
|
261
|
-
</div>
|
262
|
-
|
263
|
-
<div id="method-M000005" class="method-detail">
|
264
|
-
<a name="M000005"></a>
|
265
|
-
|
266
|
-
<div class="method-heading">
|
267
|
-
<a href="#M000005" class="method-signature">
|
268
|
-
<span class="method-name">temp_start</span><span class="method-args">(options = nil)</span>
|
269
|
-
</a>
|
270
|
-
</div>
|
271
|
-
|
272
|
-
<div class="method-description">
|
273
|
-
<p><a class="source-toggle" href="#"
|
274
|
-
onclick="toggleCode('M000005-source');return false;">[Source]</a></p>
|
275
|
-
<div class="method-source-code" id="M000005-source">
|
276
|
-
<pre>
|
277
|
-
<span class="ruby-comment cmt"># File lib/configatron/configatron.rb, line 38</span>
|
278
|
-
38: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">temp_start</span>(<span class="ruby-identifier">options</span> = <span class="ruby-keyword kw">nil</span>)
|
279
|
-
39: <span class="ruby-identifier">n_space</span> = <span class="ruby-identifier">rand</span>
|
280
|
-
40: <span class="ruby-ivar">@_store</span>[<span class="ruby-identifier">n_space</span>] = <span class="ruby-ivar">@_store</span>[<span class="ruby-ivar">@_namespace</span>.<span class="ruby-identifier">last</span>].<span class="ruby-identifier">deep_clone</span>
|
281
|
-
41: <span class="ruby-ivar">@_namespace</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">n_space</span>
|
282
|
-
42: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>
|
283
|
-
43: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">method_missing</span>(<span class="ruby-identifier">:configure_from_hash</span>, <span class="ruby-identifier">options</span>)
|
284
|
-
44: <span class="ruby-keyword kw">end</span>
|
285
|
-
45: <span class="ruby-keyword kw">end</span>
|
286
|
-
</pre>
|
287
|
-
</div>
|
288
|
-
</div>
|
289
|
-
</div>
|
290
|
-
|
291
|
-
|
292
|
-
</div>
|
293
|
-
|
294
|
-
|
295
|
-
</div>
|
296
|
-
|
297
|
-
|
298
|
-
<div id="validator-badges">
|
299
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
300
|
-
</div>
|
301
|
-
|
302
|
-
</body>
|
303
|
-
</html>
|
data/doc/classes/Kernel.html
DELETED
@@ -1,144 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
-
<head>
|
8
|
-
<title>Module: Kernel</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
-
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
12
|
-
<script type="text/javascript">
|
13
|
-
// <![CDATA[
|
14
|
-
|
15
|
-
function popupCode( url ) {
|
16
|
-
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
-
}
|
18
|
-
|
19
|
-
function toggleCode( id ) {
|
20
|
-
if ( document.getElementById )
|
21
|
-
elem = document.getElementById( id );
|
22
|
-
else if ( document.all )
|
23
|
-
elem = eval( "document.all." + id );
|
24
|
-
else
|
25
|
-
return false;
|
26
|
-
|
27
|
-
elemStyle = elem.style;
|
28
|
-
|
29
|
-
if ( elemStyle.display != "block" ) {
|
30
|
-
elemStyle.display = "block"
|
31
|
-
} else {
|
32
|
-
elemStyle.display = "none"
|
33
|
-
}
|
34
|
-
|
35
|
-
return true;
|
36
|
-
}
|
37
|
-
|
38
|
-
// Make codeblocks hidden by default
|
39
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
-
|
41
|
-
// ]]>
|
42
|
-
</script>
|
43
|
-
|
44
|
-
</head>
|
45
|
-
<body>
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
<div id="classHeader">
|
50
|
-
<table class="header-table">
|
51
|
-
<tr class="top-aligned-row">
|
52
|
-
<td><strong>Module</strong></td>
|
53
|
-
<td class="class-name-in-header">Kernel</td>
|
54
|
-
</tr>
|
55
|
-
<tr class="top-aligned-row">
|
56
|
-
<td><strong>In:</strong></td>
|
57
|
-
<td>
|
58
|
-
<a href="../files/lib/configatron/core_ext/kernel_rb.html">
|
59
|
-
lib/configatron/core_ext/kernel.rb
|
60
|
-
</a>
|
61
|
-
<br />
|
62
|
-
</td>
|
63
|
-
</tr>
|
64
|
-
|
65
|
-
</table>
|
66
|
-
</div>
|
67
|
-
<!-- banner header -->
|
68
|
-
|
69
|
-
<div id="bodyContent">
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
<div id="contextContent">
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
</div>
|
78
|
-
|
79
|
-
<div id="method-list">
|
80
|
-
<h3 class="section-bar">Methods</h3>
|
81
|
-
|
82
|
-
<div class="name-list">
|
83
|
-
<a href="#M000030">configatron</a>
|
84
|
-
</div>
|
85
|
-
</div>
|
86
|
-
|
87
|
-
</div>
|
88
|
-
|
89
|
-
|
90
|
-
<!-- if includes -->
|
91
|
-
|
92
|
-
<div id="section">
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
<!-- if method_list -->
|
102
|
-
<div id="methods">
|
103
|
-
<h3 class="section-bar">Public Instance methods</h3>
|
104
|
-
|
105
|
-
<div id="method-M000030" class="method-detail">
|
106
|
-
<a name="M000030"></a>
|
107
|
-
|
108
|
-
<div class="method-heading">
|
109
|
-
<a href="#M000030" class="method-signature">
|
110
|
-
<span class="method-name">configatron</span><span class="method-args">()</span>
|
111
|
-
</a>
|
112
|
-
</div>
|
113
|
-
|
114
|
-
<div class="method-description">
|
115
|
-
<p>
|
116
|
-
Provides access to the <a href="Configatron.html">Configatron</a> storage
|
117
|
-
system.
|
118
|
-
</p>
|
119
|
-
<p><a class="source-toggle" href="#"
|
120
|
-
onclick="toggleCode('M000030-source');return false;">[Source]</a></p>
|
121
|
-
<div class="method-source-code" id="M000030-source">
|
122
|
-
<pre>
|
123
|
-
<span class="ruby-comment cmt"># File lib/configatron/core_ext/kernel.rb, line 4</span>
|
124
|
-
4: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">configatron</span>
|
125
|
-
5: <span class="ruby-constant">Configatron</span>.<span class="ruby-identifier">instance</span>
|
126
|
-
6: <span class="ruby-keyword kw">end</span>
|
127
|
-
</pre>
|
128
|
-
</div>
|
129
|
-
</div>
|
130
|
-
</div>
|
131
|
-
|
132
|
-
|
133
|
-
</div>
|
134
|
-
|
135
|
-
|
136
|
-
</div>
|
137
|
-
|
138
|
-
|
139
|
-
<div id="validator-badges">
|
140
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
141
|
-
</div>
|
142
|
-
|
143
|
-
</body>
|
144
|
-
</html>
|
data/doc/created.rid
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
Wed, 20 May 2009 13:54:31 -0400
|