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.
Files changed (53) hide show
  1. data/lib/rmobio/doc/classes/Rmobio/Cas/Client.html +15 -15
  2. data/lib/rmobio/doc/classes/Rmobio/Cas/Client.src/M000059.html +33 -0
  3. data/lib/rmobio/doc/classes/Rmobio/Cas/Client.src/M000060.html +33 -0
  4. data/lib/rmobio/doc/classes/Rmobio/Cas/Client.src/M000061.html +27 -0
  5. data/lib/rmobio/doc/classes/Rmobio/Cas/MobioCasFilter.html +12 -12
  6. data/lib/rmobio/doc/classes/Rmobio/Cas/MobioCasFilter.src/M000064.html +21 -0
  7. data/lib/rmobio/doc/classes/Rmobio/Cas/MobioCasFilter.src/M000065.html +50 -0
  8. data/lib/rmobio/doc/classes/Rmobio/Cas/MobioValidationResponse.html +10 -10
  9. data/lib/rmobio/doc/classes/Rmobio/Cas/MobioValidationResponse.src/M000062.html +19 -0
  10. data/lib/rmobio/doc/classes/Rmobio/Cas/MobioValidationResponse.src/M000063.html +31 -0
  11. data/lib/rmobio/doc/classes/Rmobio/ConfigManager.html +5 -0
  12. data/lib/rmobio/doc/classes/Rmobio/ConfigManager.src/M000001.html +11 -8
  13. data/lib/rmobio/doc/classes/Rmobio/Rxml/BaseTransformer.html +45 -0
  14. data/lib/rmobio/doc/classes/Rmobio/Rxml/BaseTransformer.src/M000056.html +17 -0
  15. data/lib/rmobio/doc/classes/Rmobio/Rxml/BaseTransformer.src/M000057.html +17 -0
  16. data/lib/rmobio/doc/classes/Rmobio/Rxml/BaseTransformer.src/M000058.html +17 -0
  17. data/lib/rmobio/doc/classes/Rmobio/Rxml/XformsTransformer.html +174 -111
  18. data/lib/rmobio/doc/classes/Rmobio/Rxml/XformsTransformer.src/M000016.html +3 -3
  19. data/lib/rmobio/doc/classes/Rmobio/Rxml/XformsTransformer.src/M000017.html +5 -5
  20. data/lib/rmobio/doc/classes/Rmobio/Rxml/XformsTransformer.src/M000018.html +5 -5
  21. data/lib/rmobio/doc/classes/Rmobio/Rxml/XformsTransformer.src/M000019.html +6 -6
  22. data/lib/rmobio/doc/classes/Rmobio/Rxml/XformsTransformer.src/M000020.html +5 -11
  23. data/lib/rmobio/doc/classes/Rmobio/Rxml/XformsTransformer.src/M000021.html +6 -13
  24. data/lib/rmobio/doc/classes/Rmobio/Rxml/XformsTransformer.src/M000022.html +9 -18
  25. data/lib/rmobio/doc/classes/Rmobio/Rxml/XformsTransformer.src/M000023.html +12 -19
  26. data/lib/rmobio/doc/classes/Rmobio/Rxml/XformsTransformer.src/M000024.html +21 -4
  27. data/lib/rmobio/doc/classes/Rmobio/Rxml/XformsTransformer.src/M000025.html +20 -9
  28. data/lib/rmobio/doc/classes/Rmobio/Rxml/XformsTransformer.src/M000026.html +4 -4
  29. data/lib/rmobio/doc/classes/Rmobio/Rxml/XformsTransformer.src/M000027.html +9 -4
  30. data/lib/rmobio/doc/classes/Rmobio/Rxml/XformsTransformer.src/M000028.html +4 -38
  31. data/lib/rmobio/doc/classes/Rmobio/Rxml/XformsTransformer.src/M000029.html +4 -38
  32. data/lib/rmobio/doc/classes/Rmobio/Rxml/XformsTransformer.src/M000030.html +38 -4
  33. data/lib/rmobio/doc/classes/Rmobio/Utils.html +41 -41
  34. data/lib/rmobio/doc/classes/Rmobio/Utils.src/M000031.html +19 -0
  35. data/lib/rmobio/doc/classes/Rmobio/Utils.src/M000032.html +61 -0
  36. data/lib/rmobio/doc/classes/Rmobio/Utils.src/M000033.html +43 -0
  37. data/lib/rmobio/doc/classes/Rmobio/Utils.src/M000034.html +20 -0
  38. data/lib/rmobio/doc/classes/Rmobio/Utils.src/M000035.html +28 -0
  39. data/lib/rmobio/doc/classes/Rmobio/Utils.src/M000036.html +22 -0
  40. data/lib/rmobio/doc/classes/Rmobio/Utils.src/M000037.html +26 -0
  41. data/lib/rmobio/doc/classes/Rmobio.html +5 -0
  42. data/lib/rmobio/doc/created.rid +1 -1
  43. data/lib/rmobio/doc/files/cas_rb.html +1 -1
  44. data/lib/rmobio/doc/files/config_manager_rb.html +10 -10
  45. data/lib/rmobio/doc/files/rxml/base_transformer_rb.html +1 -1
  46. data/lib/rmobio/doc/files/rxml/xforms_transformer_rb.html +1 -1
  47. data/lib/rmobio/doc/files/utils_rb.html +1 -1
  48. data/lib/rmobio/doc/fr_class_index.html +1 -0
  49. data/lib/rmobio/doc/fr_file_index.html +1 -0
  50. data/lib/rmobio/doc/fr_method_index.html +21 -12
  51. data/lib/rmobio/rxml/base_transformer.rb +18 -6
  52. data/lib/rmobio/rxml/xforms_transformer.rb +59 -141
  53. 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="#M000070">backURL</a>&nbsp;&nbsp;
