rmobio 1.1.14 → 1.1.15
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/lib/rmobio/doc/classes/Rmobio/Cas/Client.html +15 -15
- data/lib/rmobio/doc/classes/Rmobio/Cas/Client.src/M000059.html +33 -0
- data/lib/rmobio/doc/classes/Rmobio/Cas/Client.src/M000060.html +33 -0
- data/lib/rmobio/doc/classes/Rmobio/Cas/Client.src/M000061.html +27 -0
- data/lib/rmobio/doc/classes/Rmobio/Cas/MobioCasFilter.html +12 -12
- data/lib/rmobio/doc/classes/Rmobio/Cas/MobioCasFilter.src/M000064.html +21 -0
- data/lib/rmobio/doc/classes/Rmobio/Cas/MobioCasFilter.src/M000065.html +50 -0
- data/lib/rmobio/doc/classes/Rmobio/Cas/MobioValidationResponse.html +10 -10
- data/lib/rmobio/doc/classes/Rmobio/Cas/MobioValidationResponse.src/M000062.html +19 -0
- data/lib/rmobio/doc/classes/Rmobio/Cas/MobioValidationResponse.src/M000063.html +31 -0
- data/lib/rmobio/doc/classes/Rmobio/ConfigManager.html +5 -0
- data/lib/rmobio/doc/classes/Rmobio/ConfigManager.src/M000001.html +11 -8
- data/lib/rmobio/doc/classes/Rmobio/Rxml/BaseTransformer.html +45 -0
- data/lib/rmobio/doc/classes/Rmobio/Rxml/BaseTransformer.src/M000056.html +17 -0
- data/lib/rmobio/doc/classes/Rmobio/Rxml/BaseTransformer.src/M000057.html +17 -0
- data/lib/rmobio/doc/classes/Rmobio/Rxml/BaseTransformer.src/M000058.html +17 -0
- data/lib/rmobio/doc/classes/Rmobio/Rxml/XformsTransformer.html +174 -111
- data/lib/rmobio/doc/classes/Rmobio/Rxml/XformsTransformer.src/M000016.html +3 -3
- data/lib/rmobio/doc/classes/Rmobio/Rxml/XformsTransformer.src/M000017.html +5 -5
- data/lib/rmobio/doc/classes/Rmobio/Rxml/XformsTransformer.src/M000018.html +5 -5
- data/lib/rmobio/doc/classes/Rmobio/Rxml/XformsTransformer.src/M000019.html +6 -6
- data/lib/rmobio/doc/classes/Rmobio/Rxml/XformsTransformer.src/M000020.html +5 -11
- data/lib/rmobio/doc/classes/Rmobio/Rxml/XformsTransformer.src/M000021.html +6 -13
- data/lib/rmobio/doc/classes/Rmobio/Rxml/XformsTransformer.src/M000022.html +9 -18
- data/lib/rmobio/doc/classes/Rmobio/Rxml/XformsTransformer.src/M000023.html +12 -19
- data/lib/rmobio/doc/classes/Rmobio/Rxml/XformsTransformer.src/M000024.html +21 -4
- data/lib/rmobio/doc/classes/Rmobio/Rxml/XformsTransformer.src/M000025.html +20 -9
- data/lib/rmobio/doc/classes/Rmobio/Rxml/XformsTransformer.src/M000026.html +4 -4
- data/lib/rmobio/doc/classes/Rmobio/Rxml/XformsTransformer.src/M000027.html +9 -4
- data/lib/rmobio/doc/classes/Rmobio/Rxml/XformsTransformer.src/M000028.html +4 -38
- data/lib/rmobio/doc/classes/Rmobio/Rxml/XformsTransformer.src/M000029.html +4 -38
- data/lib/rmobio/doc/classes/Rmobio/Rxml/XformsTransformer.src/M000030.html +38 -4
- data/lib/rmobio/doc/classes/Rmobio/Utils.html +41 -41
- data/lib/rmobio/doc/classes/Rmobio/Utils.src/M000031.html +19 -0
- data/lib/rmobio/doc/classes/Rmobio/Utils.src/M000032.html +61 -0
- data/lib/rmobio/doc/classes/Rmobio/Utils.src/M000033.html +43 -0
- data/lib/rmobio/doc/classes/Rmobio/Utils.src/M000034.html +20 -0
- data/lib/rmobio/doc/classes/Rmobio/Utils.src/M000035.html +28 -0
- data/lib/rmobio/doc/classes/Rmobio/Utils.src/M000036.html +22 -0
- data/lib/rmobio/doc/classes/Rmobio/Utils.src/M000037.html +26 -0
- data/lib/rmobio/doc/classes/Rmobio.html +5 -0
- data/lib/rmobio/doc/created.rid +1 -1
- data/lib/rmobio/doc/files/cas_rb.html +1 -1
- data/lib/rmobio/doc/files/config_manager_rb.html +10 -10
- data/lib/rmobio/doc/files/rxml/base_transformer_rb.html +1 -1
- data/lib/rmobio/doc/files/rxml/xforms_transformer_rb.html +1 -1
- data/lib/rmobio/doc/files/utils_rb.html +1 -1
- data/lib/rmobio/doc/fr_class_index.html +1 -0
- data/lib/rmobio/doc/fr_file_index.html +1 -0
- data/lib/rmobio/doc/fr_method_index.html +21 -12
- data/lib/rmobio/rxml/base_transformer.rb +18 -6
- data/lib/rmobio/rxml/xforms_transformer.rb +59 -141
- metadata +19 -2
@@ -80,13 +80,13 @@
|
|
80
80
|
<h3 class="section-bar">Methods</h3>
|
81
81
|
|
82
82
|
<div class="name-list">
|
83
|
-
<a href="#
|
84
|
-
<a href="#
|
85
|
-
<a href="#
|
86
|
-
<a href="#
|
87
|
-
<a href="#
|
88
|
-
<a href="#
|
89
|
-
<a href="#
|
83
|
+
<a href="#M000034">backURL</a>
|
84
|
+
<a href="#M000035">backurl_xml</a>
|
85
|
+
<a href="#M000031">cacheControl</a>
|
86
|
+
<a href="#M000033">cacheimg</a>
|
87
|
+
<a href="#M000032">cacheloader</a>
|
88
|
+
<a href="#M000037">get_domain</a>
|
89
|
+
<a href="#M000036">logHeaders</a>
|
90
90
|
</div>
|
91
91
|
</div>
|
92
92
|
|
@@ -108,12 +108,12 @@
|
|
108
108
|
<div id="methods">
|
109
109
|
<h3 class="section-bar">Public Class methods</h3>
|
110
110
|
|
111
|
-
<div id="method-
|
112
|
-
<a name="
|
111
|
+
<div id="method-M000037" class="method-detail">
|
112
|
+
<a name="M000037"></a>
|
113
113
|
|
114
114
|
<div class="method-heading">
|
115
|
-
<a href="Utils.src/
|
116
|
-
onclick="popupCode('Utils.src/
|
115
|
+
<a href="Utils.src/M000037.html" target="Code" class="method-signature"
|
116
|
+
onclick="popupCode('Utils.src/M000037.html');return false;">
|
117
117
|
<span class="method-name">get_domain</span><span class="method-args">(uri)</span>
|
118
118
|
</a>
|
119
119
|
</div>
|
@@ -127,19 +127,19 @@ Retrieve the domain string from a given uri
|
|
127
127
|
|
128
128
|
<h3 class="section-bar">Public Instance methods</h3>
|
129
129
|
|
130
|
-
<div id="method-
|
131
|
-
<a name="
|
130
|
+
<div id="method-M000034" class="method-detail">
|
131
|
+
<a name="M000034"></a>
|
132
132
|
|
133
133
|
<div class="method-heading">
|
134
|
-
<a href="Utils.src/
|
135
|
-
onclick="popupCode('Utils.src/
|
134
|
+
<a href="Utils.src/M000034.html" target="Code" class="method-signature"
|
135
|
+
onclick="popupCode('Utils.src/M000034.html');return false;">
|
136
136
|
<span class="method-name">backURL</span><span class="method-args">(key)</span>
|
137
137
|
</a>
|
138
138
|
</div>
|
139
139
|
|
140
140
|
<div class="method-description">
|
141
141
|
<p>
|
142
|
-
#== <a href="Utils.html#
|
142
|
+
#== <a href="Utils.html#M000034">backURL</a>(key) This utility handles back
|
143
143
|
url to GLP if page is cached. It expects params[:burl] or a session key and
|
144
144
|
renders the following xml data back to the caller:
|
145
145
|
</p>
|
@@ -166,7 +166,7 @@ To access the backurl from your xfroms, use the following pattern:
|
|
166
166
|
</pre>
|
167
167
|
<p>
|
168
168
|
Where the controller should provide a "storeBackurl" method that
|
169
|
-
just call this <a href="Utils.html#
|
169
|
+
just call this <a href="Utils.html#M000034">backURL</a> utility:
|
170
170
|
</p>
|
171
171
|
<pre>
|
172
172
|
def storeBackurl
|
@@ -179,12 +179,12 @@ just call this <a href="Utils.html#M000070">backURL</a> utility:
|
|
179
179
|
</div>
|
180
180
|
</div>
|
181
181
|
|
182
|
-
<div id="method-
|
183
|
-
<a name="
|
182
|
+
<div id="method-M000035" class="method-detail">
|
183
|
+
<a name="M000035"></a>
|
184
184
|
|
185
185
|
<div class="method-heading">
|
186
|
-
<a href="Utils.src/
|
187
|
-
onclick="popupCode('Utils.src/
|
186
|
+
<a href="Utils.src/M000035.html" target="Code" class="method-signature"
|
187
|
+
onclick="popupCode('Utils.src/M000035.html');return false;">
|
188
188
|
<span class="method-name">backurl_xml</span><span class="method-args">(key)</span>
|
189
189
|
</a>
|
190
190
|
</div>
|
@@ -196,12 +196,12 @@ if you want to just return partial backurl without headers and no rendering
|
|
196
196
|
</div>
|
197
197
|
</div>
|
198
198
|
|
199
|
-
<div id="method-
|
200
|
-
<a name="
|
199
|
+
<div id="method-M000031" class="method-detail">
|
200
|
+
<a name="M000031"></a>
|
201
201
|
|
202
202
|
<div class="method-heading">
|
203
|
-
<a href="Utils.src/
|
204
|
-
onclick="popupCode('Utils.src/
|
203
|
+
<a href="Utils.src/M000031.html" target="Code" class="method-signature"
|
204
|
+
onclick="popupCode('Utils.src/M000031.html');return false;">
|
205
205
|
<span class="method-name">cacheControl</span><span class="method-args">(cacheStr='priority=P3;max-age=604800')</span>
|
206
206
|
</a>
|
207
207
|
</div>
|
@@ -213,21 +213,21 @@ if you want to just return partial backurl without headers and no rendering
|
|
213
213
|
</div>
|
214
214
|
</div>
|
215
215
|
|
216
|
-
<div id="method-
|
217
|
-
<a name="
|
216
|
+
<div id="method-M000033" class="method-detail">
|
217
|
+
<a name="M000033"></a>
|
218
218
|
|
219
219
|
<div class="method-heading">
|
220
|
-
<a href="Utils.src/
|
221
|
-
onclick="popupCode('Utils.src/
|
220
|
+
<a href="Utils.src/M000033.html" target="Code" class="method-signature"
|
221
|
+
onclick="popupCode('Utils.src/M000033.html');return false;">
|
222
222
|
<span class="method-name">cacheimg</span><span class="method-args">()</span>
|
223
223
|
</a>
|
224
224
|
</div>
|
225
225
|
|
226
226
|
<div class="method-description">
|
227
227
|
<p>
|
228
|
-
#== <a href="Utils.html#
|
228
|
+
#== <a href="Utils.html#M000033">cacheimg</a> #=== A utility method to add
|
229
229
|
cache control to images #=== This utility is deprecated, use <a
|
230
|
-
href="Utils.html#
|
230
|
+
href="Utils.html#M000032">cacheloader</a> instead To add a cache control
|
231
231
|
for an image file in RAILS_ROOT/public/images, edit the configuration file
|
232
232
|
"cachehints.txt with image name and header. Ex:
|
233
233
|
</p>
|
@@ -238,7 +238,7 @@ logo.png: priority=P2;max-age=1296000
|
|
238
238
|
To access the image in your xforms, use the following pattern:
|
239
239
|
<icon>img?name=logo.png</icon> Where the controller should
|
240
240
|
provide an img method that just call this <a
|
241
|
-
href="Utils.html#
|
241
|
+
href="Utils.html#M000033">cacheimg</a> utility.
|
242
242
|
</p>
|
243
243
|
<p>
|
244
244
|
Sample cachehints.txt: Skins_176A2-a.png: priority=P2;max-age=1296000
|
@@ -247,19 +247,19 @@ logo.png: priority=P2;max-age=1296000
|
|
247
247
|
</div>
|
248
248
|
</div>
|
249
249
|
|
250
|
-
<div id="method-
|
251
|
-
<a name="
|
250
|
+
<div id="method-M000032" class="method-detail">
|
251
|
+
<a name="M000032"></a>
|
252
252
|
|
253
253
|
<div class="method-heading">
|
254
|
-
<a href="Utils.src/
|
255
|
-
onclick="popupCode('Utils.src/
|
254
|
+
<a href="Utils.src/M000032.html" target="Code" class="method-signature"
|
255
|
+
onclick="popupCode('Utils.src/M000032.html');return false;">
|
256
256
|
<span class="method-name">cacheloader</span><span class="method-args">()</span>
|
257
257
|
</a>
|
258
258
|
</div>
|
259
259
|
|
260
260
|
<div class="method-description">
|
261
261
|
<p>
|
262
|
-
#== <a href="Utils.html#
|
262
|
+
#== <a href="Utils.html#M000032">cacheloader</a> #=== A utility method to
|
263
263
|
add cache control to images, styles and files To add a cache control, edit
|
264
264
|
the configuration file ‘cachehints.txt’ with filename and
|
265
265
|
header. Here is a ample configuration:
|
@@ -293,12 +293,12 @@ where the controller ‘recipe’ should provide a method
|
|
293
293
|
</div>
|
294
294
|
</div>
|
295
295
|
|
296
|
-
<div id="method-
|
297
|
-
<a name="
|
296
|
+
<div id="method-M000036" class="method-detail">
|
297
|
+
<a name="M000036"></a>
|
298
298
|
|
299
299
|
<div class="method-heading">
|
300
|
-
<a href="Utils.src/
|
301
|
-
onclick="popupCode('Utils.src/
|
300
|
+
<a href="Utils.src/M000036.html" target="Code" class="method-signature"
|
301
|
+
onclick="popupCode('Utils.src/M000036.html');return false;">
|
302
302
|
<span class="method-name">logHeaders</span><span class="method-args">()</span>
|
303
303
|
</a>
|
304
304
|
</div>
|
@@ -0,0 +1,19 @@
|
|
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>
|
7
|
+
<head>
|
8
|
+
<title>cacheControl (Rmobio::Utils)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File utils.rb, line 30</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cacheControl</span>(<span class="ruby-identifier">cacheStr</span>=<span class="ruby-value str">'priority=P3;max-age=604800'</span>)
|
15
|
+
<span class="ruby-identifier">headers</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value str">"Cache-Control"</span>);
|
16
|
+
<span class="ruby-identifier">headers</span>[<span class="ruby-value str">"Cache-Control"</span>] = <span class="ruby-identifier">cacheStr</span>;
|
17
|
+
<span class="ruby-keyword kw">end</span></pre>
|
18
|
+
</body>
|
19
|
+
</html>
|
@@ -0,0 +1,61 @@
|
|
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>
|
7
|
+
<head>
|
8
|
+
<title>cacheloader (Rmobio::Utils)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File utils.rb, line 62</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cacheloader</span>
|
15
|
+
<span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">name</span>=<span class="ruby-identifier">params</span>[<span class="ruby-identifier">:name</span>]).<span class="ruby-identifier">nil?</span>
|
16
|
+
<span class="ruby-comment cmt"># Can't do anything, just return empty content so we don't get 'no</span>
|
17
|
+
<span class="ruby-comment cmt"># template' error.</span>
|
18
|
+
<span class="ruby-identifier">render</span> <span class="ruby-identifier">:text</span> =<span class="ruby-operator">></span> <span class="ruby-value str">''</span>
|
19
|
+
<span class="ruby-keyword kw">return</span>
|
20
|
+
<span class="ruby-keyword kw">end</span>
|
21
|
+
|
22
|
+
<span class="ruby-comment cmt"># Default cache configuration file</span>
|
23
|
+
<span class="ruby-identifier">cache_hints</span> = <span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-identifier">join</span> <span class="ruby-constant">RAILS_ROOT</span>, <span class="ruby-value str">'public/cachehints.txt'</span>
|
24
|
+
|
25
|
+
<span class="ruby-comment cmt"># Add cache header</span>
|
26
|
+
<span class="ruby-identifier">headers</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value str">"Cache-Control"</span>)
|
27
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">file?</span>(<span class="ruby-identifier">cache_hints</span>)
|
28
|
+
<span class="ruby-identifier">file</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">cache_hints</span>,<span class="ruby-value str">"r"</span>)
|
29
|
+
<span class="ruby-identifier">hintsTxt</span> = <span class="ruby-identifier">file</span>.<span class="ruby-identifier">read</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">size</span>(<span class="ruby-identifier">cache_hints</span>))
|
30
|
+
<span class="ruby-identifier">file</span>.<span class="ruby-identifier">close</span>()
|
31
|
+
<span class="ruby-identifier">hintsTxt</span>.<span class="ruby-identifier">each_line</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span>
|
32
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">line</span>.<span class="ruby-identifier">index</span>(<span class="ruby-identifier">name</span>) <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
|
33
|
+
<span class="ruby-identifier">line</span>.<span class="ruby-identifier">scan</span>(<span class="ruby-regexp re">/(.*):(.*)/</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">garbage</span>, <span class="ruby-identifier">ccheader</span><span class="ruby-operator">|</span>
|
34
|
+
<span class="ruby-identifier">headers</span>[<span class="ruby-value str">"Cache-Control"</span>] = <span class="ruby-identifier">ccheader</span>.<span class="ruby-identifier">strip</span>
|
35
|
+
<span class="ruby-keyword kw">end</span>
|
36
|
+
<span class="ruby-keyword kw">break</span>
|
37
|
+
<span class="ruby-keyword kw">end</span>
|
38
|
+
<span class="ruby-keyword kw">end</span>
|
39
|
+
<span class="ruby-keyword kw">end</span>
|
40
|
+
|
41
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">name</span><span class="ruby-operator">=~</span> <span class="ruby-regexp re">/.png$/</span>
|
42
|
+
<span class="ruby-comment cmt"># for now hardcode the image directory</span>
|
43
|
+
<span class="ruby-identifier">filePath</span> = <span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-identifier">join</span> <span class="ruby-constant">RAILS_ROOT</span>, <span class="ruby-value str">'public/images/'</span>, <span class="ruby-identifier">name</span>
|
44
|
+
<span class="ruby-identifier">file</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">filePath</span>,<span class="ruby-value str">"rb"</span>)
|
45
|
+
<span class="ruby-identifier">filecontents</span> = <span class="ruby-identifier">file</span>.<span class="ruby-identifier">read</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">size</span>(<span class="ruby-identifier">filePath</span>))
|
46
|
+
<span class="ruby-identifier">file</span>.<span class="ruby-identifier">close</span>()
|
47
|
+
|
48
|
+
<span class="ruby-identifier">headers</span>[<span class="ruby-value str">"Content-Type"</span>] = <span class="ruby-value str">"image/png"</span>
|
49
|
+
|
50
|
+
<span class="ruby-identifier">render</span> <span class="ruby-identifier">:text</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">filecontents</span>
|
51
|
+
<span class="ruby-keyword kw">return</span>
|
52
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">name</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/.xfs$/</span> <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">name</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/.rxf/</span>
|
53
|
+
<span class="ruby-identifier">headers</span>[<span class="ruby-value str">"Content-Type"</span>] = <span class="ruby-value str">"application/mform"</span>
|
54
|
+
<span class="ruby-keyword kw">else</span>
|
55
|
+
<span class="ruby-identifier">headers</span>[<span class="ruby-value str">"Content-Type"</span>] = <span class="ruby-value str">"application/xml"</span>
|
56
|
+
<span class="ruby-keyword kw">end</span>
|
57
|
+
|
58
|
+
<span class="ruby-identifier">render</span> <span class="ruby-identifier">:template</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">name</span>
|
59
|
+
<span class="ruby-keyword kw">end</span></pre>
|
60
|
+
</body>
|
61
|
+
</html>
|
@@ -0,0 +1,43 @@
|
|
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>
|
7
|
+
<head>
|
8
|
+
<title>cacheimg (Rmobio::Utils)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File utils.rb, line 123</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cacheimg</span>
|
15
|
+
<span class="ruby-identifier">public_folder</span> = <span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-identifier">join</span> <span class="ruby-constant">RAILS_ROOT</span>, <span class="ruby-value str">"public/images"</span>
|
16
|
+
<span class="ruby-identifier">filePath</span> = <span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-identifier">join</span> <span class="ruby-constant">RAILS_ROOT</span>, <span class="ruby-value str">"public/images"</span>, <span class="ruby-identifier">params</span>[<span class="ruby-value str">'name'</span>]
|
17
|
+
<span class="ruby-identifier">file</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">filePath</span>,<span class="ruby-value str">"r"</span>)
|
18
|
+
<span class="ruby-identifier">filecontents</span> = <span class="ruby-identifier">file</span>.<span class="ruby-identifier">read</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">size</span>(<span class="ruby-identifier">filePath</span>))
|
19
|
+
<span class="ruby-identifier">file</span>.<span class="ruby-identifier">close</span>()
|
20
|
+
|
21
|
+
|
22
|
+
<span class="ruby-identifier">headers</span>[<span class="ruby-value str">"Content-Type"</span>] = <span class="ruby-value str">"image/png"</span>
|
23
|
+
<span class="ruby-identifier">headers</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value str">"Cache-Control"</span>)
|
24
|
+
<span class="ruby-identifier">fileDir</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-identifier">filePath</span>)
|
25
|
+
<span class="ruby-identifier">fileName</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span>(<span class="ruby-identifier">filePath</span>)
|
26
|
+
<span class="ruby-identifier">hints</span> = <span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-identifier">join</span> <span class="ruby-identifier">fileDir</span>, <span class="ruby-value str">"cachehints.txt"</span>
|
27
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">file?</span>(<span class="ruby-identifier">hints</span>)
|
28
|
+
<span class="ruby-identifier">file</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">hints</span>,<span class="ruby-value str">"r"</span>)
|
29
|
+
<span class="ruby-identifier">hintsTxt</span> = <span class="ruby-identifier">file</span>.<span class="ruby-identifier">read</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">size</span>(<span class="ruby-identifier">hints</span>))
|
30
|
+
<span class="ruby-identifier">file</span>.<span class="ruby-identifier">close</span>()
|
31
|
+
<span class="ruby-identifier">hintsTxt</span>.<span class="ruby-identifier">each_line</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span>
|
32
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">line</span>.<span class="ruby-identifier">index</span>(<span class="ruby-identifier">fileName</span>) <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
|
33
|
+
<span class="ruby-identifier">line</span>.<span class="ruby-identifier">scan</span>(<span class="ruby-regexp re">/(.*):(.*)/</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">garbage</span>, <span class="ruby-identifier">ccheader</span><span class="ruby-operator">|</span>
|
34
|
+
<span class="ruby-identifier">headers</span>[<span class="ruby-value str">"Cache-Control"</span>] = <span class="ruby-identifier">ccheader</span>.<span class="ruby-identifier">strip</span>
|
35
|
+
<span class="ruby-keyword kw">end</span>
|
36
|
+
<span class="ruby-keyword kw">break</span>
|
37
|
+
<span class="ruby-keyword kw">end</span>
|
38
|
+
<span class="ruby-keyword kw">end</span>
|
39
|
+
<span class="ruby-keyword kw">end</span>
|
40
|
+
<span class="ruby-identifier">render</span> <span class="ruby-identifier">:text</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">filecontents</span>
|
41
|
+
<span class="ruby-keyword kw">end</span></pre>
|
42
|
+
</body>
|
43
|
+
</html>
|
@@ -0,0 +1,20 @@
|
|
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>
|
7
|
+
<head>
|
8
|
+
<title>backURL (Rmobio::Utils)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File utils.rb, line 178</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">backURL</span>(<span class="ruby-identifier">key</span>)
|
15
|
+
<span class="ruby-identifier">url</span> = <span class="ruby-identifier">backurl_xml</span>(<span class="ruby-identifier">key</span>)
|
16
|
+
<span class="ruby-identifier">headers</span>[<span class="ruby-value str">'Content-Type'</span>]=<span class="ruby-value str">'application/xml'</span>
|
17
|
+
<span class="ruby-identifier">render</span> <span class="ruby-identifier">:text</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"<data xmlns=\"\">"</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">url</span> <span class="ruby-operator">+</span> <span class="ruby-value str">"</data>"</span>
|
18
|
+
<span class="ruby-keyword kw">end</span></pre>
|
19
|
+
</body>
|
20
|
+
</html>
|
@@ -0,0 +1,28 @@
|
|
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>
|
7
|
+
<head>
|
8
|
+
<title>backurl_xml (Rmobio::Utils)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File utils.rb, line 186</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">backurl_xml</span>(<span class="ruby-identifier">key</span>)
|
15
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:burl</span>]
|
16
|
+
<span class="ruby-identifier">url</span> = <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:burl</span>].<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/&/</span>,<span class="ruby-value str">'&amp;'</span>)
|
17
|
+
<span class="ruby-identifier">session</span>[<span class="ruby-identifier">key</span>] = <span class="ruby-identifier">url</span>
|
18
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">session</span>[<span class="ruby-identifier">key</span>]
|
19
|
+
<span class="ruby-identifier">url</span> = <span class="ruby-identifier">session</span>[<span class="ruby-identifier">key</span>]
|
20
|
+
<span class="ruby-keyword kw">else</span>
|
21
|
+
<span class="ruby-comment cmt"># don't know what to do, just return an empty url</span>
|
22
|
+
<span class="ruby-identifier">url</span> = <span class="ruby-value str">''</span>
|
23
|
+
<span class="ruby-keyword kw">end</span>
|
24
|
+
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-node">"back url #{key}: #{url}"</span>)
|
25
|
+
<span class="ruby-value str">"<burl>"</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">url</span> <span class="ruby-operator">+</span> <span class="ruby-value str">"</burl>"</span>
|
26
|
+
<span class="ruby-keyword kw">end</span></pre>
|
27
|
+
</body>
|
28
|
+
</html>
|
@@ -0,0 +1,22 @@
|
|
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>
|
7
|
+
<head>
|
8
|
+
<title>logHeaders (Rmobio::Utils)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File utils.rb, line 200</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">logHeaders</span>
|
15
|
+
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>( <span class="ruby-value str">"Logging Headers..."</span>)
|
16
|
+
<span class="ruby-identifier">request</span>.<span class="ruby-identifier">env</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">header</span><span class="ruby-operator">|</span>
|
17
|
+
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>( <span class="ruby-identifier">header</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">+</span> <span class="ruby-value str">': '</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">request</span>.<span class="ruby-identifier">env</span>[<span class="ruby-identifier">header</span>].<span class="ruby-identifier">to_s</span>)
|
18
|
+
<span class="ruby-keyword kw">end</span>
|
19
|
+
<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-value str">"End of Headers..."</span>)
|
20
|
+
<span class="ruby-keyword kw">end</span></pre>
|
21
|
+
</body>
|
22
|
+
</html>
|
@@ -0,0 +1,26 @@
|
|
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>
|
7
|
+
<head>
|
8
|
+
<title>get_domain (Rmobio::Utils)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File utils.rb, line 209</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">get_domain</span>(<span class="ruby-identifier">uri</span>)
|
15
|
+
<span class="ruby-identifier">uritokens</span> = <span class="ruby-identifier">uri</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">'/'</span>)
|
16
|
+
<span class="ruby-identifier">uritokens</span>.<span class="ruby-identifier">each_with_index</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">token</span>,<span class="ruby-identifier">index</span><span class="ruby-operator">|</span>
|
17
|
+
<span class="ruby-keyword kw">if</span>(<span class="ruby-identifier">token</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'w'</span>)
|
18
|
+
<span class="ruby-ivar">@domain</span> = <span class="ruby-identifier">uritokens</span>[<span class="ruby-identifier">index</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>]
|
19
|
+
<span class="ruby-constant">RAILS_DEFAULT_LOGGER</span>.<span class="ruby-identifier">debug</span> <span class="ruby-value str">'Utils: Setting domain to '</span> <span class="ruby-operator">+</span>
|
20
|
+
<span class="ruby-ivar">@domain</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'...'</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-keyword kw">not</span> <span class="ruby-keyword kw">defined?</span> <span class="ruby-constant">RAILS_DEFAULT_LOGGER</span>
|
21
|
+
<span class="ruby-keyword kw">end</span>
|
22
|
+
<span class="ruby-keyword kw">end</span>
|
23
|
+
<span class="ruby-ivar">@domain</span>
|
24
|
+
<span class="ruby-keyword kw">end</span></pre>
|
25
|
+
</body>
|
26
|
+
</html>
|
@@ -58,6 +58,10 @@
|
|
58
58
|
<a href="../files/rxml/xforms_transformer_rb.html">
|
59
59
|
rxml/xforms_transformer.rb
|
60
60
|
</a>
|
61
|
+
<br />
|
62
|
+
<a href="../files/utils_rb.html">
|
63
|
+
utils.rb
|
64
|
+
</a>
|
61
65
|
<br />
|
62
66
|
</td>
|
63
67
|
</tr>
|
@@ -88,6 +92,7 @@
|
|
88
92
|
<h3 class="section-bar">Classes and Modules</h3>
|
89
93
|
|
90
94
|
Module <a href="Rmobio/Rxml.html" class="link">Rmobio::Rxml</a><br />
|
95
|
+
Module <a href="Rmobio/Utils.html" class="link">Rmobio::Utils</a><br />
|
91
96
|
|
92
97
|
</div>
|
93
98
|
|
data/lib/rmobio/doc/created.rid
CHANGED
@@ -1 +1 @@
|
|
1
|
-
Wed, 23 Apr 2008
|
1
|
+
Wed, 23 Apr 2008 16:11:35 -0700
|
@@ -56,7 +56,7 @@
|
|
56
56
|
</tr>
|
57
57
|
<tr class="top-aligned-row">
|
58
58
|
<td><strong>Last Update:</strong></td>
|
59
|
-
<td>
|
59
|
+
<td>Wed Apr 23 13:48:05 -0700 2008</td>
|
60
60
|
</tr>
|
61
61
|
</table>
|
62
62
|
</div>
|
@@ -103,9 +103,9 @@ config_manager, perform the following steps:
|
|
103
103
|
|
104
104
|
</li>
|
105
105
|
</ol>
|
106
|
-
<
|
107
|
-
(we want to load the configuration statically):
|
108
|
-
</
|
106
|
+
<pre>
|
107
|
+
(we want to load the configuration statically):
|
108
|
+
</pre>
|
109
109
|
<p>
|
110
110
|
<pre>require ‘rmobio/config_manager’</pre>
|
111
111
|
</p>
|
@@ -122,9 +122,9 @@ config_manager, perform the following steps:
|
|
122
122
|
|
123
123
|
</li>
|
124
124
|
</ol>
|
125
|
-
<
|
126
|
-
called "ad_network" with a value of "ad_sense")
|
127
|
-
</
|
125
|
+
<pre>
|
126
|
+
called "ad_network" with a value of "ad_sense")
|
127
|
+
</pre>
|
128
128
|
<p>
|
129
129
|
<pre>
|
130
130
|
</p>
|
@@ -140,9 +140,9 @@ called "ad_network" with a value of "ad_sense")
|
|
140
140
|
|
141
141
|
</li>
|
142
142
|
</ol>
|
143
|
-
<
|
144
|
-
MOBIO_CONFIG[
|
145
|
-
</
|
143
|
+
<pre>
|
144
|
+
MOBIO_CONFIG['ad_network']
|
145
|
+
</pre>
|
146
146
|
|
147
147
|
</div>
|
148
148
|
|
@@ -23,6 +23,7 @@
|
|
23
23
|
<a href="classes/Rmobio.html">Rmobio</a><br />
|
24
24
|
<a href="classes/Rmobio/Rxml.html">Rmobio::Rxml</a><br />
|
25
25
|
<a href="classes/Rmobio/Rxml/XformsTransformer.html">Rmobio::Rxml::XformsTransformer</a><br />
|
26
|
+
<a href="classes/Rmobio/Utils.html">Rmobio::Utils</a><br />
|
26
27
|
</div>
|
27
28
|
</div>
|
28
29
|
</body>
|