simplemapper 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (150) hide show
  1. data/LICENSE +1 -1
  2. data/README +16 -0
  3. data/Rakefile +1 -1
  4. data/doc/classes/Array.html +24 -5
  5. data/doc/classes/{Inflector.src/M000017.html → Array.src/M000005.html} +4 -8
  6. data/doc/classes/Array.src/{M000001.html → M000006.html} +1 -1
  7. data/doc/classes/Callbacks.html +15 -15
  8. data/doc/classes/Callbacks.src/{M000037.html → M000040.html} +0 -0
  9. data/doc/classes/Callbacks.src/{M000038.html → M000041.html} +0 -0
  10. data/doc/classes/Callbacks.src/{M000039.html → M000042.html} +0 -0
  11. data/doc/classes/Enumerable.html +5 -5
  12. data/doc/classes/Enumerable.src/{M000040.html → M000043.html} +1 -1
  13. data/doc/classes/Hash.html +23 -4
  14. data/doc/classes/Hash.src/M000002.html +6 -4
  15. data/doc/classes/Hash.src/M000003.html +4 -20
  16. data/doc/classes/Hash.src/M000004.html +34 -0
  17. data/doc/classes/Inflector/Inflections.html +40 -40
  18. data/doc/classes/Inflector/Inflections.src/M000034.html +4 -5
  19. data/doc/classes/Inflector/Inflections.src/M000035.html +4 -4
  20. data/doc/classes/Inflector/Inflections.src/M000036.html +4 -9
  21. data/doc/classes/Inflector/Inflections.src/M000037.html +19 -0
  22. data/doc/classes/Inflector/Inflections.src/{M000031.html → M000038.html} +4 -4
  23. data/doc/classes/Inflector/Inflections.src/M000039.html +23 -0
  24. data/doc/classes/Inflector.html +82 -82
  25. data/doc/classes/Inflector.src/M000020.html +6 -6
  26. data/doc/classes/Inflector.src/M000021.html +11 -4
  27. data/doc/classes/Inflector.src/M000022.html +11 -8
  28. data/doc/classes/Inflector.src/M000023.html +8 -4
  29. data/doc/classes/Inflector.src/M000024.html +4 -4
  30. data/doc/classes/Inflector.src/M000025.html +8 -4
  31. data/doc/classes/Inflector.src/M000026.html +4 -4
  32. data/doc/classes/Inflector.src/M000027.html +4 -5
  33. data/doc/classes/Inflector.src/M000028.html +4 -4
  34. data/doc/classes/Inflector.src/M000029.html +4 -8
  35. data/doc/classes/Inflector.src/M000030.html +5 -13
  36. data/doc/classes/Inflector.src/M000031.html +18 -0
  37. data/doc/classes/Inflector.src/M000032.html +22 -0
  38. data/doc/classes/Inflector.src/M000033.html +27 -0
  39. data/doc/classes/Merb/Request.html +5 -5
  40. data/doc/classes/Merb/Request.src/{M000041.html → M000044.html} +1 -1
  41. data/doc/classes/OAuth/RequestProxy/Base.html +5 -5
  42. data/doc/classes/OAuth/RequestProxy/Base.src/{M000012.html → M000015.html} +1 -1
  43. data/doc/classes/OAuth/Signature/Base.html +5 -5
  44. data/doc/classes/OAuth/Signature/Base.src/{M000011.html → M000014.html} +1 -1
  45. data/doc/classes/OAuthController.html +25 -25
  46. data/doc/classes/OAuthController.src/M000008.html +8 -11
  47. data/doc/classes/OAuthController.src/M000009.html +4 -5
  48. data/doc/classes/OAuthController.src/{M000007.html → M000010.html} +1 -1
  49. data/doc/classes/OAuthController.src/M000011.html +25 -0
  50. data/doc/classes/OAuthController.src/M000012.html +19 -0
  51. data/doc/classes/Object.html +18 -6
  52. data/doc/classes/Object.src/{M000010.html → M000013.html} +2 -2
  53. data/doc/classes/Proc.html +5 -5
  54. data/doc/classes/Proc.src/{M000004.html → M000007.html} +0 -0
  55. data/doc/classes/Serialize.html +20 -20
  56. data/doc/classes/Serialize.src/M000016.html +7 -32
  57. data/doc/classes/Serialize.src/{M000014.html → M000017.html} +1 -1
  58. data/doc/classes/Serialize.src/{M000015.html → M000018.html} +1 -1
  59. data/doc/classes/Serialize.src/M000019.html +18 -0
  60. data/doc/classes/SimpleMapper/Base.html +149 -124
  61. data/doc/classes/SimpleMapper/Base.src/M000067.html +3 -8
  62. data/doc/classes/SimpleMapper/Base.src/M000068.html +3 -13
  63. data/doc/classes/SimpleMapper/Base.src/M000069.html +4 -4
  64. data/doc/classes/SimpleMapper/Base.src/M000070.html +15 -4
  65. data/doc/classes/SimpleMapper/Base.src/M000071.html +7 -4
  66. data/doc/classes/SimpleMapper/Base.src/M000072.html +4 -5
  67. data/doc/classes/SimpleMapper/Base.src/M000073.html +12 -9
  68. data/doc/classes/SimpleMapper/Base.src/M000074.html +8 -5
  69. data/doc/classes/SimpleMapper/Base.src/M000075.html +5 -7
  70. data/doc/classes/SimpleMapper/Base.src/M000076.html +5 -5
  71. data/doc/classes/SimpleMapper/Base.src/M000077.html +6 -5
  72. data/doc/classes/SimpleMapper/Base.src/M000078.html +10 -6
  73. data/doc/classes/SimpleMapper/Base.src/M000079.html +4 -4
  74. data/doc/classes/SimpleMapper/Base.src/M000080.html +6 -4
  75. data/doc/classes/SimpleMapper/Base.src/M000081.html +4 -5
  76. data/doc/classes/SimpleMapper/Base.src/M000082.html +4 -6
  77. data/doc/classes/SimpleMapper/Base.src/M000083.html +5 -10
  78. data/doc/classes/SimpleMapper/Base.src/M000084.html +4 -4
  79. data/doc/classes/SimpleMapper/{HttpAdapter.src/M000057.html → Base.src/M000085.html} +4 -4
  80. data/doc/classes/SimpleMapper/Base.src/M000086.html +19 -0
  81. data/doc/classes/SimpleMapper/Base.src/M000087.html +20 -0
  82. data/doc/classes/SimpleMapper/Base.src/M000088.html +24 -0
  83. data/doc/classes/SimpleMapper/Base.src/M000089.html +18 -0
  84. data/doc/classes/SimpleMapper/HttpAdapter.html +40 -40
  85. data/doc/classes/SimpleMapper/HttpAdapter.src/{M000056.html → M000059.html} +1 -1
  86. data/doc/classes/SimpleMapper/HttpAdapter.src/M000060.html +4 -4
  87. data/doc/classes/SimpleMapper/HttpAdapter.src/M000061.html +5 -4
  88. data/doc/classes/SimpleMapper/HttpAdapter.src/M000063.html +5 -4
  89. data/doc/classes/SimpleMapper/HttpAdapter.src/M000064.html +18 -0
  90. data/doc/classes/SimpleMapper/HttpAdapter.src/{M000062.html → M000065.html} +1 -1
  91. data/doc/classes/SimpleMapper/HttpAdapter.src/M000066.html +18 -0
  92. data/doc/classes/SimpleMapper/HttpOAuthExtension.html +22 -22
  93. data/doc/classes/SimpleMapper/HttpOAuthExtension.src/M000051.html +27 -4
  94. data/doc/classes/SimpleMapper/HttpOAuthExtension.src/{M000049.html → M000052.html} +1 -3
  95. data/doc/classes/SimpleMapper/HttpOAuthExtension.src/{M000050.html → M000053.html} +1 -1
  96. data/doc/classes/SimpleMapper/HttpOAuthExtension.src/M000054.html +24 -0
  97. data/doc/classes/SimpleMapper/SimpleModel/ClassMethods.html +10 -10
  98. data/doc/classes/SimpleMapper/SimpleModel/ClassMethods.src/{M000046.html → M000049.html} +0 -0
  99. data/doc/classes/SimpleMapper/SimpleModel/ClassMethods.src/{M000047.html → M000050.html} +0 -0
  100. data/doc/classes/SimpleMapper/SimpleModel.html +20 -20
  101. data/doc/classes/SimpleMapper/SimpleModel.src/M000045.html +4 -10
  102. data/doc/classes/SimpleMapper/SimpleModel.src/{M000043.html → M000046.html} +0 -0
  103. data/doc/classes/SimpleMapper/SimpleModel.src/{M000044.html → M000047.html} +0 -0
  104. data/doc/classes/SimpleMapper/SimpleModel.src/M000048.html +24 -0
  105. data/doc/classes/SimpleMapper/XmlFormat/ClassMethods.html +5 -5
  106. data/doc/classes/SimpleMapper/XmlFormat/ClassMethods.src/{M000055.html → M000058.html} +5 -3
  107. data/doc/classes/SimpleMapper/XmlFormat.html +15 -15
  108. data/doc/classes/SimpleMapper/XmlFormat.src/{M000052.html → M000055.html} +1 -1
  109. data/doc/classes/SimpleMapper/XmlFormat.src/{M000053.html → M000056.html} +1 -1
  110. data/doc/classes/SimpleMapper/XmlFormat.src/{M000054.html → M000057.html} +4 -2
  111. data/doc/classes/Time.html +139 -0
  112. data/doc/classes/{OAuthController.src/M000006.html → Time.src/M000001.html} +4 -4
  113. data/doc/created.rid +1 -1
  114. data/doc/files/lib/simple_mapper/adapters/http_adapter_rb.html +2 -1
  115. data/doc/files/lib/simple_mapper/base_rb.html +1 -1
  116. data/doc/files/lib/simple_mapper/default_plugins/callbacks_rb.html +1 -1
  117. data/doc/files/lib/simple_mapper/default_plugins/oauth_rb.html +1 -7
  118. data/doc/files/lib/simple_mapper/default_plugins/options_to_query_rb.html +116 -0
  119. data/doc/files/lib/simple_mapper/default_plugins/simple_model_rb.html +1 -1
  120. data/doc/files/lib/simple_mapper/formats/xml_format_rb.html +3 -1
  121. data/doc/files/lib/simple_mapper/support/bliss_serializer_rb.html +2 -1
  122. data/doc/files/lib/simple_mapper/support/core_ext_rb.html +1 -1
  123. data/doc/files/lib/simple_mapper/support/inflections_rb.html +1 -1
  124. data/doc/files/lib/simple_mapper/support/inflector_rb.html +1 -1
  125. data/doc/files/lib/simple_mapper/support_rb.html +1 -1
  126. data/doc/files/lib/simple_mapper_rb.html +1 -1
  127. data/doc/fr_class_index.html +1 -0
  128. data/doc/fr_file_index.html +1 -0
  129. data/doc/fr_method_index.html +89 -84
  130. data/lib/simple_mapper/adapters/http_adapter.rb +4 -2
  131. data/lib/simple_mapper/base.rb +46 -23
  132. data/lib/simple_mapper/default_plugins/oauth.rb +3 -6
  133. data/lib/simple_mapper/default_plugins/options_to_query.rb +31 -0
  134. data/lib/simple_mapper/formats/xml_format.rb +10 -3
  135. data/lib/simple_mapper/support/bliss_serializer.rb +3 -113
  136. data/lib/simple_mapper/support/core_ext.rb +6 -2
  137. data/lib/simple_mapper/support/inflections.rb +1 -1
  138. metadata +52 -43
  139. data/doc/classes/Inflector/Inflections.src/M000032.html +0 -18
  140. data/doc/classes/Inflector/Inflections.src/M000033.html +0 -18
  141. data/doc/classes/Inflector.src/M000018.html +0 -25
  142. data/doc/classes/Inflector.src/M000019.html +0 -25
  143. data/doc/classes/OAuthController.src/M000005.html +0 -22
  144. data/doc/classes/Serialize.src/M000013.html +0 -21
  145. data/doc/classes/SimpleMapper/Base.src/M000064.html +0 -16
  146. data/doc/classes/SimpleMapper/Base.src/M000065.html +0 -16
  147. data/doc/classes/SimpleMapper/Base.src/M000066.html +0 -22
  148. data/doc/classes/SimpleMapper/HttpAdapter.src/M000058.html +0 -19
  149. data/doc/classes/SimpleMapper/HttpOAuthExtension.src/M000048.html +0 -49
  150. data/doc/classes/SimpleMapper/SimpleModel.src/M000042.html +0 -18