84
- <a href="#M000071">backurl_xml</a>&nbsp;&nbsp;
85
- <a href="#M000067">cacheControl</a>&nbsp;&nbsp;
86
- <a href="#M000069">cacheimg</a>&nbsp;&nbsp;
87
- <a href="#M000068">cacheloader</a>&nbsp;&nbsp;
88
- <a href="#M000073">get_domain</a>&nbsp;&nbsp;
89
- <a href="#M000072">logHeaders</a>&nbsp;&nbsp;
83
+ <a href="#M000034">backURL</a>&nbsp;&nbsp;
84
+ <a href="#M000035">backurl_xml</a>&nbsp;&nbsp;
85
+ <a href="#M000031">cacheControl</a>&nbsp;&nbsp;
86
+ <a href="#M000033">cacheimg</a>&nbsp;&nbsp;
87
+ <a href="#M000032">cacheloader</a>&nbsp;&nbsp;
88
+ <a href="#M000037">get_domain</a>&nbsp;&nbsp;
89
+ <a href="#M000036">logHeaders</a>&nbsp;&nbsp;
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-M000073" class="method-detail">
112
- <a name="M000073"></a>
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/M000073.html" target="Code" class="method-signature"
116
- onclick="popupCode('Utils.src/M000073.html');return false;">
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-M000070" class="method-detail">
131
- <a name="M000070"></a>
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/M000070.html" target="Code" class="method-signature"
135
- onclick="popupCode('Utils.src/M000070.html');return false;">
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#M000070">backURL</a>(key) This utility handles back
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 &quot;storeBackurl&quot; method that
169
- just call this <a href="Utils.html#M000070">backURL</a> utility:
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-M000071" class="method-detail">
183
- <a name="M000071"></a>
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/M000071.html" target="Code" class="method-signature"
187
- onclick="popupCode('Utils.src/M000071.html');return false;">
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-M000067" class="method-detail">
200
- <a name="M000067"></a>
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/M000067.html" target="Code" class="method-signature"
204
- onclick="popupCode('Utils.src/M000067.html');return false;">
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-M000069" class="method-detail">
217
- <a name="M000069"></a>
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/M000069.html" target="Code" class="method-signature"
221
- onclick="popupCode('Utils.src/M000069.html');return false;">
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#M000069">cacheimg</a> #=== A utility method to add
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#M000068">cacheloader</a> instead To add a cache control
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
  &quot;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
  &lt;icon&gt;img?name=logo.png&lt;/icon&gt; Where the controller should
240
240
  provide an img method that just call this <a
241
- href="Utils.html#M000069">cacheimg</a> utility.
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-M000068" class="method-detail">
251
- <a name="M000068"></a>
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/M000068.html" target="Code" class="method-signature"
255
- onclick="popupCode('Utils.src/M000068.html');return false;">
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#M000068">cacheloader</a> #=== A utility method to
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 &#8216;cachehints.txt&#8217; with filename and
265
265
  header. Here is a ample configuration:
@@ -293,12 +293,12 @@ where the controller &#8216;recipe&#8217; should provide a method
293
293
  </div>
294
294
  </div>
295
295
 
