benschwarz-smoke 0.4.2 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (245) hide show
  1. data/Rakefile +47 -0
  2. data/VERSION.yml +2 -2
  3. data/lib/core_ext/string.rb +6 -0
  4. data/lib/smoke/cache.rb +38 -23
  5. data/lib/smoke/request.rb +4 -8
  6. data/lib/smoke.rb +7 -2
  7. data/rdoc/classes/Smoke/Origin.html +340 -0
  8. data/rdoc/classes/Smoke/Source/Data.html +126 -0
  9. data/rdoc/classes/Smoke/Source/Feed.html +117 -0
  10. data/rdoc/classes/Smoke/Source/YQL.html +223 -0
  11. data/rdoc/classes/Smoke.html +260 -0
  12. data/rdoc/created.rid +1 -0
  13. data/rdoc/files/README_markdown.html +180 -0
  14. data/rdoc/files/lib/core_ext/hash_rb.html +49 -0
  15. data/rdoc/files/lib/smoke/origin_rb.html +49 -0
  16. data/rdoc/files/lib/smoke/request_rb.html +49 -0
  17. data/rdoc/files/lib/smoke/source/data_rb.html +49 -0
  18. data/rdoc/files/lib/smoke/source/feed_rb.html +49 -0
  19. data/rdoc/files/lib/smoke/source/join_rb.html +49 -0
  20. data/rdoc/files/lib/smoke/source/yql_rb.html +49 -0
  21. data/rdoc/files/lib/smoke_rb.html +65 -0
  22. data/rdoc/fr_class_index.html +21 -0
  23. data/rdoc/fr_file_index.html +28 -0
  24. data/rdoc/fr_method_index.html +4459 -0
  25. data/rdoc/index.html +15 -0
  26. data/rdoc/rdoc-style.css +319 -0
  27. data/spec/smoke/cache_spec.rb +28 -6
  28. data/vendor/crack/History +15 -0
  29. data/vendor/crack/LICENSE +20 -0
  30. data/vendor/crack/README.rdoc +42 -0
  31. data/vendor/crack/Rakefile +49 -0
  32. data/vendor/crack/VERSION.yml +4 -0
  33. data/vendor/crack/crack.gemspec +61 -0
  34. data/vendor/crack/lib/crack/core_extensions.rb +128 -0
  35. data/vendor/crack/lib/crack/json.rb +68 -0
  36. data/vendor/crack/lib/crack/xml.rb +214 -0
  37. data/vendor/crack/lib/crack.rb +7 -0
  38. data/vendor/crack/test/crack_test.rb +4 -0
  39. data/vendor/crack/test/data/twittersearch-firefox.json +1 -0
  40. data/vendor/crack/test/data/twittersearch-ie.json +1 -0
  41. data/vendor/crack/test/hash_test.rb +56 -0
  42. data/vendor/crack/test/json_test.rb +66 -0
  43. data/vendor/crack/test/string_test.rb +31 -0
  44. data/vendor/crack/test/test_helper.rb +12 -0
  45. data/vendor/crack/test/xml_test.rb +489 -0
  46. data/vendor/dependencies/README.markdown +113 -0
  47. data/vendor/dependencies/Rakefile +5 -0
  48. data/vendor/dependencies/bin/dep +83 -0
  49. data/vendor/dependencies/dependencies.gemspec +15 -0
  50. data/vendor/dependencies/dependencies.gemspec.erb +27 -0
  51. data/vendor/dependencies/lib/dependencies/dep.rb +99 -0
  52. data/vendor/dependencies/lib/dependencies.rb +5 -0
  53. data/vendor/dependencies/test/dependencies_test.rb +228 -0
  54. data/vendor/dependencies/test/foobaz-0.3.gem +0 -0
  55. data/vendor/fakeweb/CHANGELOG +163 -0
  56. data/vendor/fakeweb/LICENSE.txt +281 -0
  57. data/vendor/fakeweb/README.rdoc +193 -0
  58. data/vendor/fakeweb/Rakefile +76 -0
  59. data/vendor/fakeweb/fakeweb.gemspec +21 -0
  60. data/vendor/fakeweb/lib/fake_web/ext/net_http.rb +71 -0
  61. data/vendor/fakeweb/lib/fake_web/registry.rb +103 -0
  62. data/vendor/fakeweb/lib/fake_web/responder.rb +113 -0
  63. data/vendor/fakeweb/lib/fake_web/response.rb +10 -0
  64. data/vendor/fakeweb/lib/fake_web/stub_socket.rb +15 -0
  65. data/vendor/fakeweb/lib/fake_web/utility.rb +22 -0
  66. data/vendor/fakeweb/lib/fake_web.rb +172 -0
  67. data/vendor/fakeweb/lib/fakeweb.rb +2 -0
  68. data/vendor/fakeweb/test/fixtures/google_response_from_curl +12 -0
  69. data/vendor/fakeweb/test/fixtures/google_response_with_transfer_encoding +17 -0
  70. data/vendor/fakeweb/test/fixtures/google_response_without_transfer_encoding +11 -0
  71. data/vendor/fakeweb/test/fixtures/test_example.txt +1 -0
  72. data/vendor/fakeweb/test/fixtures/test_txt_file +3 -0
  73. data/vendor/fakeweb/test/test_allow_net_connect.rb +85 -0
  74. data/vendor/fakeweb/test/test_deprecations.rb +54 -0
  75. data/vendor/fakeweb/test/test_fake_authentication.rb +92 -0
  76. data/vendor/fakeweb/test/test_fake_web.rb +535 -0
  77. data/vendor/fakeweb/test/test_fake_web_open_uri.rb +58 -0
  78. data/vendor/fakeweb/test/test_helper.rb +74 -0
  79. data/vendor/fakeweb/test/test_missing_open_uri.rb +25 -0
  80. data/vendor/fakeweb/test/test_precedence.rb +51 -0
  81. data/vendor/fakeweb/test/test_query_string.rb +45 -0
  82. data/vendor/fakeweb/test/test_regexes.rb +103 -0
  83. data/vendor/fakeweb/test/test_response_headers.rb +73 -0
  84. data/vendor/fakeweb/test/test_trailing_slashes.rb +53 -0
  85. data/vendor/fakeweb/test/test_utility.rb +70 -0
  86. data/vendor/json-1.1.3/CHANGES +93 -0
  87. data/vendor/json-1.1.3/GPL +340 -0
  88. data/vendor/json-1.1.3/README +78 -0
  89. data/vendor/json-1.1.3/RUBY +58 -0
  90. data/vendor/json-1.1.3/Rakefile +309 -0
  91. data/vendor/json-1.1.3/TODO +1 -0
  92. data/vendor/json-1.1.3/VERSION +1 -0
  93. data/vendor/json-1.1.3/benchmarks/benchmark.txt +133 -0
  94. data/vendor/json-1.1.3/benchmarks/benchmark_generator.rb +48 -0
  95. data/vendor/json-1.1.3/benchmarks/benchmark_parser.rb +26 -0
  96. data/vendor/json-1.1.3/benchmarks/benchmark_rails.rb +26 -0
  97. data/vendor/json-1.1.3/bin/edit_json.rb +10 -0
  98. data/vendor/json-1.1.3/bin/prettify_json.rb +76 -0
  99. data/vendor/json-1.1.3/data/example.json +1 -0
  100. data/vendor/json-1.1.3/data/index.html +38 -0
  101. data/vendor/json-1.1.3/data/prototype.js +4184 -0
  102. data/vendor/json-1.1.3/ext/json/ext/generator/extconf.rb +9 -0
  103. data/vendor/json-1.1.3/ext/json/ext/generator/generator.c +875 -0
  104. data/vendor/json-1.1.3/ext/json/ext/generator/unicode.c +182 -0
  105. data/vendor/json-1.1.3/ext/json/ext/generator/unicode.h +53 -0
  106. data/vendor/json-1.1.3/ext/json/ext/parser/extconf.rb +9 -0
  107. data/vendor/json-1.1.3/ext/json/ext/parser/parser.c +1758 -0
  108. data/vendor/json-1.1.3/ext/json/ext/parser/parser.rl +638 -0
  109. data/vendor/json-1.1.3/ext/json/ext/parser/unicode.c +154 -0
  110. data/vendor/json-1.1.3/ext/json/ext/parser/unicode.h +58 -0
  111. data/vendor/json-1.1.3/install.rb +26 -0
  112. data/vendor/json-1.1.3/lib/json/Array.xpm +21 -0
  113. data/vendor/json-1.1.3/lib/json/FalseClass.xpm +21 -0
  114. data/vendor/json-1.1.3/lib/json/Hash.xpm +21 -0
  115. data/vendor/json-1.1.3/lib/json/Key.xpm +73 -0
  116. data/vendor/json-1.1.3/lib/json/NilClass.xpm +21 -0
  117. data/vendor/json-1.1.3/lib/json/Numeric.xpm +28 -0
  118. data/vendor/json-1.1.3/lib/json/String.xpm +96 -0
  119. data/vendor/json-1.1.3/lib/json/TrueClass.xpm +21 -0
  120. data/vendor/json-1.1.3/lib/json/add/core.rb +135 -0
  121. data/vendor/json-1.1.3/lib/json/add/rails.rb +58 -0
  122. data/vendor/json-1.1.3/lib/json/common.rb +354 -0
  123. data/vendor/json-1.1.3/lib/json/editor.rb +1362 -0
  124. data/vendor/json-1.1.3/lib/json/ext.rb +13 -0
  125. data/vendor/json-1.1.3/lib/json/json.xpm +1499 -0
  126. data/vendor/json-1.1.3/lib/json/pure/generator.rb +394 -0
  127. data/vendor/json-1.1.3/lib/json/pure/parser.rb +259 -0
  128. data/vendor/json-1.1.3/lib/json/pure.rb +75 -0
  129. data/vendor/json-1.1.3/lib/json/version.rb +9 -0
  130. data/vendor/json-1.1.3/lib/json.rb +235 -0
  131. data/vendor/json-1.1.3/tests/fixtures/fail1.json +1 -0
  132. data/vendor/json-1.1.3/tests/fixtures/fail10.json +1 -0
  133. data/vendor/json-1.1.3/tests/fixtures/fail11.json +1 -0
  134. data/vendor/json-1.1.3/tests/fixtures/fail12.json +1 -0
  135. data/vendor/json-1.1.3/tests/fixtures/fail13.json +1 -0
  136. data/vendor/json-1.1.3/tests/fixtures/fail14.json +1 -0
  137. data/vendor/json-1.1.3/tests/fixtures/fail18.json +1 -0
  138. data/vendor/json-1.1.3/tests/fixtures/fail19.json +1 -0
  139. data/vendor/json-1.1.3/tests/fixtures/fail2.json +1 -0
  140. data/vendor/json-1.1.3/tests/fixtures/fail20.json +1 -0
  141. data/vendor/json-1.1.3/tests/fixtures/fail21.json +1 -0
  142. data/vendor/json-1.1.3/tests/fixtures/fail22.json +1 -0
  143. data/vendor/json-1.1.3/tests/fixtures/fail23.json +1 -0
  144. data/vendor/json-1.1.3/tests/fixtures/fail24.json +1 -0
  145. data/vendor/json-1.1.3/tests/fixtures/fail25.json +1 -0
  146. data/vendor/json-1.1.3/tests/fixtures/fail27.json +2 -0
  147. data/vendor/json-1.1.3/tests/fixtures/fail28.json +2 -0
  148. data/vendor/json-1.1.3/tests/fixtures/fail3.json +1 -0
  149. data/vendor/json-1.1.3/tests/fixtures/fail4.json +1 -0
  150. data/vendor/json-1.1.3/tests/fixtures/fail5.json +1 -0
  151. data/vendor/json-1.1.3/tests/fixtures/fail6.json +1 -0
  152. data/vendor/json-1.1.3/tests/fixtures/fail7.json +1 -0
  153. data/vendor/json-1.1.3/tests/fixtures/fail8.json +1 -0
  154. data/vendor/json-1.1.3/tests/fixtures/fail9.json +1 -0
  155. data/vendor/json-1.1.3/tests/fixtures/pass1.json +56 -0
  156. data/vendor/json-1.1.3/tests/fixtures/pass15.json +1 -0
  157. data/vendor/json-1.1.3/tests/fixtures/pass16.json +1 -0
  158. data/vendor/json-1.1.3/tests/fixtures/pass17.json +1 -0
  159. data/vendor/json-1.1.3/tests/fixtures/pass2.json +1 -0
  160. data/vendor/json-1.1.3/tests/fixtures/pass26.json +1 -0
  161. data/vendor/json-1.1.3/tests/fixtures/pass3.json +6 -0
  162. data/vendor/json-1.1.3/tests/runner.rb +25 -0
  163. data/vendor/json-1.1.3/tests/test_json.rb +293 -0
  164. data/vendor/json-1.1.3/tests/test_json_addition.rb +161 -0
  165. data/vendor/json-1.1.3/tests/test_json_fixtures.rb +30 -0
  166. data/vendor/json-1.1.3/tests/test_json_generate.rb +100 -0
  167. data/vendor/json-1.1.3/tests/test_json_rails.rb +118 -0
  168. data/vendor/json-1.1.3/tests/test_json_unicode.rb +61 -0
  169. data/vendor/json-1.1.3/tools/fuzz.rb +140 -0
  170. data/vendor/json-1.1.3/tools/server.rb +62 -0
  171. data/vendor/moneta/LICENSE +20 -0
  172. data/vendor/moneta/README +51 -0
  173. data/vendor/moneta/Rakefile +60 -0
  174. data/vendor/moneta/TODO +4 -0
  175. data/vendor/moneta/benchmarks/various.rb +234 -0
  176. data/vendor/moneta/lib/moneta/basic_file.rb +111 -0
  177. data/vendor/moneta/lib/moneta/berkeley.rb +53 -0
  178. data/vendor/moneta/lib/moneta/couch.rb +63 -0
  179. data/vendor/moneta/lib/moneta/datamapper.rb +117 -0
  180. data/vendor/moneta/lib/moneta/file.rb +91 -0
  181. data/vendor/moneta/lib/moneta/lmc.rb +52 -0
  182. data/vendor/moneta/lib/moneta/memcache.rb +53 -0
  183. data/vendor/moneta/lib/moneta/memory.rb +11 -0
  184. data/vendor/moneta/lib/moneta/mongodb.rb +58 -0
  185. data/vendor/moneta/lib/moneta/redis.rb +49 -0
  186. data/vendor/moneta/lib/moneta/rufus.rb +41 -0
  187. data/vendor/moneta/lib/moneta/s3.rb +162 -0
  188. data/vendor/moneta/lib/moneta/sdbm.rb +33 -0
  189. data/vendor/moneta/lib/moneta/tyrant.rb +58 -0
  190. data/vendor/moneta/lib/moneta/xattr.rb +58 -0
  191. data/vendor/moneta/lib/moneta.rb +76 -0
  192. data/vendor/moneta/moneta.gemspec +32 -0
  193. data/vendor/moneta/script/destroy +14 -0
  194. data/vendor/moneta/script/generate +14 -0
  195. data/vendor/moneta/spec/moneta_basic_file_spec.rb +50 -0
  196. data/vendor/moneta/spec/moneta_berkeley_spec.rb +20 -0
  197. data/vendor/moneta/spec/moneta_couch_spec.rb +22 -0
  198. data/vendor/moneta/spec/moneta_datamapper_spec.rb +79 -0
  199. data/vendor/moneta/spec/moneta_file_spec.rb +21 -0
  200. data/vendor/moneta/spec/moneta_lmc_spec.rb +24 -0
  201. data/vendor/moneta/spec/moneta_memcache_spec.rb +16 -0
  202. data/vendor/moneta/spec/moneta_memory_spec.rb +12 -0
  203. data/vendor/moneta/spec/moneta_mongodb_spec.rb +16 -0
  204. data/vendor/moneta/spec/moneta_redis_spec.rb +16 -0
  205. data/vendor/moneta/spec/moneta_rufus_spec.rb +15 -0
  206. data/vendor/moneta/spec/moneta_s3_spec.rb +19 -0
  207. data/vendor/moneta/spec/moneta_sdbm_spec.rb +21 -0
  208. data/vendor/moneta/spec/moneta_tyrant_spec.rb +15 -0
  209. data/vendor/moneta/spec/moneta_xattr_spec.rb +21 -0
  210. data/vendor/moneta/spec/shared.rb +122 -0
  211. data/vendor/moneta/spec/spec_helper.rb +7 -0
  212. data/vendor/rest-client/README.rdoc +151 -0
  213. data/vendor/rest-client/Rakefile +58 -0
  214. data/vendor/rest-client/VERSION +1 -0
  215. data/vendor/rest-client/bin/restclient +87 -0
  216. data/vendor/rest-client/lib/rest_client.rb +2 -0
  217. data/vendor/rest-client/lib/restclient/exceptions.rb +88 -0
  218. data/vendor/rest-client/lib/restclient/mixin/response.rb +43 -0
  219. data/vendor/rest-client/lib/restclient/raw_response.rb +30 -0
  220. data/vendor/rest-client/lib/restclient/request.rb +238 -0
  221. data/vendor/rest-client/lib/restclient/resource.rb +146 -0
  222. data/vendor/rest-client/lib/restclient/response.rb +20 -0
  223. data/vendor/rest-client/lib/restclient.rb +99 -0
  224. data/vendor/rest-client/rest-client.gemspec +66 -0
  225. data/vendor/rest-client/spec/base.rb +4 -0
  226. data/vendor/rest-client/spec/exceptions_spec.rb +65 -0
  227. data/vendor/rest-client/spec/mixin/response_spec.rb +46 -0
  228. data/vendor/rest-client/spec/raw_response_spec.rb +17 -0
  229. data/vendor/rest-client/spec/request_spec.rb +476 -0
  230. data/vendor/rest-client/spec/resource_spec.rb +75 -0
  231. data/vendor/rest-client/spec/response_spec.rb +16 -0
  232. data/vendor/rest-client/spec/restclient_spec.rb +53 -0
  233. data/vendor/simple-rss/LICENSE +429 -0
  234. data/vendor/simple-rss/README +43 -0
  235. data/vendor/simple-rss/Rakefile +212 -0
  236. data/vendor/simple-rss/install.rb +40 -0
  237. data/vendor/simple-rss/lib/simple-rss.rb +150 -0
  238. data/vendor/simple-rss/simple-rss.gemspec +12 -0
  239. data/vendor/simple-rss/test/base/base_test.rb +51 -0
  240. data/vendor/simple-rss/test/data/atom.xml +45 -0
  241. data/vendor/simple-rss/test/data/not-rss.xml +8 -0
  242. data/vendor/simple-rss/test/data/rss09.rdf +79 -0
  243. data/vendor/simple-rss/test/data/rss20.xml +818 -0
  244. data/vendor/simple-rss/test/test_helper.rb +4 -0
  245. metadata +314 -40