@@ -88,14 +88,14 @@
88
88
  <h3 class="section-bar">Methods</h3>
89
89
 
90
90
  <div class="name-list">
91
- <a href="#M000056">base_uri</a>&nbsp;&nbsp;
92
- <a href="#M000063">delete</a>&nbsp;&nbsp;
93
- <a href="#M000060">get</a>&nbsp;&nbsp;
94
- <a href="#M000057">headers</a>&nbsp;&nbsp;
95
- <a href="#M000058">headers=</a>&nbsp;&nbsp;
96
- <a href="#M000062">post</a>&nbsp;&nbsp;
97
- <a href="#M000061">put</a>&nbsp;&nbsp;
98
- <a href="#M000059">set_headers</a>&nbsp;&nbsp;
91
+ <a href="#M000059">base_uri</a>&nbsp;&nbsp;
92
+ <a href="#M000066">delete</a>&nbsp;&nbsp;
93
+ <a href="#M000063">get</a>&nbsp;&nbsp;
94
+ <a href="#M000060">headers</a>&nbsp;&nbsp;
95
+ <a href="#M000061">headers=</a>&nbsp;&nbsp;
96
+ <a href="#M000065">post</a>&nbsp;&nbsp;
97
+ <a href="#M000064">put</a>&nbsp;&nbsp;
98
+ <a href="#M000062">set_headers</a>&nbsp;&nbsp;
99
99
  </div>