296
- <div id="method-M000072" class="method-detail">
297
- <a name="M000072"></a>
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/M000072.html" target="Code" class="method-signature"
301
- onclick="popupCode('Utils.src/M000072.html');return false;">
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">&quot;Cache-Control&quot;</span>);
16
+ <span class="ruby-identifier">headers</span>[<span class="ruby-value str">&quot;Cache-Control&quot;</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">&gt;</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">&quot;Cache-Control&quot;</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">&quot;r&quot;</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">&quot;Cache-Control&quot;</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">&quot;rb&quot;</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">&quot;Content-Type&quot;</span>] = <span class="ruby-value str">&quot;image/png&quot;</span>
49
+
50
+ <span class="ruby-identifier">render</span> <span class="ruby-identifier">:text</span> =<span class="ruby-operator">&gt;</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">&quot;Content-Type&quot;</span>] = <span class="ruby-value str">&quot;application/mform&quot;</span>
54
+ <span class="ruby-keyword kw">else</span>
55
+ <span class="ruby-identifier">headers</span>[<span class="ruby-value str">&quot;Content-Type&quot;</span>] = <span class="ruby-value str">&quot;application/xml&quot;</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">&gt;</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">&quot;public/images&quot;</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">&quot;public/images&quot;</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">&quot;r&quot;</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">&quot;Content-Type&quot;</span>] = <span class="ruby-value str">&quot;image/png&quot;</span>
23
+ <span class="ruby-identifier">headers</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value str">&quot;Cache-Control&quot;</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">&quot;cachehints.txt&quot;</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">&quot;r&quot;</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">&quot;Cache-Control&quot;</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">&gt;</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">&gt;</span> <span class="ruby-value str">&quot;&lt;data xmlns=\&quot;\&quot;&gt;&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">url</span> <span class="ruby-operator">+</span> <span class="ruby-value str">&quot;&lt;/data&gt;&quot;</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">/&amp;/</span>,<span class="ruby-value str">'&amp;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">&quot;back url #{key}: #{url}&quot;</span>)
25
+ <span class="ruby-value str">&quot;&lt;burl&gt;&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">url</span> <span class="ruby-operator">+</span> <span class="ruby-value str">&quot;&lt;/burl&gt;&quot;</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">&quot;Logging Headers...&quot;</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">&quot;End of Headers...&quot;</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
 
@@ -1 +1 @@
1
- Wed, 23 Apr 2008 12:11:44 -0700
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>Thu Mar 27 11:57:23 -0700 2008</td>
59
+ <td>Wed Apr 23 13:48:05 -0700 2008</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Thu Apr 17 11:03:06 -0700 2008</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
- <p>
107
- (we want to load the configuration statically):
108
- </p>
106
+ <pre>
107
+ (we want to load the configuration statically):
108
+ </pre>
109
109
  <p>
110
110
  &lt;pre&gt;require &#8216;rmobio/config_manager&#8217;&lt;/pre&gt;
111
111
  </p>
@@ -122,9 +122,9 @@ config_manager, perform the following steps:
122
122
 
123
123
  </li>
124
124
  </ol>
125
- <p>
126
- called &quot;ad_network&quot; with a value of &quot;ad_sense&quot;)
127
- </p>
125
+ <pre>
126
+ called &quot;ad_network&quot; with a value of &quot;ad_sense&quot;)
127
+ </pre>
128
128
  <p>
129
129
  &lt;pre&gt;
130
130
  </p>
@@ -140,9 +140,9 @@ called &quot;ad_network&quot; with a value of &quot;ad_sense&quot;)
140
140
 
141
141
  </li>
142
142
  </ol>
143
- <p>
144
- MOBIO_CONFIG[&#8216;ad_network&#8217;]
145
- </p>
143
+ <pre>
144
+ MOBIO_CONFIG['ad_network']
145
+ </pre>
146
146
 
147
147
  </div>
148
148
 
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Tue Apr 22 11:35:07 -0700 2008</td>
59
+ <td>Wed Apr 23 12:19:14 -0700 2008</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Wed Apr 23 12:11:39 -0700 2008</td>
59
+ <td>Wed Apr 23 16:11:10 -0700 2008</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Fri Apr 18 13:46:20 -0700 2008</td>
59
+ <td>Wed Apr 23 14:20:14 -0700 2008</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
@@ -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>
@@ -21,6 +21,7 @@
21
21
  <h1 class="section-bar">Files</h1>
22
22
  <div id="index-entries">
23
23
  <a href="files/rxml/xforms_transformer_rb.html">rxml/xforms_transformer.rb</a><br />
24
+ <a href="files/utils_rb.html">utils.rb</a><br />
24
25
  </div>
25
26
  </div>
26
27
  </body>