@@ -0,0 +1,126 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2
+ <html lang='en'>
3
+ <head>
4
+ <title>: Smoke::Source::Data [smoke]</title>
5
+ <meta content='text/html; charset=UTF-8' http-equiv='Content-Type'>
6
+ <link href='../../../rdoc-style.css' media='screen' rel='stylesheet' type='text/css'>
7
+ <script type='text/javascript'>
8
+ //<![CDATA[
9
+ function popupCode(url) {
10
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
11
+ }
12
+
13
+ function toggleCode(id) {
14
+ var code = document.getElementById(id)
15
+
16
+ code.style.display = code.style.display != 'block' ? 'block' : 'none'
17
+ return true
18
+ }
19
+
20
+ // Make codeblocks hidden by default
21
+ document.writeln('<' + 'style type="text/css">.method .source pre { display: none }<\/style>')
22
+ //]]>
23
+ </script>
24
+ </head>
25
+ <body class='page'>
26
+ <div class='class' id='wrapper'>
27
+ <div class='header'>
28
+ <h1 class='name'>
29
+ <span class='type'>Class</span>
30
+ Smoke::Source::Data
31
+ </h1>
32
+ <ol class='paths'>
33
+ <li>
34
+ <a href="../../../files/lib/smoke/source/data_rb.html">lib/smoke/source/data.rb</a>
35
+ </li>
36
+ </ol>
37
+ <div class='parent'>
38
+ Parent:
39
+ <strong><a href="../Origin.html">Smoke::Origin</a></strong>
40
+ </div>
41
+ </div>
42
+ <div id='content'>
43
+ <div id='text'>
44
+ <div id='description'>
45
+ <p>
46
+ The &#8220;Data&#8221; source allows you to query datasources that are
47
+ &#8220;complete&#8221; urls and rely on the automagic object parsing that
48
+ smoke provides.
49
+ </p>
50
+ <p>
51
+ For example, you may use this source to query a complete restful api call
52
+ unpackage the xml response and get a clean ruby object.
53
+ </p>
54
+ <p>
55
+ <a href="Data.html">Data</a> can take as many urls as you&#8217;d like to
56
+ throw at it.
57
+ </p>
58
+ <p>
59
+ Usage:
60
+ </p>
61
+ <pre>Smoke.data(:ruby) do&#x000A; url &quot;http://api.flickr.com/services/rest/?user_id=36821533%40N00&amp;tags=benschwarz-site&amp;nojsoncallback=1&amp;method=flickr.photos.search&amp;format=json&amp;api_key=your_api_key_here&#x000A; path :photos, :photo&#x000A;end</pre>
62
+ </div>
63
+ <div id='method-list'>
64
+ <h2>Methods</h2>
65
+ <h3>public instance</h3>
66
+ <ol>
67
+ <li><a href="#M000012">url</a></li>
68
+ </ol>
69
+ <h3>protected instance</h3>
70
+ <ol>
71
+ <li><a href="#M000013">dispatch</a></li>
72
+ </ol>
73
+ </div>
74
+ <div id='section'>
75
+ <div id='attribute-list'>
76
+ <h2 class='section-bar'>Attributes</h2>
77
+ <div class='name-list'>
78
+ <table>
79
+ <tr class='top-aligned-row context-row'>
80
+ <td class='context-item-name'>request</td>
81
+ <td class='context-item-value'>[R]</td>
82
+ <td class='context-item-desc'></td>
83
+ </tr>
84
+ </table>
85
+ </div>
86
+ </div>
87
+ <div id='methods'>
88
+ <h2>Public instance methods</h2>
89
+ <div class='public-instance method' id='method-M000012'>
90
+ <a name='M000012'> </a>
91
+ <div class='synopsis'>
92
+ <span class='name'>url</span>
93
+ <span class='arguments'>(source_url)</span>
94
+ </div>
95
+ <div class='source'>
96
+ <a class='source-toggle' href='#' onclick="toggleCode('M000012-source'); return false">
97
+ [show source]
98
+ </a>
99
+ <pre id='M000012-source'> <span class="ruby-comment cmt"># File lib/smoke/source/data.rb, line 24</span>&#x000A;24: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">url</span>(<span class="ruby-identifier">source_url</span>)&#x000A;25: <span class="ruby-ivar">@url</span> = <span class="ruby-identifier">source_url</span>&#x000A;26: <span class="ruby-keyword kw">end</span></pre>
100
+ </div>
101
+ </div>
102
+ <h2>Protected instance methods</h2>
103
+ <div class='protected-instance method' id='method-M000013'>
104
+ <a name='M000013'> </a>
105
+ <div class='synopsis'>
106
+ <span class='name'>dispatch</span>
107
+ <span class='arguments'>()</span>
108
+ </div>
109
+ <div class='source'>
110
+ <a class='source-toggle' href='#' onclick="toggleCode('M000013-source'); return false">
111
+ [show source]
112
+ </a>
113
+ <pre id='M000013-source'> <span class="ruby-comment cmt"># File lib/smoke/source/data.rb, line 29</span>&#x000A;29: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dispatch</span>&#x000A;30: <span class="ruby-ivar">@request</span> = <span class="ruby-constant">Smoke</span><span class="ruby-operator">::</span><span class="ruby-constant">Request</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@url</span>)&#x000A;31: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">items</span> = (<span class="ruby-ivar">@path</span>.<span class="ruby-identifier">nil?</span>) <span class="ruby-operator">?</span> <span class="ruby-ivar">@request</span>.<span class="ruby-identifier">body</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">drill</span>(<span class="ruby-ivar">@request</span>.<span class="ruby-identifier">body</span>, <span class="ruby-operator">*</span><span class="ruby-ivar">@path</span>)&#x000A;32: <span class="ruby-keyword kw">end</span></pre>
114
+ </div>
115
+ </div>
116
+ </div>
117
+ </div>
118
+ </div>
119
+ </div>
120
+ <div id='footer-push'></div>
121
+ </div>
122
+ <div id='footer'>
123
+ <a href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
124
+ </div>
125
+ </body>
126
+ </html>
@@ -0,0 +1,117 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2
+ <html lang='en'>
3
+ <head>
4
+ <title>: Smoke::Source::Feed [smoke]</title>
5
+ <meta content='text/html; charset=UTF-8' http-equiv='Content-Type'>
6
+ <link href='../../../rdoc-style.css' media='screen' rel='stylesheet' type='text/css'>
7
+ <script type='text/javascript'>
8
+ //<![CDATA[
9
+ function popupCode(url) {
10
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
11
+ }
12
+
13
+ function toggleCode(id) {
14
+ var code = document.getElementById(id)
15
+
16
+ code.style.display = code.style.display != 'block' ? 'block' : 'none'
17
+ return true
18
+ }
19
+
20
+ // Make codeblocks hidden by default
21
+ document.writeln('<' + 'style type="text/css">.method .source pre { display: none }<\/style>')
22
+ //]]>
23
+ </script>
24
+ </head>
25
+ <body class='page'>
26
+ <div class='class' id='wrapper'>
27
+ <div class='header'>
28
+ <h1 class='name'>
29
+ <span class='type'>Class</span>
30
+ Smoke::Source::Feed
31
+ </h1>
32
+ <ol class='paths'>
33
+ <li>
34
+ <a href="../../../files/lib/smoke/source/feed_rb.html">lib/smoke/source/feed.rb</a>
35
+ </li>
36
+ </ol>
37
+ <div class='parent'>
38
+ Parent:
39
+ <strong><a href="../Origin.html">Smoke::Origin</a></strong>
40
+ </div>
41
+ </div>
42
+ <div id='content'>
43
+ <div id='text'>
44
+ <div id='description'>
45
+ <p>
46
+ <a href="Feed.html">Feed</a> can take multiple rss or atom feeds and munge
47
+ them up together.
48
+ </p>
49
+ <p>
50
+ Usage:
51
+ </p>
52
+ <pre>Smoke.feed(:ruby) do&#x000A; url &quot;domain.tld/rss&quot;&#x000A; url &quot;site.tld/atom&quot;&#x000A;end</pre>
53
+ </div>
54
+ <div id='method-list'>
55
+ <h2>Methods</h2>
56
+ <h3>public instance</h3>
57
+ <ol>
58
+ <li><a href="#M000010">url</a></li>
59
+ </ol>
60
+ <h3>protected instance</h3>
61
+ <ol>
62
+ <li><a href="#M000011">dispatch</a></li>
63
+ </ol>
64
+ </div>
65
+ <div id='section'>
66
+ <div id='attribute-list'>
67
+ <h2 class='section-bar'>Attributes</h2>
68
+ <div class='name-list'>
69
+ <table>
70
+ <tr class='top-aligned-row context-row'>
71
+ <td class='context-item-name'>requests</td>
72
+ <td class='context-item-value'>[R]</td>
73
+ <td class='context-item-desc'></td>
74
+ </tr>
75
+ </table>
76
+ </div>
77
+ </div>
78
+ <div id='methods'>
79
+ <h2>Public instance methods</h2>
80
+ <div class='public-instance method' id='method-M000010'>
81
+ <a name='M000010'> </a>
82
+ <div class='synopsis'>
83
+ <span class='name'>url</span>
84
+ <span class='arguments'>(feed_uri)</span>
85
+ </div>
86
+ <div class='source'>
87
+ <a class='source-toggle' href='#' onclick="toggleCode('M000010-source'); return false">
88
+ [show source]
89
+ </a>
90
+ <pre id='M000010-source'> <span class="ruby-comment cmt"># File lib/smoke/source/feed.rb, line 13</span>&#x000A;13: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">url</span>(<span class="ruby-identifier">feed_uri</span>)&#x000A;14: (<span class="ruby-ivar">@feeds</span> <span class="ruby-operator">||=</span> [] ) <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">feed_uri</span>&#x000A;15: <span class="ruby-keyword kw">end</span></pre>
91
+ </div>
92
+ </div>
93
+ <h2>Protected instance methods</h2>
94
+ <div class='protected-instance method' id='method-M000011'>
95
+ <a name='M000011'> </a>
96
+ <div class='synopsis'>
97
+ <span class='name'>dispatch</span>
98
+ <span class='arguments'>()</span>
99
+ </div>
100
+ <div class='source'>
101
+ <a class='source-toggle' href='#' onclick="toggleCode('M000011-source'); return false">
102
+ [show source]
103
+ </a>
104
+ <pre id='M000011-source'> <span class="ruby-comment cmt"># File lib/smoke/source/feed.rb, line 18</span>&#x000A;18: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dispatch</span>&#x000A;19: <span class="ruby-ivar">@requests</span> = <span class="ruby-ivar">@feeds</span>.<span class="ruby-identifier">map</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-constant">Smoke</span><span class="ruby-operator">::</span><span class="ruby-constant">Request</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">f</span>, <span class="ruby-identifier">:raw_response</span>) }&#x000A;20: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">items</span> = <span class="ruby-ivar">@requests</span>.<span class="ruby-identifier">map</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">r</span><span class="ruby-operator">|</span> <span class="ruby-operator">::</span><span class="ruby-constant">SimpleRSS</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">r</span>.<span class="ruby-identifier">body</span>).<span class="ruby-identifier">items</span> }.<span class="ruby-identifier">flatten</span>&#x000A;21: <span class="ruby-keyword kw">end</span></pre>
105
+ </div>
106
+ </div>
107
+ </div>
108
+ </div>
109
+ </div>
110
+ </div>
111
+ <div id='footer-push'></div>
112
+ </div>
113
+ <div id='footer'>
114
+ <a href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
115
+ </div>
116
+ </body>
117
+ </html>
@@ -0,0 +1,223 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2
+ <html lang='en'>
3
+ <head>
4
+ <title>: Smoke::Source::YQL [smoke]</title>
5
+ <meta content='text/html; charset=UTF-8' http-equiv='Content-Type'>
6
+ <link href='../../../rdoc-style.css' media='screen' rel='stylesheet' type='text/css'>
7
+ <script type='text/javascript'>
8
+ //<![CDATA[
9
+ function popupCode(url) {
10
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
11
+ }
12
+
13
+ function toggleCode(id) {
14
+ var code = document.getElementById(id)
15
+
16
+ code.style.display = code.style.display != 'block' ? 'block' : 'none'
17
+ return true
18
+ }
19
+
20
+ // Make codeblocks hidden by default
21
+ document.writeln('<' + 'style type="text/css">.method .source pre { display: none }<\/style>')
22
+ //]]>
23
+ </script>
24
+ </head>
25
+ <body class='page'>
26
+ <div class='class' id='wrapper'>
27
+ <div class='header'>
28
+ <h1 class='name'>
29
+ <span class='type'>Class</span>
30
+ Smoke::Source::YQL
31
+ </h1>
32
+ <ol class='paths'>
33
+ <li>
34
+ <a href="../../../files/lib/smoke/source/yql_rb.html">lib/smoke/source/yql.rb</a>
35
+ </li>
36
+ </ol>
37
+ <div class='parent'>
38
+ Parent:
39
+ <strong><a href="../Origin.html">Smoke::Origin</a></strong>
40
+ </div>
41
+ </div>
42
+ <div id='content'>
43
+ <div id='text'>
44
+ <div id='description'>
45
+ <p>
46
+ <a href="YQL.html">YQL</a> will call to Yahoo <a href="YQL.html">YQL</a>
47
+ services
48
+ </p>
49
+ <p>
50
+ Usage:
51
+ </p>
52
+ <pre>Smoke.yql(:ruby) do&#x000A; select :all&#x000A; from &quot;search.web&quot;&#x000A; where :query, &quot;ruby&quot;&#x000A;end</pre>
53
+ </div>
54
+ <div id='method-list'>
55
+ <h2>Methods</h2>
56
+ <h3>public instance</h3>
57
+ <ol>
58
+ <li><a href="#M000015">from</a></li>
59
+ <li><a href="#M000014">select</a></li>
60
+ <li><a href="#M000017">use</a></li>
61
+ <li><a href="#M000016">where</a></li>
62
+ </ol>
63
+ <h3>protected instance</h3>
64
+ <ol>
65
+ <li><a href="#M000019">dispatch</a></li>
66
+ <li><a href="#M000018">params</a></li>
67
+ </ol>
68
+ </div>
69
+ <div id='section'>
70
+ <div id='constants-list'>
71
+ <h2>Constants</h2>
72
+ <div class='name-list'>
73
+ <table summary='Constants'>
74
+ <tr class='top-aligned-row context-row'>
75
+ <td class='context-item-name'>API_BASE</td>
76
+ <td>=</td>
77
+ <td class='context-item-value'>&quot;http://query.yahooapis.com/v1/public/yql&quot;</td>
78
+ </tr>
79
+ </table>
80
+ </div>
81
+ </div>
82
+ <div id='attribute-list'>
83
+ <h2 class='section-bar'>Attributes</h2>
84
+ <div class='name-list'>
85
+ <table>
86
+ <tr class='top-aligned-row context-row'>
87
+ <td class='context-item-name'>request</td>
88
+ <td class='context-item-value'>[R]</td>
89
+ <td class='context-item-desc'></td>
90
+ </tr>
91
+ </table>
92
+ </div>
93
+ </div>
94
+ <div id='methods'>
95
+ <h2>Public instance methods</h2>
96
+ <div class='public-instance method' id='method-M000015'>
97
+ <a name='M000015'> </a>
98
+ <div class='synopsis'>
99
+ <span class='name'>from</span>
100
+ <span class='arguments'>(source)</span>
101
+ </div>
102
+ <div class='description'>
103
+ <p>
104
+ from corresponds to the from fragment of the <a href="YQL.html">YQL</a>
105
+ query Usage:
106
+ </p>
107
+ <pre>from &quot;search.web&quot;</pre>
108
+ <p>
109
+ or
110
+ </p>
111
+ <pre>from :html</pre>
112
+ </div>
113
+ <div class='source'>
114
+ <a class='source-toggle' href='#' onclick="toggleCode('M000015-source'); return false">
115
+ [show source]
116
+ </a>
117
+ <pre id='M000015-source'> <span class="ruby-comment cmt"># File lib/smoke/source/yql.rb, line 34</span>&#x000A;34: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">from</span>(<span class="ruby-identifier">source</span>)&#x000A;35: <span class="ruby-ivar">@from</span> = <span class="ruby-identifier">source</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">','</span>) <span class="ruby-keyword kw">and</span> <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">source</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Array</span>&#x000A;36: <span class="ruby-ivar">@from</span> = <span class="ruby-identifier">source</span>.<span class="ruby-identifier">to_s</span>&#x000A;37: <span class="ruby-keyword kw">end</span></pre>
118
+ </div>
119
+ </div>
120
+ <div class='public-instance method' id='method-M000014'>
121
+ <a name='M000014'> </a>
122
+ <div class='synopsis'>
123
+ <span class='name'>select</span>
124
+ <span class='arguments'>(what = :all)</span>
125
+ </div>
126
+ <div class='description'>
127
+ <p>
128
+ Select indicates what <a href="YQL.html">YQL</a> will be selecting Usage:
129
+ </p>
130
+ <pre>select :all&#x000A;=&gt; &quot;SELECT *&quot;&#x000A;select :title&#x000A;=&gt; &quot;SELECT title&quot;&#x000A;select :title, :description&#x000A;=&gt; &quot;SELECT title, description&quot;</pre>
131
+ </div>
132
+ <div class='source'>
133
+ <a class='source-toggle' href='#' onclick="toggleCode('M000014-source'); return false">
134
+ [show source]
135
+ </a>
136
+ <pre id='M000014-source'> <span class="ruby-comment cmt"># File lib/smoke/source/yql.rb, line 23</span>&#x000A;23: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">select</span>(<span class="ruby-identifier">what</span> = <span class="ruby-identifier">:all</span>)&#x000A;24: <span class="ruby-ivar">@select</span> = <span class="ruby-identifier">what</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot;,&quot;</span>) <span class="ruby-keyword kw">and</span> <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">what</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Array</span>&#x000A;25: <span class="ruby-ivar">@select</span> = <span class="ruby-value str">&quot;*&quot;</span> <span class="ruby-keyword kw">and</span> <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">what</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:all</span>&#x000A;26: <span class="ruby-ivar">@select</span> = <span class="ruby-identifier">what</span>.<span class="ruby-identifier">to_s</span>&#x000A;27: <span class="ruby-keyword kw">end</span></pre>
137
+ </div>
138
+ </div>
139
+ <div class='public-instance method' id='method-M000017'>
140
+ <a name='M000017'> </a>
141
+ <div class='synopsis'>
142
+ <span class='name'>use</span>
143
+ <span class='arguments'>(url)</span>
144
+ </div>
145
+ <div class='description'>
146
+ <p>
147
+ `use` can be used to set the url location of the data-table that you want
148
+ <a href="YQL.html">YQL</a> to search upon
149
+ </p>
150
+ <p>
151
+ Usage:
152
+ </p>
153
+ <pre>use &quot;http://datatables.org/alltables.env&quot;</pre>
154
+ </div>
155
+ <div class='source'>
156
+ <a class='source-toggle' href='#' onclick="toggleCode('M000017-source'); return false">
157
+ [show source]
158
+ </a>
159
+ <pre id='M000017-source'> <span class="ruby-comment cmt"># File lib/smoke/source/yql.rb, line 55</span>&#x000A;55: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">use</span>(<span class="ruby-identifier">url</span>)&#x000A;56: <span class="ruby-identifier">params</span>.<span class="ruby-identifier">merge!</span>({<span class="ruby-identifier">:env</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">url</span>})&#x000A;57: <span class="ruby-keyword kw">end</span></pre>
160
+ </div>
161
+ </div>
162
+ <div class='public-instance method' id='method-M000016'>
163
+ <a name='M000016'> </a>
164
+ <div class='synopsis'>
165
+ <span class='name'>where</span>
166
+ <span class='arguments'>(column, value)</span>
167
+ </div>
168
+ <div class='description'>
169
+ <p>
170
+ where is a straight up match, no fancy matchers are currently supported
171
+ Usage:
172
+ </p>
173
+ <pre>where :xpath, &quot;//div/div/a&quot;</pre>
174
+ <p>
175
+ or
176
+ </p>
177
+ <pre>where :query, &quot;python&quot;</pre>
178
+ </div>
179
+ <div class='source'>
180
+ <a class='source-toggle' href='#' onclick="toggleCode('M000016-source'); return false">
181
+ [show source]
182
+ </a>
183
+ <pre id='M000016-source'> <span class="ruby-comment cmt"># File lib/smoke/source/yql.rb, line 45</span>&#x000A;45: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">where</span>(<span class="ruby-identifier">column</span>, <span class="ruby-identifier">value</span>)&#x000A;46: <span class="ruby-ivar">@where</span> = <span class="ruby-ivar">@where</span> <span class="ruby-operator">||</span> []&#x000A;47: <span class="ruby-ivar">@where</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;#{column.to_s} = '#{value}'&quot;</span>&#x000A;48: <span class="ruby-keyword kw">end</span></pre>
184
+ </div>
185
+ </div>
186
+ <h2>Protected instance methods</h2>
187
+ <div class='protected-instance method' id='method-M000019'>
188
+ <a name='M000019'> </a>
189
+ <div class='synopsis'>
190
+ <span class='name'>dispatch</span>
191
+ <span class='arguments'>()</span>
192
+ </div>
193
+ <div class='source'>
194
+ <a class='source-toggle' href='#' onclick="toggleCode('M000019-source'); return false">
195
+ [show source]
196
+ </a>
197
+ <pre id='M000019-source'> <span class="ruby-comment cmt"># File lib/smoke/source/yql.rb, line 64</span>&#x000A;64: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dispatch</span>&#x000A;65: <span class="ruby-ivar">@request</span> = <span class="ruby-constant">Smoke</span><span class="ruby-operator">::</span><span class="ruby-constant">Request</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">build_uri</span>)&#x000A;66: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">items</span> = [(<span class="ruby-ivar">@path</span>.<span class="ruby-identifier">nil?</span>) <span class="ruby-operator">?</span> <span class="ruby-ivar">@request</span>.<span class="ruby-identifier">body</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">drill</span>(<span class="ruby-ivar">@request</span>.<span class="ruby-identifier">body</span>, <span class="ruby-operator">*</span><span class="ruby-ivar">@path</span>)]&#x000A;67: <span class="ruby-keyword kw">end</span></pre>
198
+ </div>
199
+ </div>
200
+ <div class='protected-instance method' id='method-M000018'>
201
+ <a name='M000018'> </a>
202
+ <div class='synopsis'>
203
+ <span class='name'>params</span>
204
+ <span class='arguments'>()</span>
205
+ </div>
206
+ <div class='source'>
207
+ <a class='source-toggle' href='#' onclick="toggleCode('M000018-source'); return false">
208
+ [show source]
209
+ </a>
210
+ <pre id='M000018-source'> <span class="ruby-comment cmt"># File lib/smoke/source/yql.rb, line 60</span>&#x000A;60: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">params</span> &#x000A;61: <span class="ruby-ivar">@params</span> <span class="ruby-operator">||</span> <span class="ruby-ivar">@params</span> = {}&#x000A;62: <span class="ruby-keyword kw">end</span></pre>
211
+ </div>
212
+ </div>
213
+ </div>
214
+ </div>
215
+ </div>
216
+ </div>
217
+ <div id='footer-push'></div>
218
+ </div>
219
+ <div id='footer'>
220
+ <a href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
221
+ </div>
222
+ </body>
223
+ </html>