100
100
  </div>
101
101
 
@@ -150,12 +150,12 @@
150
150
  <div id="methods">
151
151
  <h3 class="section-bar">Public Instance methods</h3>
152
152
 
153
- <div id="method-M000056" class="method-detail">
154
- <a name="M000056"></a>
153
+ <div id="method-M000059" class="method-detail">
154
+ <a name="M000059"></a>
155
155
 
156
156
  <div class="method-heading">
157
- <a href="HttpAdapter.src/M000056.html" target="Code" class="method-signature"
158
- onclick="popupCode('HttpAdapter.src/M000056.html');return false;">
157
+ <a href="HttpAdapter.src/M000059.html" target="Code" class="method-signature"
158
+ onclick="popupCode('HttpAdapter.src/M000059.html');return false;">
159
159
  <span class="method-name">base_uri</span><span class="method-args">()</span>
160
160
  </a>
161
161
  </div>
@@ -164,12 +164,12 @@
164
164
  </div>
165
165
  </div>
166
166
 
167
- <div id="method-M000063" class="method-detail">
168
- <a name="M000063"></a>
167
+ <div id="method-M000066" class="method-detail">
168
+ <a name="M000066"></a>
169
169
 
170
170
  <div class="method-heading">
171
- <a href="HttpAdapter.src/M000063.html" target="Code" class="method-signature"
172
- onclick="popupCode('HttpAdapter.src/M000063.html');return false;">
171
+ <a href="HttpAdapter.src/M000066.html" target="Code" class="method-signature"
172
+ onclick="popupCode('HttpAdapter.src/M000066.html');return false;">
173
173
  <span class="method-name">delete</span><span class="method-args">(identifier)</span>
174
174
  </a>
175
175
  </div>
@@ -181,13 +181,13 @@ In the http adapter, the identifier is a url.
181
181
  </div>
182
182
  </div>
183
183
 
184
- <div id="method-M000060" class="method-detail">
185
- <a name="M000060"></a>
184
+ <div id="method-M000063" class="method-detail">
185
+ <a name="M000063"></a>
186
186
 
187
187
  <div class="method-heading">
188
- <a href="HttpAdapter.src/M000060.html" target="Code" class="method-signature"
189
- onclick="popupCode('HttpAdapter.src/M000060.html');return false;">
190
- <span class="method-name">get</span><span class="method-args">(*args)</span>
188
+ <a href="HttpAdapter.src/M000063.html" target="Code" class="method-signature"
189
+ onclick="popupCode('HttpAdapter.src/M000063.html');return false;">
190
+ <span class="method-name">get</span><span class="method-args">(find_options={})</span>
191
191
  </a>
192
192
  </div>
193
193
 
@@ -195,12 +195,12 @@ In the http adapter, the identifier is a url.
195
195
  </div>
196
196
  </div>
197
197
 
198
- <div id="method-M000057" class="method-detail">
199
- <a name="M000057"></a>
198
+ <div id="method-M000060" class="method-detail">
199
+ <a name="M000060"></a>
200
200
 
201
201
  <div class="method-heading">
202
- <a href="HttpAdapter.src/M000057.html" target="Code" class="method-signature"
203
- onclick="popupCode('HttpAdapter.src/M000057.html');return false;">
202
+ <a href="HttpAdapter.src/M000060.html" target="Code" class="method-signature"
203
+ onclick="popupCode('HttpAdapter.src/M000060.html');return false;">
204
204
  <span class="method-name">headers</span><span class="method-args">()</span>
205
205
  </a>
206
206
  </div>
@@ -209,12 +209,12 @@ In the http adapter, the identifier is a url.
209
209
  </div>
210
210
  </div>
211
211
 
212
- <div id="method-M000058" class="method-detail">
213
- <a name="M000058"></a>
212
+ <div id="method-M000061" class="method-detail">
213
+ <a name="M000061"></a>
214
214
 
215
215
  <div class="method-heading">
216
- <a href="HttpAdapter.src/M000058.html" target="Code" class="method-signature"
217
- onclick="popupCode('HttpAdapter.src/M000058.html');return false;">
216
+ <a href="HttpAdapter.src/M000061.html" target="Code" class="method-signature"
217
+ onclick="popupCode('HttpAdapter.src/M000061.html');return false;">
218
218
  <span class="method-name">headers=</span><span class="method-args">(v)</span>
219
219
  </a>
220
220
  </div>
@@ -223,12 +223,12 @@ In the http adapter, the identifier is a url.
223
223
  </div>
224
224
  </div>
225
225
 
226
- <div id="method-M000062" class="method-detail">
227
- <a name="M000062"></a>
226
+ <div id="method-M000065" class="method-detail">
227
+ <a name="M000065"></a>
228
228
 
229
229
  <div class="method-heading">
230
- <a href="HttpAdapter.src/M000062.html" target="Code" class="method-signature"
231
- onclick="popupCode('HttpAdapter.src/M000062.html');return false;">
230
+ <a href="HttpAdapter.src/M000065.html" target="Code" class="method-signature"
231
+ onclick="popupCode('HttpAdapter.src/M000065.html');return false;">
232
232
  <span class="method-name">post</span><span class="method-args">(data)</span>
233
233
  </a>
234
234
  </div>
@@ -237,12 +237,12 @@ In the http adapter, the identifier is a url.
237
237
  </div>
238
238
  </div>
239
239
 
240
- <div id="method-M000061" class="method-detail">
241
- <a name="M000061"></a>
240
+ <div id="method-M000064" class="method-detail">
241
+ <a name="M000064"></a>
242
242
 
243
243
  <div class="method-heading">
244
- <a href="HttpAdapter.src/M000061.html" target="Code" class="method-signature"
245
- onclick="popupCode('HttpAdapter.src/M000061.html');return false;">
244
+ <a href="HttpAdapter.src/M000064.html" target="Code" class="method-signature"
245
+ onclick="popupCode('HttpAdapter.src/M000064.html');return false;">
246
246
  <span class="method-name">put</span><span class="method-args">(identifier,data)</span>
247
247
  </a>
248
248
  </div>
@@ -251,8 +251,8 @@ In the http adapter, the identifier is a url.
251
251
  </div>
252
252
  </div>
253
253
 
254
- <div id="method-M000059" class="method-detail">
255
- <a name="M000059"></a>
254
+ <div id="method-M000062" class="method-detail">
255
+ <a name="M000062"></a>
256
256
 
257
257
  <div class="method-heading">
258
258
  <span class="method-name">set_headers</span><span class="method-args">(v)</span>
@@ -260,7 +260,7 @@ In the http adapter, the identifier is a url.
260
260
 
261
261
  <div class="method-description">
262
262
  <p>
263
- Alias for <a href="HttpAdapter.html#M000057">headers</a>=
263
+ Alias for <a href="HttpAdapter.html#M000060">headers</a>=
264
264
  </p>
265
265
  </div>
266
266
  </div>
@@ -10,7 +10,7 @@
10
10
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/simple_mapper/adapters/http_adapter.rb, line 17</span>
13
+ <pre><span class="ruby-comment cmt"># File lib/simple_mapper/adapters/http_adapter.rb, line 18</span>
14
14
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">base_uri</span>
15
15
  <span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">base_url</span>)
16
16
  <span class="ruby-keyword kw">end</span></pre>
@@ -5,14 +5,14 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>get (SimpleMapper::HttpAdapter)</title>
8
+ <title>headers (SimpleMapper::HttpAdapter)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/simple_mapper/adapters/http_adapter.rb, line 30</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
15
- <span class="ruby-identifier">http</span>.<span class="ruby-identifier">request</span>(<span class="ruby-identifier">request</span>(<span class="ruby-value str">'get'</span>, <span class="ruby-identifier">base_uri</span>.<span class="ruby-identifier">path</span>)).<span class="ruby-identifier">body</span>
13
+ <pre><span class="ruby-comment cmt"># File lib/simple_mapper/adapters/http_adapter.rb, line 22</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">headers</span>
15
+ <span class="ruby-ivar">@headers</span> <span class="ruby-operator">||=</span> {}
16
16
  <span class="ruby-keyword kw">end</span></pre>
17
17
  </body>
18
18
  </html>
@@ -5,14 +5,15 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>put (SimpleMapper::HttpAdapter)</title>
8
+ <title>headers= (SimpleMapper::HttpAdapter)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/simple_mapper/adapters/http_adapter.rb, line 34</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">put</span>(<span class="ruby-identifier">identifier</span>,<span class="ruby-identifier">data</span>)
15
- <span class="ruby-identifier">http</span>.<span class="ruby-identifier">request</span>(<span class="ruby-identifier">request</span>(<span class="ruby-value str">'put'</span>, <span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">identifier</span>).<span class="ruby-identifier">path</span>, <span class="ruby-identifier">data</span>)).<span class="ruby-identifier">body</span>
13
+ <pre><span class="ruby-comment cmt"># File lib/simple_mapper/adapters/http_adapter.rb, line 25</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">headers=</span>(<span class="ruby-identifier">v</span>)
15
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">TypeError</span>, <span class="ruby-value str">&quot;headers set must be a hash&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">v</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>)
16
+ <span class="ruby-identifier">headers</span>.<span class="ruby-identifier">merge!</span>(<span class="ruby-identifier">v</span>)
16
17
  <span class="ruby-keyword kw">end</span></pre>
17
18
  </body>
18
19
  </html>
@@ -5,14 +5,15 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>delete (SimpleMapper::HttpAdapter)</title>
8
+ <title>get (SimpleMapper::HttpAdapter)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/simple_mapper/adapters/http_adapter.rb, line 43</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete</span>(<span class="ruby-identifier">identifier</span>)
15
- <span class="ruby-identifier">http</span>.<span class="ruby-identifier">request</span>(<span class="ruby-identifier">request</span>(<span class="ruby-value str">'delete'</span>, <span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">identifier</span>).<span class="ruby-identifier">path</span>)).<span class="ruby-identifier">body</span>
13
+ <pre><span class="ruby-comment cmt"># File lib/simple_mapper/adapters/http_adapter.rb, line 31</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get</span>(<span class="ruby-identifier">find_options</span>={})
15
+ <span class="ruby-identifier">query</span> = <span class="ruby-identifier">find_options</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-value">? </span><span class="ruby-value str">''</span> <span class="ruby-operator">:</span> (<span class="ruby-value str">'?'</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">find_options</span>.<span class="ruby-identifier">to_query</span>)
16
+ <span class="ruby-identifier">http</span>.<span class="ruby-identifier">request</span>(<span class="ruby-identifier">request</span>(<span class="ruby-value str">'get'</span>, <span class="ruby-identifier">base_uri</span>.<span class="ruby-identifier">path</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">query</span>)).<span class="ruby-identifier">body</span>
16
17
  <span class="ruby-keyword kw">end</span></pre>
17
18
  </body>
18
19
  </html>
@@ -0,0 +1,18 @@
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>put (SimpleMapper::HttpAdapter)</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 lib/simple_mapper/adapters/http_adapter.rb, line 36</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">put</span>(<span class="ruby-identifier">identifier</span>,<span class="ruby-identifier">data</span>)
15
+ <span class="ruby-identifier">http</span>.<span class="ruby-identifier">request</span>(<span class="ruby-identifier">request</span>(<span class="ruby-value str">'put'</span>, <span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">identifier</span>).<span class="ruby-identifier">path</span>, <span class="ruby-identifier">data</span>)).<span class="ruby-identifier">body</span>
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -10,7 +10,7 @@
10
10
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/simple_mapper/adapters/http_adapter.rb, line 38</span>
13
+ <pre><span class="ruby-comment cmt"># File lib/simple_mapper/adapters/http_adapter.rb, line 40</span>
14
14
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">post</span>(<span class="ruby-identifier">data</span>)
15
15
  <span class="ruby-identifier">http</span>.<span class="ruby-identifier">request</span>(<span class="ruby-identifier">request</span>(<span class="ruby-value str">'post'</span>, <span class="ruby-identifier">base_uri</span>.<span class="ruby-identifier">path</span>, <span class="ruby-identifier">data</span>)).<span class="ruby-identifier">body</span>
16
16
  <span class="ruby-keyword kw">end</span></pre>
@@ -0,0 +1,18 @@
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>delete (SimpleMapper::HttpAdapter)</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 lib/simple_mapper/adapters/http_adapter.rb, line 45</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete</span>(<span class="ruby-identifier">identifier</span>)
15
+ <span class="ruby-identifier">http</span>.<span class="ruby-identifier">request</span>(<span class="ruby-identifier">request</span>(<span class="ruby-value str">'delete'</span>, <span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">identifier</span>).<span class="ruby-identifier">path</span>)).<span class="ruby-identifier">body</span>
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -80,10 +80,10 @@
80
80
  <h3 class="section-bar">Methods</h3>
81
81
 
82
82
  <div class="name-list">
83
- <a href="#M000050">oauth</a>&nbsp;&nbsp;
84
- <a href="#M000048">requires_oauth</a>&nbsp;&nbsp;
85
- <a href="#M000051">set_oauth</a>&nbsp;&nbsp;
86
- <a href="#M000049">with_oauth</a>&nbsp;&nbsp;
83
+ <a href="#M000053">oauth</a>&nbsp;&nbsp;
84
+ <a href="#M000051">requires_oauth</a>&nbsp;&nbsp;
85
+ <a href="#M000054">set_oauth</a>&nbsp;&nbsp;
86
+ <a href="#M000052">with_oauth</a>&nbsp;&nbsp;
87
87
  </div>
88
88
  </div>
89
89
 
@@ -105,12 +105,12 @@
105
105
  <div id="methods">
106
106
  <h3 class="section-bar">Public Class methods</h3>
107
107
 
108
- <div id="method-M000049" class="method-detail">
109
- <a name="M000049"></a>
108
+ <div id="method-M000052" class="method-detail">
109
+ <a name="M000052"></a>
110
110
 
111
111
  <div class="method-heading">
112
- <a href="HttpOAuthExtension.src/M000049.html" target="Code" class="method-signature"
113
- onclick="popupCode('HttpOAuthExtension.src/M000049.html');return false;">
112
+ <a href="HttpOAuthExtension.src/M000052.html" target="Code" class="method-signature"
113
+ onclick="popupCode('HttpOAuthExtension.src/M000052.html');return false;">
114
114
  <span class="method-name">with_oauth</span><span class="method-args">(controller) {|if block_given?| ...}</span>
115
115
  </a>
116
116
  </div>
@@ -118,8 +118,8 @@
118
118
  <div class="method-description">
119
119
  <p>
120
120
  Ingeniousity here&#8230; ;) Duplicates the class to give it a temporary
121
- session-attached <a href="HttpOAuthExtension.html#M000050">oauth</a> scope,
122
- sets <a href="HttpOAuthExtension.html#M000050">oauth</a> to the
121
+ session-attached <a href="HttpOAuthExtension.html#M000053">oauth</a> scope,
122
+ sets <a href="HttpOAuthExtension.html#M000053">oauth</a> to the
123
123
  Model-Controller-<a href="../OAuth.html">OAuth</a> class, then makes the
124
124
  class use the original class for all of its instantiation. NOTE: This only
125
125
  really makes the class methods use <a href="../OAuth.html">OAuth</a>. <a
@@ -131,12 +131,12 @@ play the trick as well.
131
131
 
132
132
  <h3 class="section-bar">Public Instance methods</h3>
133
133
 
134
- <div id="method-M000050" class="method-detail">
135
- <a name="M000050"></a>
134
+ <div id="method-M000053" class="method-detail">
135
+ <a name="M000053"></a>
136
136
 
137
137
  <div class="method-heading">
138
- <a href="HttpOAuthExtension.src/M000050.html" target="Code" class="method-signature"
139
- onclick="popupCode('HttpOAuthExtension.src/M000050.html');return false;">
138
+ <a href="HttpOAuthExtension.src/M000053.html" target="Code" class="method-signature"
139
+ onclick="popupCode('HttpOAuthExtension.src/M000053.html');return false;">
140
140
  <span class="method-name">oauth</span><span class="method-args">()</span>
141
141
  </a>
142
142
  </div>
@@ -145,12 +145,12 @@ play the trick as well.
145
145
  </div>
146
146
  </div>
147
147
 
148
- <div id="method-M000048" class="method-detail">
149
- <a name="M000048"></a>
148
+ <div id="method-M000051" class="method-detail">
149
+ <a name="M000051"></a>
150
150
 
151
151
  <div class="method-heading">
152
- <a href="HttpOAuthExtension.src/M000048.html" target="Code" class="method-signature"
153
- onclick="popupCode('HttpOAuthExtension.src/M000048.html');return false;">
152
+ <a href="HttpOAuthExtension.src/M000051.html" target="Code" class="method-signature"
153
+ onclick="popupCode('HttpOAuthExtension.src/M000051.html');return false;">
154
154
  <span class="method-name">requires_oauth</span><span class="method-args">(consumer_key, consumer_secret, options={})</span>
155
155
  </a>
156
156
  </div>
@@ -159,12 +159,12 @@ play the trick as well.
159
159
  </div>
160
160
  </div>
161
161
 
162
- <div id="method-M000051" class="method-detail">
163
- <a name="M000051"></a>
162
+ <div id="method-M000054" class="method-detail">
163
+ <a name="M000054"></a>
164
164
 
165
165
  <div class="method-heading">
166
- <a href="HttpOAuthExtension.src/M000051.html" target="Code" class="method-signature"
167
- onclick="popupCode('HttpOAuthExtension.src/M000051.html');return false;">
166
+ <a href="HttpOAuthExtension.src/M000054.html" target="Code" class="method-signature"
167
+ onclick="popupCode('HttpOAuthExtension.src/M000054.html');return false;">
168
168
  <span class="method-name">set_oauth</span><span class="method-args">(controller)</span>
169
169
  </a>
170
170
  </div>
@@ -5,20 +5,43 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>set_oauth (SimpleMapper::HttpOAuthExtension)</title>
8
+ <title>requires_oauth (SimpleMapper::HttpOAuthExtension)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/simple_mapper/default_plugins/oauth.rb, line 55</span>
13
+ <pre><span class="ruby-comment cmt"># File lib/simple_mapper/default_plugins/oauth.rb, line 32</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">requires_oauth</span>(<span class="ruby-identifier">consumer_key</span>, <span class="ruby-identifier">consumer_secret</span>, <span class="ruby-identifier">options</span>={})
15
+ <span class="ruby-ivar">@consumer_key</span> = <span class="ruby-identifier">consumer_key</span>
16
+ <span class="ruby-ivar">@consumer_secret</span> = <span class="ruby-identifier">consumer_secret</span>
17
+ <span class="ruby-ivar">@oauth_options</span> = <span class="ruby-identifier">options</span> <span class="ruby-operator">||</span> {}
18
+
19
+ <span class="ruby-comment cmt"># Ingeniousity here... ;)</span>
20
+ <span class="ruby-comment cmt"># Duplicates the class to give it a temporary session-attached oauth scope, sets oauth to the Model-Controller-OAuth class,</span>
21
+ <span class="ruby-comment cmt"># then makes the class use the original class for all of its instantiation.</span>
22
+ <span class="ruby-comment cmt"># NOTE: This only really makes the class methods use OAuth. Object methods, like associations, won't play the trick as well.</span>
23
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">with_oauth</span>(<span class="ruby-identifier">controller</span>)
24
+ <span class="ruby-identifier">duped</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">dup</span>
25
+ <span class="ruby-identifier">duped</span>.<span class="ruby-identifier">set_oauth</span>(<span class="ruby-identifier">controller</span>)
26
+ <span class="ruby-keyword kw">yield</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
27
+ <span class="ruby-identifier">duped</span>
28
+ <span class="ruby-keyword kw">end</span>
29
+
30
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">oauth</span>
31
+ <span class="ruby-ivar">@oauth</span>
32
+ <span class="ruby-keyword kw">end</span>
33
+
14
34
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_oauth</span>(<span class="ruby-identifier">controller</span>)
15
35
  <span class="ruby-ivar">@oauth</span> = <span class="ruby-constant">OAuthController</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">controller</span>, <span class="ruby-keyword kw">self</span>, <span class="ruby-ivar">@consumer_key</span>, <span class="ruby-ivar">@consumer_secret</span>, <span class="ruby-ivar">@oauth_options</span>)
16
- <span class="ruby-identifier">connection</span>.<span class="ruby-identifier">add_callback</span>(<span class="ruby-value str">'initialize_request'</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">request</span><span class="ruby-operator">|</span>
36
+ <span class="ruby-identifier">add_callback</span>(<span class="ruby-value str">'initialize_request'</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">request</span><span class="ruby-operator">|</span>
17
37
  <span class="ruby-ivar">@oauth</span>.<span class="ruby-identifier">authenticate!</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-ivar">@oauth</span>.<span class="ruby-identifier">authorized?</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-ivar">@oauth</span>.<span class="ruby-identifier">scriptable?</span>
18
38
  <span class="ruby-identifier">raise</span> <span class="ruby-constant">RuntimeError</span>, <span class="ruby-value str">&quot;Must authorize OAuth before attempting to get data from the provider.&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@oauth</span>.<span class="ruby-identifier">authorized?</span>
19
39
  <span class="ruby-ivar">@oauth</span>.<span class="ruby-identifier">request_signed!</span>(<span class="ruby-identifier">request</span>)
20
40
  <span class="ruby-keyword kw">end</span>
21
41
  <span class="ruby-ivar">@oauth</span>
22
- <span class="ruby-keyword kw">end</span></pre>
42
+ <span class="ruby-keyword kw">end</span>
43
+
44
+ <span class="ruby-keyword kw">true</span>
45
+ <span class="ruby-keyword kw">end</span></pre>
23
46
  </body>
24
47
  </html>
@@ -10,10 +10,8 @@
10
10
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/simple_mapper/default_plugins/oauth.rb, line 42</span>
13
+ <pre><span class="ruby-comment cmt"># File lib/simple_mapper/default_plugins/oauth.rb, line 41</span>
14
14
  <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">with_oauth</span>(<span class="ruby-identifier">controller</span>)
15
- <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">element_name</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">element_name</span>
16
- <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">collection_name</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">collection_name</span>
17
15
  <span class="ruby-identifier">duped</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">dup</span>
18
16
  <span class="ruby-identifier">duped</span>.<span class="ruby-identifier">set_oauth</span>(<span class="ruby-identifier">controller</span>)
19
17
  <span class="ruby-keyword kw">yield</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
@@ -10,7 +10,7 @@
10
10
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/simple_mapper/default_plugins/oauth.rb, line 51</span>
13
+ <pre><span class="ruby-comment cmt"># File lib/simple_mapper/default_plugins/oauth.rb, line 48</span>
14
14
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">oauth</span>
15
15
  <span class="ruby-ivar">@oauth</span>
16
16
  <span class="ruby-keyword kw">end</span></pre>
@@ -0,0 +1,24 @@
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>set_oauth (SimpleMapper::HttpOAuthExtension)</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 lib/simple_mapper/default_plugins/oauth.rb, line 52</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_oauth</span>(<span class="ruby-identifier">controller</span>)
15
+ <span class="ruby-ivar">@oauth</span> = <span class="ruby-constant">OAuthController</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">controller</span>, <span class="ruby-keyword kw">self</span>, <span class="ruby-ivar">@consumer_key</span>, <span class="ruby-ivar">@consumer_secret</span>, <span class="ruby-ivar">@oauth_options</span>)
16
+ <span class="ruby-identifier">add_callback</span>(<span class="ruby-value str">'initialize_request'</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">request</span><span class="ruby-operator">|</span>
17
+ <span class="ruby-ivar">@oauth</span>.<span class="ruby-identifier">authenticate!</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-ivar">@oauth</span>.<span class="ruby-identifier">authorized?</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-ivar">@oauth</span>.<span class="ruby-identifier">scriptable?</span>
18
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">RuntimeError</span>, <span class="ruby-value str">&quot;Must authorize OAuth before attempting to get data from the provider.&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@oauth</span>.<span class="ruby-identifier">authorized?</span>
19
+ <span class="ruby-ivar">@oauth</span>.<span class="ruby-identifier">request_signed!</span>(<span class="ruby-identifier">request</span>)
20
+ <span class="ruby-keyword kw">end</span>
21
+ <span class="ruby-ivar">@oauth</span>
22
+ <span class="ruby-keyword kw">end</span></pre>
23
+ </body>
24
+ </html>
@@ -80,8 +80,8 @@
80
80
  <h3 class="section-bar">Methods</h3>
81
81
 
82
82
  <div class="name-list">
83
- <a href="#M000047">identifier</a>&nbsp;&nbsp;
84
- <a href="#M000046">properties</a>&nbsp;&nbsp;
83
+ <a href="#M000050">identifier</a>&nbsp;&nbsp;
84
+ <a href="#M000049">properties</a>&nbsp;&nbsp;
85
85
  </div>
86
86
  </div>
87
87
 
@@ -103,12 +103,12 @@
103
103
  <div id="methods">
104
104
  <h3 class="section-bar">Public Instance methods</h3>
105
105
 
106
- <div id="method-M000047" class="method-detail">
107
- <a name="M000047"></a>
106
+ <div id="method-M000050" class="method-detail">
107
+ <a name="M000050"></a>
108
108
 
109
109
  <div class="method-heading">
110
- <a href="ClassMethods.src/M000047.html" target="Code" class="method-signature"
111
- onclick="popupCode('ClassMethods.src/M000047.html');return false;">
110
+ <a href="ClassMethods.src/M000050.html" target="Code" class="method-signature"
111
+ onclick="popupCode('ClassMethods.src/M000050.html');return false;">
112
112
  <span class="method-name">identifier</span><span class="method-args">(id=nil)</span>
113
113
  </a>
114
114
  </div>
@@ -117,12 +117,12 @@
117
117
  </div>
118
118
  </div>
119
119
 
120
- <div id="method-M000046" class="method-detail">
121
- <a name="M000046"></a>
120
+ <div id="method-M000049" class="method-detail">
121
+ <a name="M000049"></a>
122
122
 
123
123
  <div class="method-heading">
124
- <a href="ClassMethods.src/M000046.html" target="Code" class="method-signature"
125
- onclick="popupCode('ClassMethods.src/M000046.html');return false;">
124
+ <a href="ClassMethods.src/M000049.html" target="Code" class="method-signature"
125
+ onclick="popupCode('ClassMethods.src/M000049.html');return false;">
126
126
  <span class="method-name">properties</span><span class="method-args">(*properties)</span>
127
127
  </a>
128
128
  </div>