torquebox-console 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1088) hide show
  1. data/bin/tbconsole +1 -2
  2. data/lib/torquebox/console/client.rb +11 -10
  3. data/lib/torquebox/console/version.rb +1 -1
  4. data/stomplets/torque_box_console.rb +7 -0
  5. data/vendor/bundle/ruby/1.8/bin/catstomp +23 -0
  6. data/vendor/bundle/ruby/1.8/bin/haml +23 -0
  7. data/vendor/bundle/ruby/1.8/bin/html2haml +23 -0
  8. data/vendor/bundle/ruby/1.8/bin/rackup +23 -0
  9. data/vendor/bundle/ruby/1.8/bin/rake +23 -0
  10. data/vendor/bundle/ruby/1.8/bin/rake2thor +23 -0
  11. data/vendor/bundle/ruby/1.8/bin/stompcat +23 -0
  12. data/vendor/bundle/ruby/1.8/bin/thor +23 -0
  13. data/vendor/bundle/ruby/1.8/bin/tilt +23 -0
  14. data/vendor/bundle/ruby/1.8/cache/haml-3.1.8.gem +0 -0
  15. data/vendor/bundle/ruby/1.8/cache/rack-1.5.2.gem +0 -0
  16. data/vendor/bundle/ruby/1.8/cache/rack-protection-1.4.0.gem +0 -0
  17. data/vendor/bundle/ruby/1.8/cache/rake-10.0.3.gem +0 -0
  18. data/vendor/bundle/ruby/1.8/cache/sinatra-1.3.5.gem +0 -0
  19. data/vendor/bundle/ruby/1.8/cache/stomp-1.2.8.gem +0 -0
  20. data/vendor/bundle/ruby/1.8/cache/thor-0.17.0.gem +0 -0
  21. data/vendor/bundle/ruby/1.8/cache/tilt-1.3.4.gem +0 -0
  22. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/CONTRIBUTING +3 -0
  23. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/MIT-LICENSE +20 -0
  24. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/README.md +133 -0
  25. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/REVISION +1 -0
  26. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/Rakefile +419 -0
  27. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/VERSION +1 -0
  28. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/VERSION_NAME +1 -0
  29. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/bin/haml +9 -0
  30. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/bin/html2haml +7 -0
  31. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/extra/update_watch.rb +13 -0
  32. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/init.rb +18 -0
  33. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/haml.rb +47 -0
  34. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/haml/buffer.rb +301 -0
  35. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/haml/compiler.rb +453 -0
  36. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/haml/engine.rb +312 -0
  37. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/haml/error.rb +22 -0
  38. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/haml/exec.rb +362 -0
  39. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/haml/filters.rb +385 -0
  40. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/haml/helpers.rb +608 -0
  41. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/haml/helpers/action_view_extensions.rb +57 -0
  42. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/haml/helpers/action_view_mods.rb +260 -0
  43. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/haml/helpers/rails_323_textarea_fix.rb +41 -0
  44. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/haml/helpers/xss_mods.rb +165 -0
  45. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/haml/html.rb +412 -0
  46. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/haml/html/erb.rb +141 -0
  47. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/haml/parser.rb +711 -0
  48. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/haml/railtie.rb +19 -0
  49. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/haml/root.rb +7 -0
  50. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/haml/shared.rb +78 -0
  51. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/haml/template.rb +99 -0
  52. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/haml/template/options.rb +16 -0
  53. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/haml/template/patch.rb +58 -0
  54. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/haml/template/plugin.rb +123 -0
  55. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/haml/util.rb +842 -0
  56. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/haml/version.rb +109 -0
  57. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/sass.rb +8 -0
  58. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/sass/plugin.rb +10 -0
  59. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/sass/rails2_shim.rb +9 -0
  60. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/lib/sass/rails3_shim.rb +16 -0
  61. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/rails/init.rb +1 -0
  62. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/benchmark.rb +91 -0
  63. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/gemfiles/Gemfile.rails-2.0.x +8 -0
  64. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/gemfiles/Gemfile.rails-2.0.x.lock +38 -0
  65. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/gemfiles/Gemfile.rails-2.1.x +8 -0
  66. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/gemfiles/Gemfile.rails-2.1.x.lock +38 -0
  67. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/gemfiles/Gemfile.rails-2.2.x +8 -0
  68. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/gemfiles/Gemfile.rails-2.2.x.lock +38 -0
  69. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/gemfiles/Gemfile.rails-2.3.x +8 -0
  70. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/gemfiles/Gemfile.rails-2.3.x.lock +40 -0
  71. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/gemfiles/Gemfile.rails-3.0.x +8 -0
  72. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/gemfiles/Gemfile.rails-3.0.x.lock +85 -0
  73. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/gemfiles/Gemfile.rails-3.1.x +8 -0
  74. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/gemfiles/Gemfile.rails-3.1.x.lock +97 -0
  75. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/gemfiles/Gemfile.rails-3.2.x +8 -0
  76. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/gemfiles/Gemfile.rails-3.2.x.lock +95 -0
  77. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/gemfiles/Gemfile.rails-xss-2.3.x +9 -0
  78. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/gemfiles/Gemfile.rails-xss-2.3.x.lock +42 -0
  79. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/engine_test.rb +1950 -0
  80. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/erb/_av_partial_1.erb +12 -0
  81. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/erb/_av_partial_2.erb +8 -0
  82. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/erb/action_view.erb +62 -0
  83. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/erb/standard.erb +55 -0
  84. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/helper_test.rb +467 -0
  85. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/html2haml/erb_tests.rb +440 -0
  86. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/html2haml_test.rb +336 -0
  87. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/markaby/standard.mab +52 -0
  88. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/mocks/article.rb +6 -0
  89. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/results/content_for_layout.xhtml +12 -0
  90. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/results/eval_suppressed.xhtml +9 -0
  91. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/results/filters.xhtml +62 -0
  92. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/results/helpers.xhtml +70 -0
  93. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/results/helpful.xhtml +10 -0
  94. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/results/just_stuff.xhtml +70 -0
  95. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/results/list.xhtml +12 -0
  96. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/results/nuke_inner_whitespace.xhtml +40 -0
  97. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/results/nuke_outer_whitespace.xhtml +148 -0
  98. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/results/original_engine.xhtml +20 -0
  99. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/results/partial_layout.xhtml +5 -0
  100. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/results/partials.xhtml +21 -0
  101. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/results/render_layout.xhtml +3 -0
  102. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/results/silent_script.xhtml +74 -0
  103. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/results/standard.xhtml +162 -0
  104. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/results/tag_parsing.xhtml +23 -0
  105. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/results/very_basic.xhtml +5 -0
  106. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/results/whitespace_handling.xhtml +85 -0
  107. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/spec/README.md +97 -0
  108. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/spec/lua_haml_spec.lua +30 -0
  109. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/spec/ruby_haml_test.rb +19 -0
  110. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/spec/tests.json +534 -0
  111. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/spec_test.rb +44 -0
  112. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/template_test.rb +443 -0
  113. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/_av_partial_1.haml +9 -0
  114. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/_av_partial_1_ugly.haml +9 -0
  115. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/_av_partial_2.haml +5 -0
  116. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/_av_partial_2_ugly.haml +5 -0
  117. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/_layout.erb +3 -0
  118. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/_layout_for_partial.haml +3 -0
  119. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/_partial.haml +8 -0
  120. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/_text_area.haml +3 -0
  121. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/action_view.haml +47 -0
  122. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/action_view_ugly.haml +47 -0
  123. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/breakage.haml +8 -0
  124. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/content_for_layout.haml +8 -0
  125. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/eval_suppressed.haml +11 -0
  126. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/filters.haml +66 -0
  127. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/helpers.haml +55 -0
  128. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/helpful.haml +11 -0
  129. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/just_stuff.haml +85 -0
  130. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/list.haml +12 -0
  131. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/nuke_inner_whitespace.haml +32 -0
  132. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/nuke_outer_whitespace.haml +144 -0
  133. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/original_engine.haml +17 -0
  134. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/partial_layout.haml +10 -0
  135. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/partialize.haml +1 -0
  136. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/partials.haml +12 -0
  137. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/render_layout.haml +2 -0
  138. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/silent_script.haml +40 -0
  139. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/standard.haml +43 -0
  140. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/standard_ugly.haml +43 -0
  141. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/tag_parsing.haml +21 -0
  142. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/very_basic.haml +4 -0
  143. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/templates/whitespace_handling.haml +87 -0
  144. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/haml/util_test.rb +300 -0
  145. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/linked_rails.rb +42 -0
  146. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/test/test_helper.rb +75 -0
  147. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/CONTRIBUTING +3 -0
  148. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/MIT-LICENSE +20 -0
  149. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/README.md +201 -0
  150. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/Rakefile +339 -0
  151. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/TODO +39 -0
  152. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/VERSION +1 -0
  153. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/VERSION_NAME +1 -0
  154. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/bin/sass +8 -0
  155. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/bin/sass-convert +7 -0
  156. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/bin/scss +8 -0
  157. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/doc-src/FAQ.md +35 -0
  158. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/doc-src/INDENTED_SYNTAX.md +210 -0
  159. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/doc-src/SASS_CHANGELOG.md +2327 -0
  160. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/doc-src/SASS_REFERENCE.md +1965 -0
  161. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/doc-src/SCSS_FOR_SASS_USERS.md +155 -0
  162. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/ext/extconf.rb +10 -0
  163. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/extra/update_watch.rb +13 -0
  164. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/init.rb +18 -0
  165. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass.rb +73 -0
  166. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/cache_stores.rb +15 -0
  167. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/cache_stores/base.rb +86 -0
  168. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/cache_stores/chain.rb +33 -0
  169. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/cache_stores/filesystem.rb +60 -0
  170. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/cache_stores/memory.rb +47 -0
  171. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/cache_stores/null.rb +25 -0
  172. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/callbacks.rb +66 -0
  173. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/css.rb +295 -0
  174. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/engine.rb +878 -0
  175. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/environment.rb +166 -0
  176. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/error.rb +201 -0
  177. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/exec.rb +672 -0
  178. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/importers.rb +22 -0
  179. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/importers/base.rb +139 -0
  180. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/importers/filesystem.rb +149 -0
  181. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/less.rb +382 -0
  182. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/logger.rb +15 -0
  183. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/logger/base.rb +32 -0
  184. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/logger/log_level.rb +49 -0
  185. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/plugin.rb +132 -0
  186. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/plugin/compiler.rb +383 -0
  187. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/plugin/configuration.rb +123 -0
  188. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/plugin/generic.rb +15 -0
  189. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/plugin/merb.rb +48 -0
  190. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/plugin/rack.rb +60 -0
  191. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/plugin/rails.rb +47 -0
  192. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/plugin/staleness_checker.rb +173 -0
  193. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/railtie.rb +9 -0
  194. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/repl.rb +58 -0
  195. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/root.rb +7 -0
  196. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/script.rb +40 -0
  197. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/script/bool.rb +18 -0
  198. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/script/color.rb +480 -0
  199. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/script/css_lexer.rb +29 -0
  200. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/script/css_parser.rb +31 -0
  201. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/script/funcall.rb +175 -0
  202. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/script/functions.rb +1386 -0
  203. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/script/interpolation.rb +79 -0
  204. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/script/lexer.rb +339 -0
  205. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/script/list.rb +83 -0
  206. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/script/literal.rb +250 -0
  207. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/script/node.rb +99 -0
  208. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/script/number.rb +452 -0
  209. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/script/operation.rb +99 -0
  210. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/script/parser.rb +474 -0
  211. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/script/string.rb +51 -0
  212. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/script/string_interpolation.rb +103 -0
  213. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/script/unary_operation.rb +64 -0
  214. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/script/variable.rb +59 -0
  215. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/scss.rb +17 -0
  216. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/scss/css_parser.rb +46 -0
  217. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/scss/parser.rb +960 -0
  218. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/scss/rx.rb +128 -0
  219. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/scss/sass_parser.rb +11 -0
  220. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/scss/script_lexer.rb +15 -0
  221. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/scss/script_parser.rb +25 -0
  222. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/scss/static_parser.rb +40 -0
  223. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/selector.rb +361 -0
  224. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/selector/abstract_sequence.rb +62 -0
  225. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/selector/comma_sequence.rb +81 -0
  226. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/selector/sequence.rb +233 -0
  227. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/selector/simple.rb +113 -0
  228. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/selector/simple_sequence.rb +134 -0
  229. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/shared.rb +78 -0
  230. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/charset_node.rb +22 -0
  231. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/comment_node.rb +90 -0
  232. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/debug_node.rb +18 -0
  233. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/directive_node.rb +23 -0
  234. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/each_node.rb +24 -0
  235. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/extend_node.rb +29 -0
  236. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/for_node.rb +36 -0
  237. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/function_node.rb +27 -0
  238. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/if_node.rb +52 -0
  239. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/import_node.rb +68 -0
  240. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/media_node.rb +32 -0
  241. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/mixin_def_node.rb +27 -0
  242. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/mixin_node.rb +32 -0
  243. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/node.rb +201 -0
  244. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/prop_node.rb +148 -0
  245. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/return_node.rb +18 -0
  246. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/root_node.rb +28 -0
  247. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/rule_node.rb +136 -0
  248. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/variable_node.rb +30 -0
  249. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/visitors/base.rb +75 -0
  250. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/visitors/check_nesting.rb +133 -0
  251. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/visitors/convert.rb +260 -0
  252. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/visitors/cssize.rb +175 -0
  253. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/visitors/deep_copy.rb +87 -0
  254. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/visitors/perform.rb +332 -0
  255. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/visitors/set_options.rb +97 -0
  256. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/visitors/to_css.rb +210 -0
  257. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/warn_node.rb +18 -0
  258. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/tree/while_node.rb +18 -0
  259. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/util.rb +721 -0
  260. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/util/subset_map.rb +101 -0
  261. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/lib/sass/version.rb +112 -0
  262. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/rails/init.rb +1 -0
  263. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/sass.gemspec +33 -0
  264. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/Gemfile +4 -0
  265. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/Gemfile.lock +19 -0
  266. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/cache_test.rb +89 -0
  267. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/callbacks_test.rb +61 -0
  268. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/conversion_test.rb +1199 -0
  269. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/css2sass_test.rb +373 -0
  270. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/data/hsl-rgb.txt +319 -0
  271. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/engine_test.rb +2567 -0
  272. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/extend_test.rb +1348 -0
  273. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/fixtures/test_staleness_check_across_importers.css +1 -0
  274. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/fixtures/test_staleness_check_across_importers.scss +1 -0
  275. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/functions_test.rb +1038 -0
  276. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/importer_test.rb +192 -0
  277. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/less_conversion_test.rb +653 -0
  278. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/logger_test.rb +58 -0
  279. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/mock_importer.rb +49 -0
  280. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/more_results/more1.css +9 -0
  281. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/more_results/more1_with_line_comments.css +26 -0
  282. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/more_results/more_import.css +29 -0
  283. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/more_templates/_more_partial.sass +2 -0
  284. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/more_templates/more1.sass +23 -0
  285. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/more_templates/more_import.sass +11 -0
  286. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/plugin_test.rb +472 -0
  287. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/results/alt.css +4 -0
  288. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/results/basic.css +9 -0
  289. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/results/compact.css +5 -0
  290. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/results/complex.css +86 -0
  291. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/results/compressed.css +1 -0
  292. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/results/expanded.css +19 -0
  293. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/results/if.css +3 -0
  294. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/results/import.css +31 -0
  295. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/results/import_charset.css +4 -0
  296. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/results/import_charset_1_8.css +4 -0
  297. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/results/import_charset_ibm866.css +4 -0
  298. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/results/line_numbers.css +49 -0
  299. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/results/mixins.css +95 -0
  300. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/results/multiline.css +24 -0
  301. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/results/nested.css +22 -0
  302. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/results/options.css +1 -0
  303. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/results/parent_ref.css +13 -0
  304. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/results/script.css +16 -0
  305. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/results/scss_import.css +31 -0
  306. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/results/scss_importee.css +2 -0
  307. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/results/subdir/nested_subdir/nested_subdir.css +1 -0
  308. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/results/subdir/subdir.css +3 -0
  309. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/results/units.css +11 -0
  310. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/results/warn.css +0 -0
  311. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/results/warn_imported.css +0 -0
  312. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/script_conversion_test.rb +285 -0
  313. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/script_test.rb +514 -0
  314. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/scss/css_test.rb +922 -0
  315. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/scss/rx_test.rb +156 -0
  316. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/scss/scss_test.rb +1273 -0
  317. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/scss/test_helper.rb +37 -0
  318. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/_imported_charset_ibm866.sass +4 -0
  319. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/_imported_charset_utf8.sass +4 -0
  320. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/_partial.sass +2 -0
  321. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/alt.sass +16 -0
  322. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/basic.sass +23 -0
  323. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/bork1.sass +2 -0
  324. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/bork2.sass +2 -0
  325. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/bork3.sass +2 -0
  326. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/bork4.sass +2 -0
  327. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/bork5.sass +3 -0
  328. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/compact.sass +17 -0
  329. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/complex.sass +305 -0
  330. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/compressed.sass +15 -0
  331. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/expanded.sass +17 -0
  332. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/if.sass +11 -0
  333. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/import.sass +12 -0
  334. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/import_charset.sass +7 -0
  335. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/import_charset_1_8.sass +4 -0
  336. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/import_charset_ibm866.sass +9 -0
  337. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/importee.less +2 -0
  338. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/importee.sass +19 -0
  339. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/line_numbers.sass +13 -0
  340. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/mixin_bork.sass +5 -0
  341. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/mixins.sass +76 -0
  342. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/multiline.sass +20 -0
  343. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/nested.sass +25 -0
  344. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/nested_bork1.sass +2 -0
  345. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/nested_bork2.sass +2 -0
  346. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/nested_bork3.sass +2 -0
  347. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/nested_bork4.sass +2 -0
  348. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/nested_bork5.sass +2 -0
  349. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/nested_import.sass +2 -0
  350. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/nested_mixin_bork.sass +6 -0
  351. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/options.sass +2 -0
  352. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/parent_ref.sass +25 -0
  353. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/script.sass +101 -0
  354. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/scss_import.scss +11 -0
  355. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/scss_importee.scss +1 -0
  356. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/subdir/nested_subdir/_nested_partial.sass +2 -0
  357. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/subdir/nested_subdir/nested_subdir.sass +3 -0
  358. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/subdir/subdir.sass +6 -0
  359. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/units.sass +11 -0
  360. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/warn.sass +3 -0
  361. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/templates/warn_imported.sass +4 -0
  362. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/test_helper.rb +8 -0
  363. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/util/subset_map_test.rb +91 -0
  364. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/sass/util_test.rb +266 -0
  365. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/test/test_helper.rb +69 -0
  366. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/Gemfile +3 -0
  367. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/LICENSE +20 -0
  368. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/README.markdown +83 -0
  369. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/Rakefile +11 -0
  370. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/example.rb +12 -0
  371. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/fssm.gemspec +24 -0
  372. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/lib/fssm.rb +37 -0
  373. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/lib/fssm/backends/fsevents.rb +36 -0
  374. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/lib/fssm/backends/inotify.rb +26 -0
  375. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/lib/fssm/backends/polling.rb +25 -0
  376. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/lib/fssm/backends/rbfsevent.rb +42 -0
  377. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/lib/fssm/backends/rubycocoa/fsevents.rb +131 -0
  378. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/lib/fssm/monitor.rb +36 -0
  379. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/lib/fssm/path.rb +94 -0
  380. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/lib/fssm/pathname.rb +36 -0
  381. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/lib/fssm/state/directory.rb +75 -0
  382. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/lib/fssm/state/file.rb +24 -0
  383. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/lib/fssm/support.rb +92 -0
  384. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/lib/fssm/tree.rb +176 -0
  385. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/lib/fssm/version.rb +3 -0
  386. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/profile/prof-cache.rb +40 -0
  387. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/profile/prof-fssm-pathname.html +1231 -0
  388. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/profile/prof-pathname-rubinius.rb +35 -0
  389. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/profile/prof-pathname.rb +68 -0
  390. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/profile/prof-plain-pathname.html +988 -0
  391. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/profile/prof.html +2379 -0
  392. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/spec/count_down_latch.rb +151 -0
  393. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/spec/monitor_spec.rb +202 -0
  394. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/spec/path_spec.rb +96 -0
  395. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/spec/root/duck/quack.txt +0 -0
  396. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/spec/root/file.css +0 -0
  397. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/spec/root/file.rb +0 -0
  398. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/spec/root/file.yml +0 -0
  399. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/spec/root/moo/cow.txt +0 -0
  400. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/vendor/fssm/spec/spec_helper.rb +14 -0
  401. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/yard/callbacks.rb +29 -0
  402. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/yard/default/fulldoc/html/css/common.sass +26 -0
  403. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/yard/default/layout/html/footer.erb +12 -0
  404. data/vendor/bundle/ruby/1.8/gems/haml-3.1.8/vendor/sass/yard/inherited_hash.rb +41 -0
  405. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/COPYING +18 -0
  406. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/KNOWN-ISSUES +30 -0
  407. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/README.rdoc +624 -0
  408. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/Rakefile +125 -0
  409. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/SPEC +237 -0
  410. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/bin/rackup +4 -0
  411. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/contrib/rack.png +0 -0
  412. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/contrib/rack.svg +150 -0
  413. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/contrib/rack_logo.svg +111 -0
  414. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/contrib/rdoc.css +412 -0
  415. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/example/lobster.ru +4 -0
  416. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/example/protectedlobster.rb +14 -0
  417. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/example/protectedlobster.ru +8 -0
  418. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack.rb +87 -0
  419. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/auth/abstract/handler.rb +37 -0
  420. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/auth/abstract/request.rb +43 -0
  421. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/auth/basic.rb +58 -0
  422. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/auth/digest/md5.rb +129 -0
  423. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/auth/digest/nonce.rb +51 -0
  424. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/auth/digest/params.rb +53 -0
  425. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/auth/digest/request.rb +41 -0
  426. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/backports/uri/common_18.rb +56 -0
  427. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/backports/uri/common_192.rb +52 -0
  428. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/backports/uri/common_193.rb +29 -0
  429. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/body_proxy.rb +39 -0
  430. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/builder.rb +149 -0
  431. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/cascade.rb +52 -0
  432. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/chunked.rb +58 -0
  433. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/commonlogger.rb +64 -0
  434. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/conditionalget.rb +67 -0
  435. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/config.rb +20 -0
  436. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/content_length.rb +33 -0
  437. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/content_type.rb +29 -0
  438. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/deflater.rb +116 -0
  439. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/directory.rb +161 -0
  440. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/etag.rb +64 -0
  441. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/file.rb +138 -0
  442. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/handler.rb +107 -0
  443. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/handler/cgi.rb +61 -0
  444. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/handler/evented_mongrel.rb +8 -0
  445. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/handler/fastcgi.rb +98 -0
  446. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/handler/lsws.rb +61 -0
  447. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/handler/mongrel.rb +100 -0
  448. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/handler/scgi.rb +67 -0
  449. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/handler/swiftiplied_mongrel.rb +8 -0
  450. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/handler/thin.rb +27 -0
  451. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/handler/webrick.rb +81 -0
  452. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/head.rb +22 -0
  453. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/lint.rb +699 -0
  454. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/lobster.rb +65 -0
  455. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/lock.rb +26 -0
  456. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/logger.rb +18 -0
  457. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/methodoverride.rb +31 -0
  458. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/mime.rb +677 -0
  459. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/mock.rb +190 -0
  460. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/multipart.rb +34 -0
  461. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/multipart/generator.rb +93 -0
  462. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/multipart/parser.rb +176 -0
  463. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/multipart/uploaded_file.rb +34 -0
  464. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/nulllogger.rb +18 -0
  465. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/recursive.rb +61 -0
  466. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/reloader.rb +109 -0
  467. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/request.rb +380 -0
  468. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/response.rb +155 -0
  469. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/rewindable_input.rb +104 -0
  470. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/runtime.rb +27 -0
  471. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/sendfile.rb +155 -0
  472. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/server.rb +362 -0
  473. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/session/abstract/id.rb +398 -0
  474. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/session/cookie.rb +178 -0
  475. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/session/memcache.rb +93 -0
  476. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/session/pool.rb +79 -0
  477. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/showexceptions.rb +378 -0
  478. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/showstatus.rb +113 -0
  479. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/static.rb +153 -0
  480. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/urlmap.rb +76 -0
  481. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/utils.rb +628 -0
  482. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/lib/rack/utils/okjson.rb +599 -0
  483. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/rack.gemspec +33 -0
  484. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/builder/anything.rb +5 -0
  485. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/builder/comment.ru +4 -0
  486. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/builder/end.ru +5 -0
  487. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/builder/line.ru +1 -0
  488. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/builder/options.ru +2 -0
  489. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/cgi/assets/folder/test.js +1 -0
  490. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/cgi/assets/fonts/font.eot +1 -0
  491. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/cgi/assets/images/image.png +1 -0
  492. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/cgi/assets/index.html +1 -0
  493. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/cgi/assets/javascripts/app.js +1 -0
  494. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/cgi/assets/stylesheets/app.css +1 -0
  495. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/cgi/lighttpd.conf +26 -0
  496. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/cgi/rackup_stub.rb +6 -0
  497. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/cgi/sample_rackup.ru +5 -0
  498. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/cgi/test +9 -0
  499. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/cgi/test+directory/test+file +1 -0
  500. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/cgi/test.fcgi +8 -0
  501. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/cgi/test.ru +5 -0
  502. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/gemloader.rb +10 -0
  503. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/multipart/bad_robots +259 -0
  504. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/multipart/binary +0 -0
  505. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/multipart/content_type_and_no_filename +6 -0
  506. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/multipart/empty +10 -0
  507. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/multipart/fail_16384_nofile +814 -0
  508. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/multipart/file1.txt +1 -0
  509. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/multipart/filename_and_modification_param +7 -0
  510. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/multipart/filename_with_escaped_quotes +6 -0
  511. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/multipart/filename_with_escaped_quotes_and_modification_param +7 -0
  512. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/multipart/filename_with_percent_escaped_quotes +6 -0
  513. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/multipart/filename_with_unescaped_percentages +6 -0
  514. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/multipart/filename_with_unescaped_percentages2 +6 -0
  515. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/multipart/filename_with_unescaped_percentages3 +6 -0
  516. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/multipart/filename_with_unescaped_quotes +6 -0
  517. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/multipart/ie +6 -0
  518. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/multipart/mixed_files +21 -0
  519. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/multipart/nested +10 -0
  520. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/multipart/none +9 -0
  521. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/multipart/semicolon +6 -0
  522. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/multipart/text +15 -0
  523. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/multipart/webkit +32 -0
  524. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/rackup/config.ru +31 -0
  525. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/registering_handler/rack/handler/registering_myself.rb +8 -0
  526. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_auth_basic.rb +81 -0
  527. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_auth_digest.rb +259 -0
  528. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_body_proxy.rb +69 -0
  529. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_builder.rb +214 -0
  530. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_cascade.rb +61 -0
  531. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_cgi.rb +102 -0
  532. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_chunked.rb +85 -0
  533. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_commonlogger.rb +57 -0
  534. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_conditionalget.rb +102 -0
  535. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_config.rb +22 -0
  536. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_content_length.rb +83 -0
  537. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_content_type.rb +45 -0
  538. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_deflater.rb +204 -0
  539. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_directory.rb +88 -0
  540. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_etag.rb +98 -0
  541. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_fastcgi.rb +107 -0
  542. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_file.rb +213 -0
  543. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_handler.rb +59 -0
  544. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_head.rb +43 -0
  545. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_lint.rb +522 -0
  546. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_lobster.rb +58 -0
  547. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_lock.rb +164 -0
  548. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_logger.rb +23 -0
  549. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_methodoverride.rb +75 -0
  550. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_mime.rb +51 -0
  551. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_mock.rb +269 -0
  552. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_mongrel.rb +182 -0
  553. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_multipart.rb +445 -0
  554. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_nulllogger.rb +20 -0
  555. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_recursive.rb +72 -0
  556. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_request.rb +1078 -0
  557. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_response.rb +313 -0
  558. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_rewindable_input.rb +118 -0
  559. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_runtime.rb +49 -0
  560. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_sendfile.rb +130 -0
  561. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_server.rb +143 -0
  562. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_session_abstract_id.rb +53 -0
  563. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_session_cookie.rb +367 -0
  564. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_session_memcache.rb +321 -0
  565. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_session_pool.rb +209 -0
  566. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_showexceptions.rb +92 -0
  567. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_showstatus.rb +84 -0
  568. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_static.rb +145 -0
  569. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_thin.rb +91 -0
  570. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_urlmap.rb +213 -0
  571. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_utils.rb +573 -0
  572. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/spec_webrick.rb +143 -0
  573. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/static/another/index.html +1 -0
  574. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/static/index.html +1 -0
  575. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/testrequest.rb +78 -0
  576. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/unregistered_handler/rack/handler/unregistered.rb +7 -0
  577. data/vendor/bundle/ruby/1.8/gems/rack-1.5.2/test/unregistered_handler/rack/handler/unregistered_long_one.rb +7 -0
  578. data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/License +20 -0
  579. data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/README.md +82 -0
  580. data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/Rakefile +48 -0
  581. data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/lib/rack-protection.rb +1 -0
  582. data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/lib/rack/protection.rb +40 -0
  583. data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/lib/rack/protection/authenticity_token.rb +24 -0
  584. data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/lib/rack/protection/base.rb +107 -0
  585. data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/lib/rack/protection/escaped_params.rb +87 -0
  586. data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/lib/rack/protection/form_token.rb +23 -0
  587. data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/lib/rack/protection/frame_options.rb +37 -0
  588. data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/lib/rack/protection/http_origin.rb +32 -0
  589. data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/lib/rack/protection/ip_spoofing.rb +23 -0
  590. data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/lib/rack/protection/json_csrf.rb +35 -0
  591. data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/lib/rack/protection/path_traversal.rb +36 -0
  592. data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/lib/rack/protection/remote_referrer.rb +20 -0
  593. data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/lib/rack/protection/remote_token.rb +22 -0
  594. data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/lib/rack/protection/session_hijacking.rb +36 -0
  595. data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/lib/rack/protection/version.rb +16 -0
  596. data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/lib/rack/protection/xss_header.rb +25 -0
  597. data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/rack-protection.gemspec +92 -0
  598. data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/spec/authenticity_token_spec.rb +33 -0
  599. data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/spec/escaped_params_spec.rb +44 -0
  600. data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/spec/form_token_spec.rb +33 -0
  601. data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/spec/frame_options_spec.rb +39 -0
  602. data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/spec/http_origin_spec.rb +38 -0
  603. data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/spec/ip_spoofing_spec.rb +35 -0
  604. data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/spec/json_csrf_spec.rb +44 -0
  605. data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/spec/path_traversal_spec.rb +28 -0
  606. data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/spec/protection_spec.rb +37 -0
  607. data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/spec/remote_referrer_spec.rb +31 -0
  608. data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/spec/remote_token_spec.rb +42 -0
  609. data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/spec/session_hijacking_spec.rb +54 -0
  610. data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/spec/spec_helper.rb +163 -0
  611. data/vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/spec/xss_header_spec.rb +56 -0
  612. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/CHANGES +526 -0
  613. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/MIT-LICENSE +21 -0
  614. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/README.rdoc +187 -0
  615. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/Rakefile +374 -0
  616. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/TODO +21 -0
  617. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/bin/rake +33 -0
  618. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/command_line_usage.rdoc +152 -0
  619. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/example/Rakefile1 +38 -0
  620. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/example/Rakefile2 +35 -0
  621. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/example/a.c +6 -0
  622. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/example/b.c +6 -0
  623. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/example/main.c +11 -0
  624. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/glossary.rdoc +51 -0
  625. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/jamis.rb +591 -0
  626. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/proto_rake.rdoc +127 -0
  627. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/rake.1.gz +0 -0
  628. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/rakefile.rdoc +557 -0
  629. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/rational.rdoc +151 -0
  630. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-0.4.14.rdoc +23 -0
  631. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-0.4.15.rdoc +35 -0
  632. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-0.5.0.rdoc +53 -0
  633. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-0.5.3.rdoc +78 -0
  634. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-0.5.4.rdoc +46 -0
  635. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-0.6.0.rdoc +141 -0
  636. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-0.7.0.rdoc +119 -0
  637. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-0.7.1.rdoc +59 -0
  638. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-0.7.2.rdoc +121 -0
  639. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-0.7.3.rdoc +47 -0
  640. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-0.8.0.rdoc +114 -0
  641. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-0.8.2.rdoc +165 -0
  642. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-0.8.3.rdoc +112 -0
  643. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-0.8.4.rdoc +147 -0
  644. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-0.8.5.rdoc +53 -0
  645. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-0.8.6.rdoc +55 -0
  646. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-0.8.7.rdoc +55 -0
  647. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-0.9.0.rdoc +112 -0
  648. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-0.9.1.rdoc +52 -0
  649. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-0.9.2.2.rdoc +55 -0
  650. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-0.9.2.rdoc +49 -0
  651. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-0.9.3.rdoc +102 -0
  652. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-0.9.4.rdoc +110 -0
  653. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-0.9.5.rdoc +114 -0
  654. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-0.9.6.rdoc +127 -0
  655. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-10.0.0.rdoc +178 -0
  656. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-10.0.1.rdoc +187 -0
  657. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-10.0.2.rdoc +191 -0
  658. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/doc/release_notes/rake-10.0.3.rdoc +191 -0
  659. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/install.rb +90 -0
  660. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake.rb +71 -0
  661. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/alt_system.rb +109 -0
  662. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/application.rb +669 -0
  663. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/backtrace.rb +18 -0
  664. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/clean.rb +32 -0
  665. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/cloneable.rb +16 -0
  666. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/contrib/compositepublisher.rb +21 -0
  667. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/contrib/ftptools.rb +151 -0
  668. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/contrib/publisher.rb +73 -0
  669. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/contrib/rubyforgepublisher.rb +16 -0
  670. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/contrib/sshpublisher.rb +50 -0
  671. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/contrib/sys.rb +1 -0
  672. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/default_loader.rb +10 -0
  673. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/dsl_definition.rb +156 -0
  674. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/early_time.rb +18 -0
  675. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/ext/core.rb +27 -0
  676. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/ext/module.rb +0 -0
  677. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/ext/string.rb +168 -0
  678. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/ext/time.rb +15 -0
  679. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/file_creation_task.rb +24 -0
  680. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/file_list.rb +410 -0
  681. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/file_task.rb +47 -0
  682. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/file_utils.rb +114 -0
  683. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/file_utils_ext.rb +146 -0
  684. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/gempackagetask.rb +1 -0
  685. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/invocation_chain.rb +51 -0
  686. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/invocation_exception_mixin.rb +16 -0
  687. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/loaders/makefile.rb +40 -0
  688. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/multi_task.rb +13 -0
  689. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/name_space.rb +25 -0
  690. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/packagetask.rb +185 -0
  691. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/pathmap.rb +1 -0
  692. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/phony.rb +15 -0
  693. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/private_reader.rb +20 -0
  694. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/promise.rb +99 -0
  695. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/pseudo_status.rb +24 -0
  696. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/rake_module.rb +37 -0
  697. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/rake_test_loader.rb +22 -0
  698. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/rdoctask.rb +1 -0
  699. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/ruby182_test_unit_fix.rb +25 -0
  700. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/rule_recursion_overflow_error.rb +20 -0
  701. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/runtest.rb +22 -0
  702. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/task.rb +350 -0
  703. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/task_argument_error.rb +7 -0
  704. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/task_arguments.rb +78 -0
  705. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/task_manager.rb +296 -0
  706. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/tasklib.rb +22 -0
  707. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/testtask.rb +198 -0
  708. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/thread_history_display.rb +48 -0
  709. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/thread_pool.rb +155 -0
  710. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/trace_output.rb +19 -0
  711. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/version.rb +13 -0
  712. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/lib/rake/win32.rb +55 -0
  713. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/file_creation.rb +34 -0
  714. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/helper.rb +562 -0
  715. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_private_reader.rb +42 -0
  716. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake.rb +40 -0
  717. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_application.rb +515 -0
  718. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_application_options.rb +443 -0
  719. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_backtrace.rb +89 -0
  720. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_clean.rb +14 -0
  721. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_definitions.rb +80 -0
  722. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_directory_task.rb +57 -0
  723. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_dsl.rb +40 -0
  724. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_early_time.rb +31 -0
  725. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_extension.rb +59 -0
  726. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_file_creation_task.rb +56 -0
  727. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_file_list.rb +628 -0
  728. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_file_list_path_map.rb +8 -0
  729. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_file_task.rb +122 -0
  730. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_file_utils.rb +305 -0
  731. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_ftp_file.rb +59 -0
  732. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_functional.rb +496 -0
  733. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_invocation_chain.rb +52 -0
  734. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_makefile_loader.rb +44 -0
  735. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_multi_task.rb +59 -0
  736. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_name_space.rb +43 -0
  737. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_package_task.rb +79 -0
  738. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_path_map.rb +157 -0
  739. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_path_map_explode.rb +34 -0
  740. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_path_map_partial.rb +18 -0
  741. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_pseudo_status.rb +21 -0
  742. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_rake_test_loader.rb +21 -0
  743. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_reduce_compat.rb +30 -0
  744. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_require.rb +40 -0
  745. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_rules.rb +327 -0
  746. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_task.rb +316 -0
  747. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_task_argument_parsing.rb +103 -0
  748. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_task_arguments.rb +88 -0
  749. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_task_lib.rb +9 -0
  750. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_task_manager.rb +157 -0
  751. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_task_manager_argument_resolution.rb +19 -0
  752. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_task_with_arguments.rb +171 -0
  753. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_test_task.rb +120 -0
  754. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_thread_pool.rb +123 -0
  755. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_top_level_functions.rb +71 -0
  756. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_rake_win32.rb +72 -0
  757. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_thread_history_display.rb +91 -0
  758. data/vendor/bundle/ruby/1.8/gems/rake-10.0.3/test/test_trace_output.rb +43 -0
  759. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/AUTHORS +61 -0
  760. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/CHANGES +1063 -0
  761. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/Gemfile +82 -0
  762. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/LICENSE +22 -0
  763. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/README.de.rdoc +2097 -0
  764. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/README.es.rdoc +2078 -0
  765. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/README.fr.rdoc +2036 -0
  766. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/README.hu.rdoc +607 -0
  767. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/README.jp.rdoc +1043 -0
  768. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/README.ko.rdoc +1926 -0
  769. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/README.pt-br.rdoc +647 -0
  770. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/README.pt-pt.rdoc +646 -0
  771. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/README.rdoc +2017 -0
  772. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/README.ru.rdoc +1785 -0
  773. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/README.zh.rdoc +1816 -0
  774. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/Rakefile +183 -0
  775. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/examples/chat.rb +61 -0
  776. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/examples/simple.rb +3 -0
  777. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/examples/stream.ru +26 -0
  778. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/lib/sinatra.rb +4 -0
  779. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/lib/sinatra/base.rb +1728 -0
  780. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/lib/sinatra/images/404.png +0 -0
  781. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/lib/sinatra/images/500.png +0 -0
  782. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/lib/sinatra/main.rb +28 -0
  783. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/lib/sinatra/showexceptions.rb +340 -0
  784. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/lib/sinatra/version.rb +3 -0
  785. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/sinatra.gemspec +18 -0
  786. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/base_test.rb +160 -0
  787. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/builder_test.rb +95 -0
  788. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/coffee_test.rb +92 -0
  789. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/contest.rb +98 -0
  790. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/creole_test.rb +65 -0
  791. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/delegator_test.rb +162 -0
  792. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/encoding_test.rb +20 -0
  793. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/erb_test.rb +104 -0
  794. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/extensions_test.rb +100 -0
  795. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/filter_test.rb +428 -0
  796. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/haml_test.rb +101 -0
  797. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/helper.rb +123 -0
  798. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/helpers_test.rb +1783 -0
  799. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/integration/app.rb +62 -0
  800. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/integration_helper.rb +214 -0
  801. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/integration_test.rb +85 -0
  802. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/less_test.rb +67 -0
  803. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/liquid_test.rb +59 -0
  804. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/mapped_error_test.rb +259 -0
  805. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/markaby_test.rb +80 -0
  806. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/markdown_test.rb +82 -0
  807. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/middleware_test.rb +68 -0
  808. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/nokogiri_test.rb +69 -0
  809. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/public/favicon.ico +0 -0
  810. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/rack_test.rb +45 -0
  811. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/radius_test.rb +59 -0
  812. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/rdoc_test.rb +66 -0
  813. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/readme_test.rb +136 -0
  814. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/request_test.rb +45 -0
  815. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/response_test.rb +66 -0
  816. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/result_test.rb +98 -0
  817. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/route_added_hook_test.rb +59 -0
  818. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/routing_test.rb +1126 -0
  819. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/sass_test.rb +116 -0
  820. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/scss_test.rb +89 -0
  821. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/server_test.rb +48 -0
  822. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/settings_test.rb +538 -0
  823. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/sinatra_test.rb +17 -0
  824. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/slim_test.rb +88 -0
  825. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/static_test.rb +178 -0
  826. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/streaming_test.rb +140 -0
  827. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/templates_test.rb +298 -0
  828. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/textile_test.rb +65 -0
  829. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/a/in_a.str +1 -0
  830. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/ascii.erb +2 -0
  831. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/b/in_b.str +1 -0
  832. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/calc.html.erb +1 -0
  833. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/error.builder +3 -0
  834. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/error.erb +3 -0
  835. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/error.haml +3 -0
  836. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/error.sass +2 -0
  837. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/explicitly_nested.str +1 -0
  838. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/foo/hello.test +1 -0
  839. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/hello.builder +1 -0
  840. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/hello.coffee +1 -0
  841. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/hello.creole +1 -0
  842. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/hello.erb +1 -0
  843. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/hello.haml +1 -0
  844. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/hello.less +5 -0
  845. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/hello.liquid +1 -0
  846. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/hello.mab +1 -0
  847. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/hello.md +1 -0
  848. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/hello.nokogiri +1 -0
  849. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/hello.radius +1 -0
  850. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/hello.rdoc +1 -0
  851. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/hello.sass +2 -0
  852. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/hello.scss +3 -0
  853. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/hello.slim +1 -0
  854. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/hello.str +1 -0
  855. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/hello.test +1 -0
  856. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/hello.textile +1 -0
  857. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/layout2.builder +3 -0
  858. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/layout2.erb +2 -0
  859. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/layout2.haml +2 -0
  860. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/layout2.liquid +2 -0
  861. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/layout2.mab +2 -0
  862. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/layout2.nokogiri +3 -0
  863. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/layout2.radius +2 -0
  864. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/layout2.slim +3 -0
  865. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/layout2.str +2 -0
  866. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/layout2.test +1 -0
  867. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/nested.str +1 -0
  868. data/vendor/bundle/ruby/1.8/gems/sinatra-1.3.5/test/views/utf8.erb +2 -0
  869. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/CHANGELOG.rdoc +196 -0
  870. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/LICENSE +202 -0
  871. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/README.rdoc +132 -0
  872. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/Rakefile +80 -0
  873. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/bin/catstomp +74 -0
  874. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/bin/stompcat +75 -0
  875. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/examples/client11_ex1.rb +89 -0
  876. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/examples/client11_putget1.rb +71 -0
  877. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/examples/conn11_ex1.rb +112 -0
  878. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/examples/conn11_ex2.rb +87 -0
  879. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/examples/conn11_hb1.rb +57 -0
  880. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/examples/consumer.rb +34 -0
  881. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/examples/get11conn_ex1.rb +117 -0
  882. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/examples/get11conn_ex2.rb +77 -0
  883. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/examples/logexamp.rb +81 -0
  884. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/examples/logexamp_ssl.rb +81 -0
  885. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/examples/publisher.rb +30 -0
  886. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/examples/put11conn_ex1.rb +56 -0
  887. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/examples/putget11_rh1.rb +93 -0
  888. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/examples/slogger.rb +222 -0
  889. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/examples/ssl_uc1.rb +46 -0
  890. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/examples/ssl_uc1_ciphers.rb +46 -0
  891. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/examples/ssl_uc2.rb +48 -0
  892. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/examples/ssl_uc2_ciphers.rb +47 -0
  893. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/examples/ssl_uc3.rb +50 -0
  894. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/examples/ssl_uc3_ciphers.rb +47 -0
  895. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/examples/ssl_uc4.rb +50 -0
  896. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/examples/ssl_uc4_ciphers.rb +48 -0
  897. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/examples/ssl_ucx_default_ciphers.rb +41 -0
  898. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/examples/stomp11_common.rb +48 -0
  899. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/examples/topic_consumer.rb +32 -0
  900. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/examples/topic_publisher.rb +29 -0
  901. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/lib/client/utils.rb +116 -0
  902. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/lib/connection/heartbeats.rb +175 -0
  903. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/lib/connection/netio.rb +360 -0
  904. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/lib/connection/utf8.rb +294 -0
  905. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/lib/connection/utils.rb +239 -0
  906. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/lib/stomp.rb +39 -0
  907. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/lib/stomp/client.rb +350 -0
  908. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/lib/stomp/codec.rb +44 -0
  909. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/lib/stomp/connection.rb +452 -0
  910. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/lib/stomp/constants.rb +114 -0
  911. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/lib/stomp/errors.rb +195 -0
  912. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/lib/stomp/ext/hash.rb +31 -0
  913. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/lib/stomp/message.rb +117 -0
  914. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/lib/stomp/sslparams.rb +84 -0
  915. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/lib/stomp/version.rb +12 -0
  916. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/spec/client_shared_examples.rb +71 -0
  917. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/spec/client_spec.rb +329 -0
  918. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/spec/connection_spec.rb +431 -0
  919. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/spec/message_spec.rb +58 -0
  920. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/spec/spec_helper.rb +8 -0
  921. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/stomp.gemspec +151 -0
  922. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/test/test_client.rb +531 -0
  923. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/test/test_codec.rb +119 -0
  924. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/test/test_connection.rb +517 -0
  925. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/test/test_connection1p.rb +396 -0
  926. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/test/test_helper.rb +168 -0
  927. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/test/test_message.rb +173 -0
  928. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/test/test_ssl.rb +81 -0
  929. data/vendor/bundle/ruby/1.8/gems/stomp-1.2.8/test/tlogger.rb +80 -0
  930. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/CHANGELOG.rdoc +142 -0
  931. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/Gemfile +19 -0
  932. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/LICENSE.md +20 -0
  933. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/README.md +28 -0
  934. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/Thorfile +30 -0
  935. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/bin/rake2thor +86 -0
  936. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/bin/thor +6 -0
  937. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor.rb +448 -0
  938. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/actions.rb +318 -0
  939. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/actions/create_file.rb +105 -0
  940. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/actions/create_link.rb +57 -0
  941. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/actions/directory.rb +117 -0
  942. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/actions/empty_directory.rb +153 -0
  943. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/actions/file_manipulation.rb +314 -0
  944. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/actions/inject_into_file.rb +109 -0
  945. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/base.rb +654 -0
  946. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/core_ext/file_binary_read.rb +9 -0
  947. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/core_ext/hash_with_indifferent_access.rb +80 -0
  948. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/core_ext/ordered_hash.rb +100 -0
  949. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/error.rb +35 -0
  950. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/group.rb +285 -0
  951. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/invocation.rb +170 -0
  952. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/parser.rb +4 -0
  953. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/parser/argument.rb +74 -0
  954. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/parser/arguments.rb +171 -0
  955. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/parser/option.rb +121 -0
  956. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/parser/options.rb +216 -0
  957. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/rake_compat.rb +72 -0
  958. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/runner.rb +321 -0
  959. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/shell.rb +88 -0
  960. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/shell/basic.rb +389 -0
  961. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/shell/color.rb +144 -0
  962. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/shell/html.rb +123 -0
  963. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/task.rb +132 -0
  964. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/util.rb +266 -0
  965. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/lib/thor/version.rb +3 -0
  966. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/actions/create_file_spec.rb +170 -0
  967. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/actions/create_link_spec.rb +81 -0
  968. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/actions/directory_spec.rb +156 -0
  969. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/actions/empty_directory_spec.rb +130 -0
  970. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/actions/file_manipulation_spec.rb +382 -0
  971. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/actions/inject_into_file_spec.rb +135 -0
  972. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/actions_spec.rb +331 -0
  973. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/base_spec.rb +279 -0
  974. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/core_ext/hash_with_indifferent_access_spec.rb +48 -0
  975. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/core_ext/ordered_hash_spec.rb +115 -0
  976. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/exit_condition_spec.rb +19 -0
  977. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/fixtures/application.rb +2 -0
  978. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/fixtures/app{1}/README +3 -0
  979. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/fixtures/bundle/execute.rb +6 -0
  980. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/fixtures/bundle/main.thor +1 -0
  981. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/fixtures/doc/%file_name%.rb.tt +1 -0
  982. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/fixtures/doc/COMMENTER +11 -0
  983. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/fixtures/doc/README +3 -0
  984. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/fixtures/doc/block_helper.rb +3 -0
  985. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/fixtures/doc/config.rb +1 -0
  986. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/fixtures/doc/config.yaml.tt +1 -0
  987. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/fixtures/enum.thor +10 -0
  988. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/fixtures/group.thor +114 -0
  989. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/fixtures/invoke.thor +112 -0
  990. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/fixtures/path with spaces b/data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/fixtures/path with → spaces +0 -0
  991. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/fixtures/preserve/script.sh +3 -0
  992. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/fixtures/script.thor +195 -0
  993. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/fixtures/task.thor +10 -0
  994. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/group_spec.rb +216 -0
  995. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/invocation_spec.rb +100 -0
  996. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/parser/argument_spec.rb +53 -0
  997. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/parser/arguments_spec.rb +66 -0
  998. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/parser/option_spec.rb +202 -0
  999. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/parser/options_spec.rb +395 -0
  1000. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/rake_compat_spec.rb +72 -0
  1001. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/register_spec.rb +197 -0
  1002. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/runner_spec.rb +241 -0
  1003. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/shell/basic_spec.rb +312 -0
  1004. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/shell/color_spec.rb +81 -0
  1005. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/shell/html_spec.rb +32 -0
  1006. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/shell_spec.rb +47 -0
  1007. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/spec_helper.rb +63 -0
  1008. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/task_spec.rb +80 -0
  1009. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/thor_spec.rb +488 -0
  1010. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/spec/util_spec.rb +196 -0
  1011. data/vendor/bundle/ruby/1.8/gems/thor-0.17.0/thor.gemspec +20 -0
  1012. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/COPYING +18 -0
  1013. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/Gemfile +32 -0
  1014. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/HACKING +16 -0
  1015. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/README.md +211 -0
  1016. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/Rakefile +104 -0
  1017. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/TEMPLATES.md +516 -0
  1018. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/bin/tilt +112 -0
  1019. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/lib/tilt.rb +204 -0
  1020. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/lib/tilt/asciidoc.rb +34 -0
  1021. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/lib/tilt/builder.rb +40 -0
  1022. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/lib/tilt/coffee.rb +54 -0
  1023. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/lib/tilt/css.rb +80 -0
  1024. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/lib/tilt/csv.rb +71 -0
  1025. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/lib/tilt/erb.rb +110 -0
  1026. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/lib/tilt/etanni.rb +27 -0
  1027. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/lib/tilt/haml.rb +64 -0
  1028. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/lib/tilt/liquid.rb +45 -0
  1029. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/lib/tilt/markaby.rb +52 -0
  1030. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/lib/tilt/markdown.rb +214 -0
  1031. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/lib/tilt/nokogiri.rb +43 -0
  1032. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/lib/tilt/plain.rb +20 -0
  1033. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/lib/tilt/radius.rb +55 -0
  1034. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/lib/tilt/rdoc.rb +47 -0
  1035. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/lib/tilt/string.rb +21 -0
  1036. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/lib/tilt/template.rb +246 -0
  1037. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/lib/tilt/textile.rb +30 -0
  1038. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/lib/tilt/wiki.rb +58 -0
  1039. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/lib/tilt/yajl.rb +94 -0
  1040. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/contest.rb +68 -0
  1041. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/markaby/locals.mab +1 -0
  1042. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/markaby/markaby.mab +1 -0
  1043. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/markaby/markaby_other_static.mab +1 -0
  1044. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/markaby/render_twice.mab +1 -0
  1045. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/markaby/scope.mab +1 -0
  1046. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/markaby/yielding.mab +2 -0
  1047. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_asciidoctor_test.rb +44 -0
  1048. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_blueclothtemplate_test.rb +45 -0
  1049. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_buildertemplate_test.rb +59 -0
  1050. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_cache_test.rb +32 -0
  1051. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_coffeescripttemplate_test.rb +114 -0
  1052. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_compilesite_test.rb +51 -0
  1053. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_creoletemplate_test.rb +28 -0
  1054. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_csv_test.rb +73 -0
  1055. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_erbtemplate_test.rb +239 -0
  1056. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_erubistemplate_test.rb +151 -0
  1057. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_etannitemplate_test.rb +173 -0
  1058. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_fallback_test.rb +122 -0
  1059. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_hamltemplate_test.rb +144 -0
  1060. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_kramdown_test.rb +42 -0
  1061. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_lesstemplate_test.less +1 -0
  1062. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_lesstemplate_test.rb +42 -0
  1063. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_liquidtemplate_test.rb +78 -0
  1064. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_markaby_test.rb +88 -0
  1065. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_markdown_test.rb +172 -0
  1066. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_marukutemplate_test.rb +48 -0
  1067. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_nokogiritemplate_test.rb +87 -0
  1068. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_radiustemplate_test.rb +75 -0
  1069. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_rdiscounttemplate_test.rb +55 -0
  1070. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_rdoctemplate_test.rb +31 -0
  1071. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_redcarpettemplate_test.rb +71 -0
  1072. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_redclothtemplate_test.rb +36 -0
  1073. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_sasstemplate_test.rb +41 -0
  1074. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_stringtemplate_test.rb +170 -0
  1075. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_template_test.rb +167 -0
  1076. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_test.rb +65 -0
  1077. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_wikiclothtemplate_test.rb +32 -0
  1078. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/test/tilt_yajltemplate_test.rb +101 -0
  1079. data/vendor/bundle/ruby/1.8/gems/tilt-1.3.4/tilt.gemspec +119 -0
  1080. data/vendor/bundle/ruby/1.8/specifications/haml-3.1.8.gemspec +34 -0
  1081. data/vendor/bundle/ruby/1.8/specifications/rack-1.5.2.gemspec +36 -0
  1082. data/vendor/bundle/ruby/1.8/specifications/rack-protection-1.4.0.gemspec +34 -0
  1083. data/vendor/bundle/ruby/1.8/specifications/rake-10.0.3.gemspec +34 -0
  1084. data/vendor/bundle/ruby/1.8/specifications/sinatra-1.3.5.gemspec +37 -0
  1085. data/vendor/bundle/ruby/1.8/specifications/stomp-1.2.8.gemspec +31 -0
  1086. data/vendor/bundle/ruby/1.8/specifications/thor-0.17.0.gemspec +30 -0
  1087. data/vendor/bundle/ruby/1.8/specifications/tilt-1.3.4.gemspec +98 -0
  1088. metadata +1263 -2
@@ -0,0 +1,2017 @@
1
+ = Sinatra
2
+
3
+ Sinatra is a DSL for quickly creating web applications in Ruby with minimal
4
+ effort:
5
+
6
+ # myapp.rb
7
+ require 'sinatra'
8
+
9
+ get '/' do
10
+ 'Hello world!'
11
+ end
12
+
13
+ Install the gem and run with:
14
+
15
+ gem install sinatra
16
+ ruby -rubygems myapp.rb
17
+
18
+ View at: http://localhost:4567
19
+
20
+ It is recommended to also run <tt>gem install thin</tt>, which Sinatra will
21
+ pick up if available.
22
+
23
+ == Routes
24
+
25
+ In Sinatra, a route is an HTTP method paired with a URL-matching pattern.
26
+ Each route is associated with a block:
27
+
28
+ get '/' do
29
+ .. show something ..
30
+ end
31
+
32
+ post '/' do
33
+ .. create something ..
34
+ end
35
+
36
+ put '/' do
37
+ .. replace something ..
38
+ end
39
+
40
+ patch '/' do
41
+ .. modify something ..
42
+ end
43
+
44
+ delete '/' do
45
+ .. annihilate something ..
46
+ end
47
+
48
+ options '/' do
49
+ .. appease something ..
50
+ end
51
+
52
+ Routes are matched in the order they are defined. The first route that
53
+ matches the request is invoked.
54
+
55
+ Route patterns may include named parameters, accessible via the
56
+ <tt>params</tt> hash:
57
+
58
+ get '/hello/:name' do
59
+ # matches "GET /hello/foo" and "GET /hello/bar"
60
+ # params[:name] is 'foo' or 'bar'
61
+ "Hello #{params[:name]}!"
62
+ end
63
+
64
+ You can also access named parameters via block parameters:
65
+
66
+ get '/hello/:name' do |n|
67
+ "Hello #{n}!"
68
+ end
69
+
70
+ Route patterns may also include splat (or wildcard) parameters, accessible
71
+ via the <tt>params[:splat]</tt> array:
72
+
73
+ get '/say/*/to/*' do
74
+ # matches /say/hello/to/world
75
+ params[:splat] # => ["hello", "world"]
76
+ end
77
+
78
+ get '/download/*.*' do
79
+ # matches /download/path/to/file.xml
80
+ params[:splat] # => ["path/to/file", "xml"]
81
+ end
82
+
83
+ Or with block parameters:
84
+
85
+ get '/download/*.*' do |path, ext|
86
+ [path, ext] # => ["path/to/file", "xml"]
87
+ end
88
+
89
+ Route matching with Regular Expressions:
90
+
91
+ get %r{/hello/([\w]+)} do
92
+ "Hello, #{params[:captures].first}!"
93
+ end
94
+
95
+ Or with a block parameter:
96
+
97
+ get %r{/hello/([\w]+)} do |c|
98
+ "Hello, #{c}!"
99
+ end
100
+
101
+ Route patterns may have optional parameters:
102
+
103
+ get '/posts.?:format?' do
104
+ # matches "GET /posts" and any extension "GET /posts.json", "GET /posts.xml" etc.
105
+ end
106
+
107
+ By the way, unless you disable the path traversal attack protection (see below),
108
+ the request path might be modified before matching against your routes.
109
+
110
+ === Conditions
111
+
112
+ Routes may include a variety of matching conditions, such as the user agent:
113
+
114
+ get '/foo', :agent => /Songbird (\d\.\d)[\d\/]*?/ do
115
+ "You're using Songbird version #{params[:agent][0]}"
116
+ end
117
+
118
+ get '/foo' do
119
+ # Matches non-songbird browsers
120
+ end
121
+
122
+ Other available conditions are +host_name+ and +provides+:
123
+
124
+ get '/', :host_name => /^admin\./ do
125
+ "Admin Area, Access denied!"
126
+ end
127
+
128
+ get '/', :provides => 'html' do
129
+ haml :index
130
+ end
131
+
132
+ get '/', :provides => ['rss', 'atom', 'xml'] do
133
+ builder :feed
134
+ end
135
+
136
+ You can easily define your own conditions:
137
+
138
+ set(:probability) { |value| condition { rand <= value } }
139
+
140
+ get '/win_a_car', :probability => 0.1 do
141
+ "You won!"
142
+ end
143
+
144
+ get '/win_a_car' do
145
+ "Sorry, you lost."
146
+ end
147
+
148
+ For a condition that takes multiple values use a splat:
149
+
150
+ set(:auth) do |*roles| # <- notice the splat here
151
+ condition do
152
+ unless logged_in? && roles.any? {|role| current_user.in_role? role }
153
+ redirect "/login/", 303
154
+ end
155
+ end
156
+ end
157
+
158
+ get "/my/account/", :auth => [:user, :admin] do
159
+ "Your Account Details"
160
+ end
161
+
162
+ get "/only/admin/", :auth => :admin do
163
+ "Only admins are allowed here!"
164
+ end
165
+
166
+ === Return Values
167
+
168
+ The return value of a route block determines at least the response body passed
169
+ on to the HTTP client, or at least the next middleware in the Rack stack.
170
+ Most commonly, this is a string, as in the above examples. But other values are
171
+ also accepted.
172
+
173
+ You can return any object that would either be a valid Rack response, Rack
174
+ body object or HTTP status code:
175
+
176
+ * An Array with three elements: <tt>[status (Fixnum), headers (Hash), response
177
+ body (responds to #each)]</tt>
178
+ * An Array with two elements: <tt>[status (Fixnum), response body (responds to
179
+ #each)]</tt>
180
+ * An object that responds to <tt>#each</tt> and passes nothing but strings to
181
+ the given block
182
+ * A Fixnum representing the status code
183
+
184
+ That way we can, for instance, easily implement a streaming example:
185
+
186
+ class Stream
187
+ def each
188
+ 100.times { |i| yield "#{i}\n" }
189
+ end
190
+ end
191
+
192
+ get('/') { Stream.new }
193
+
194
+ You can also use the +stream+ helper method (described below) to reduce boiler
195
+ plate and embed the streaming logic in the route.
196
+
197
+ === Custom Route Matchers
198
+
199
+ As shown above, Sinatra ships with built-in support for using String patterns
200
+ and regular expressions as route matches. However, it does not stop there. You
201
+ can easily define your own matchers:
202
+
203
+ class AllButPattern
204
+ Match = Struct.new(:captures)
205
+
206
+ def initialize(except)
207
+ @except = except
208
+ @captures = Match.new([])
209
+ end
210
+
211
+ def match(str)
212
+ @captures unless @except === str
213
+ end
214
+ end
215
+
216
+ def all_but(pattern)
217
+ AllButPattern.new(pattern)
218
+ end
219
+
220
+ get all_but("/index") do
221
+ # ...
222
+ end
223
+
224
+ Note that the above example might be over-engineered, as it can also be
225
+ expressed as:
226
+
227
+ get // do
228
+ pass if request.path_info == "/index"
229
+ # ...
230
+ end
231
+
232
+ Or, using negative look ahead:
233
+
234
+ get %r{^(?!/index$)} do
235
+ # ...
236
+ end
237
+
238
+ == Static Files
239
+
240
+ Static files are served from the <tt>./public</tt> directory. You can specify
241
+ a different location by setting the <tt>:public_folder</tt> option:
242
+
243
+ set :public_folder, File.dirname(__FILE__) + '/static'
244
+
245
+ Note that the public directory name is not included in the URL. A file
246
+ <tt>./public/css/style.css</tt> is made available as
247
+ <tt>http://example.com/css/style.css</tt>.
248
+
249
+ Use the <tt>:static_cache_control</tt> setting (see below) to add
250
+ <tt>Cache-Control</tt> header info.
251
+
252
+ == Views / Templates
253
+
254
+ Each template language is exposed via its own rendering method. These
255
+ methods simply return a string:
256
+
257
+ get '/' do
258
+ erb :index
259
+ end
260
+
261
+ This renders <tt>views/index.erb</tt>.
262
+
263
+ Instead of a template name, you can also just pass in the template content
264
+ directly:
265
+
266
+ get '/' do
267
+ code = "<%= Time.now %>"
268
+ erb code
269
+ end
270
+
271
+ Templates take a second argument, the options hash:
272
+
273
+ get '/' do
274
+ erb :index, :layout => :post
275
+ end
276
+
277
+ This will render <tt>views/index.erb</tt> embedded in the
278
+ <tt>views/post.erb</tt> (default is <tt>views/layout.erb</tt>, if it exists).
279
+
280
+ Any options not understood by Sinatra will be passed on to the template
281
+ engine:
282
+
283
+ get '/' do
284
+ haml :index, :format => :html5
285
+ end
286
+
287
+ You can also set options per template language in general:
288
+
289
+ set :haml, :format => :html5
290
+
291
+ get '/' do
292
+ haml :index
293
+ end
294
+
295
+ Options passed to the render method override options set via +set+.
296
+
297
+ Available Options:
298
+
299
+ [locals]
300
+ List of locals passed to the document. Handy with partials.
301
+ Example: <tt>erb "<%= foo %>", :locals => {:foo => "bar"}</tt>
302
+
303
+ [default_encoding]
304
+ String encoding to use if uncertain. Defaults to
305
+ <tt>settings.default_encoding</tt>.
306
+
307
+ [views]
308
+ Views folder to load templates from. Defaults to <tt>settings.views</tt>.
309
+
310
+ [layout]
311
+ Whether to use a layout (+true+ or +false+), if it's a Symbol, specifies
312
+ what template to use. Example: <tt>erb :index, :layout => !request.xhr?</tt>
313
+
314
+ [content_type]
315
+ Content-Type the template produces, default depends on template language.
316
+
317
+ [scope]
318
+ Scope to render template under. Defaults to the application instance. If you
319
+ change this, instance variables and helper methods will not be available.
320
+
321
+ [layout_engine]
322
+ Template engine to use for rendering the layout. Useful for languages that
323
+ do not support layouts otherwise. Defaults to the engine used for the
324
+ template. Example: <tt>set :rdoc, :layout_engine => :erb</tt>
325
+
326
+ Templates are assumed to be located directly under the <tt>./views</tt>
327
+ directory. To use a different views directory:
328
+
329
+ set :views, settings.root + '/templates'
330
+
331
+ One important thing to remember is that you always have to reference
332
+ templates with symbols, even if they're in a subdirectory (in this
333
+ case, use <tt>:'subdir/template'</tt>). You must use a symbol because
334
+ otherwise rendering methods will render any strings passed to them
335
+ directly.
336
+
337
+ === Available Template Languages
338
+
339
+ Some languages have multiple implementations. To specify what implementation
340
+ to use (and to be thread-safe), you should simply require it first:
341
+
342
+ require 'rdiscount' # or require 'bluecloth'
343
+ get('/') { markdown :index }
344
+
345
+ === Haml Templates
346
+
347
+ Dependency:: {haml}[http://haml.info/]
348
+ File Extensions:: <tt>.haml</tt>
349
+ Example:: <tt>haml :index, :format => :html5</tt>
350
+
351
+ === Erb Templates
352
+
353
+ Dependency:: {erubis}[http://www.kuwata-lab.com/erubis/] or
354
+ erb (included in Ruby)
355
+ File Extensions:: <tt>.erb</tt>, <tt>.rhtml</tt> or <tt>.erubis</tt> (Erubis
356
+ only)
357
+ Example:: <tt>erb :index</tt>
358
+
359
+ === Builder Templates
360
+
361
+ Dependency:: {builder}[http://builder.rubyforge.org/]
362
+ File Extensions:: <tt>.builder</tt>
363
+ Example:: <tt>builder { |xml| xml.em "hi" }</tt>
364
+
365
+ It also takes a block for inline templates (see example).
366
+
367
+ === Nokogiri Templates
368
+
369
+ Dependency:: {nokogiri}[http://nokogiri.org/]
370
+ File Extensions:: <tt>.nokogiri</tt>
371
+ Example:: <tt>nokogiri { |xml| xml.em "hi" }</tt>
372
+
373
+ It also takes a block for inline templates (see example).
374
+
375
+ === Sass Templates
376
+
377
+ Dependency:: {sass}[http://sass-lang.com/]
378
+ File Extensions:: <tt>.sass</tt>
379
+ Example:: <tt>sass :stylesheet, :style => :expanded</tt>
380
+
381
+ === SCSS Templates
382
+
383
+ Dependency:: {sass}[http://sass-lang.com/]
384
+ File Extensions:: <tt>.scss</tt>
385
+ Example:: <tt>scss :stylesheet, :style => :expanded</tt>
386
+
387
+ === Less Templates
388
+
389
+ Dependency:: {less}[http://www.lesscss.org/]
390
+ File Extensions:: <tt>.less</tt>
391
+ Example:: <tt>less :stylesheet</tt>
392
+
393
+ === Liquid Templates
394
+
395
+ Dependency:: {liquid}[http://www.liquidmarkup.org/]
396
+ File Extensions:: <tt>.liquid</tt>
397
+ Example:: <tt>liquid :index, :locals => { :key => 'value' }</tt>
398
+
399
+ Since you cannot call Ruby methods (except for +yield+) from a Liquid
400
+ template, you almost always want to pass locals to it.
401
+
402
+ === Markdown Templates
403
+
404
+ Dependency:: {rdiscount}[https://github.com/rtomayko/rdiscount],
405
+ {redcarpet}[https://github.com/tanoku/redcarpet],
406
+ {bluecloth}[http://deveiate.org/projects/BlueCloth],
407
+ {kramdown}[http://kramdown.rubyforge.org/] *or*
408
+ {maruku}[http://maruku.rubyforge.org/]
409
+ File Extensions:: <tt>.markdown</tt>, <tt>.mkd</tt> and <tt>.md</tt>
410
+ Example:: <tt>markdown :index, :layout_engine => :erb</tt>
411
+
412
+ It is not possible to call methods from markdown, nor to pass locals to it.
413
+ You therefore will usually use it in combination with another rendering
414
+ engine:
415
+
416
+ erb :overview, :locals => { :text => markdown(:introduction) }
417
+
418
+ Note that you may also call the +markdown+ method from within other templates:
419
+
420
+ %h1 Hello From Haml!
421
+ %p= markdown(:greetings)
422
+
423
+ Since you cannot call Ruby from Markdown, you cannot use layouts written in
424
+ Markdown. However, it is possible to use another rendering engine for the
425
+ template than for the layout by passing the <tt>:layout_engine</tt> option.
426
+
427
+ === Textile Templates
428
+
429
+ Dependency:: {RedCloth}[http://redcloth.org/]
430
+ File Extensions:: <tt>.textile</tt>
431
+ Example:: <tt>textile :index, :layout_engine => :erb</tt>
432
+
433
+ It is not possible to call methods from textile, nor to pass locals to it. You
434
+ therefore will usually use it in combination with another rendering engine:
435
+
436
+ erb :overview, :locals => { :text => textile(:introduction) }
437
+
438
+ Note that you may also call the +textile+ method from within other templates:
439
+
440
+ %h1 Hello From Haml!
441
+ %p= textile(:greetings)
442
+
443
+ Since you cannot call Ruby from Textile, you cannot use layouts written in
444
+ Textile. However, it is possible to use another rendering engine for the
445
+ template than for the layout by passing the <tt>:layout_engine</tt> option.
446
+
447
+ === RDoc Templates
448
+
449
+ Dependency:: {rdoc}[http://rdoc.rubyforge.org/]
450
+ File Extensions:: <tt>.rdoc</tt>
451
+ Example:: <tt>rdoc :README, :layout_engine => :erb</tt>
452
+
453
+ It is not possible to call methods from rdoc, nor to pass locals to it. You
454
+ therefore will usually use it in combination with another rendering engine:
455
+
456
+ erb :overview, :locals => { :text => rdoc(:introduction) }
457
+
458
+ Note that you may also call the +rdoc+ method from within other templates:
459
+
460
+ %h1 Hello From Haml!
461
+ %p= rdoc(:greetings)
462
+
463
+ Since you cannot call Ruby from RDoc, you cannot use layouts written in
464
+ RDoc. However, it is possible to use another rendering engine for the
465
+ template than for the layout by passing the <tt>:layout_engine</tt> option.
466
+
467
+ === Radius Templates
468
+
469
+ Dependency:: {radius}[http://radius.rubyforge.org/]
470
+ File Extensions:: <tt>.radius</tt>
471
+ Example:: <tt>radius :index, :locals => { :key => 'value' }</tt>
472
+
473
+ Since you cannot call Ruby methods directly from a Radius template, you almost
474
+ always want to pass locals to it.
475
+
476
+ === Markaby Templates
477
+
478
+ Dependency:: {markaby}[http://markaby.github.com/]
479
+ File Extensions:: <tt>.mab</tt>
480
+ Example:: <tt>markaby { h1 "Welcome!" }</tt>
481
+
482
+ It also takes a block for inline templates (see example).
483
+
484
+ === Slim Templates
485
+
486
+ Dependency:: {slim}[http://slim-lang.com/]
487
+ File Extensions:: <tt>.slim</tt>
488
+ Example:: <tt>slim :index</tt>
489
+
490
+ === Creole Templates
491
+
492
+ Dependency:: {creole}[https://github.com/minad/creole]
493
+ File Extensions:: <tt>.creole</tt>
494
+ Example:: <tt>creole :wiki, :layout_engine => :erb</tt>
495
+
496
+ It is not possible to call methods from creole, nor to pass locals to it. You
497
+ therefore will usually use it in combination with another rendering engine:
498
+
499
+ erb :overview, :locals => { :text => creole(:introduction) }
500
+
501
+ Note that you may also call the +creole+ method from within other templates:
502
+
503
+ %h1 Hello From Haml!
504
+ %p= creole(:greetings)
505
+
506
+ Since you cannot call Ruby from Creole, you cannot use layouts written in
507
+ Creole. However, it is possible to use another rendering engine for the
508
+ template than for the layout by passing the <tt>:layout_engine</tt> option.
509
+
510
+ === CoffeeScript Templates
511
+
512
+ Dependency:: {coffee-script}[https://github.com/josh/ruby-coffee-script]
513
+ and a {way to execute javascript}[https://github.com/sstephenson/execjs/blob/master/README.md#readme]
514
+ File Extensions:: <tt>.coffee</tt>
515
+ Example:: <tt>coffee :index</tt>
516
+
517
+ === Embedded Templates
518
+
519
+ get '/' do
520
+ haml '%div.title Hello World'
521
+ end
522
+
523
+ Renders the embedded template string.
524
+
525
+ === Accessing Variables in Templates
526
+
527
+ Templates are evaluated within the same context as route handlers. Instance
528
+ variables set in route handlers are directly accessible by templates:
529
+
530
+ get '/:id' do
531
+ @foo = Foo.find(params[:id])
532
+ haml '%h1= @foo.name'
533
+ end
534
+
535
+ Or, specify an explicit Hash of local variables:
536
+
537
+ get '/:id' do
538
+ foo = Foo.find(params[:id])
539
+ haml '%h1= bar.name', :locals => { :bar => foo }
540
+ end
541
+
542
+ This is typically used when rendering templates as partials from within
543
+ other templates.
544
+
545
+ === Inline Templates
546
+
547
+ Templates may be defined at the end of the source file:
548
+
549
+ require 'sinatra'
550
+
551
+ get '/' do
552
+ haml :index
553
+ end
554
+
555
+ __END__
556
+
557
+ @@ layout
558
+ %html
559
+ = yield
560
+
561
+ @@ index
562
+ %div.title Hello world.
563
+
564
+ NOTE: Inline templates defined in the source file that requires sinatra are
565
+ automatically loaded. Call <tt>enable :inline_templates</tt> explicitly if you
566
+ have inline templates in other source files.
567
+
568
+ === Named Templates
569
+
570
+ Templates may also be defined using the top-level <tt>template</tt> method:
571
+
572
+ template :layout do
573
+ "%html\n =yield\n"
574
+ end
575
+
576
+ template :index do
577
+ '%div.title Hello World!'
578
+ end
579
+
580
+ get '/' do
581
+ haml :index
582
+ end
583
+
584
+ If a template named "layout" exists, it will be used each time a template
585
+ is rendered. You can individually disable layouts by passing
586
+ <tt>:layout => false</tt> or disable them by default via
587
+ <tt>set :haml, :layout => false</tt>:
588
+
589
+ get '/' do
590
+ haml :index, :layout => !request.xhr?
591
+ end
592
+
593
+ === Associating File Extensions
594
+
595
+ To associate a file extension with a template engine, use
596
+ <tt>Tilt.register</tt>. For instance, if you like to use the file extension
597
+ +tt+ for Textile templates, you can do the following:
598
+
599
+ Tilt.register :tt, Tilt[:textile]
600
+
601
+ === Adding Your Own Template Engine
602
+
603
+ First, register your engine with Tilt, then create a rendering method:
604
+
605
+ Tilt.register :myat, MyAwesomeTemplateEngine
606
+
607
+ helpers do
608
+ def myat(*args) render(:myat, *args) end
609
+ end
610
+
611
+ get '/' do
612
+ myat :index
613
+ end
614
+
615
+ Renders <tt>./views/index.myat</tt>. See https://github.com/rtomayko/tilt to
616
+ learn more about Tilt.
617
+
618
+ == Filters
619
+
620
+ Before filters are evaluated before each request within the same
621
+ context as the routes will be and can modify the request and response. Instance
622
+ variables set in filters are accessible by routes and templates:
623
+
624
+ before do
625
+ @note = 'Hi!'
626
+ request.path_info = '/foo/bar/baz'
627
+ end
628
+
629
+ get '/foo/*' do
630
+ @note #=> 'Hi!'
631
+ params[:splat] #=> 'bar/baz'
632
+ end
633
+
634
+ After filters are evaluated after each request within the same context and can
635
+ also modify the request and response. Instance variables set in before filters
636
+ and routes are accessible by after filters:
637
+
638
+ after do
639
+ puts response.status
640
+ end
641
+
642
+ Note: Unless you use the +body+ method rather than just returning a String from
643
+ the routes, the body will not yet be available in the after filter, since it is
644
+ generated later on.
645
+
646
+ Filters optionally take a pattern, causing them to be evaluated only if the
647
+ request path matches that pattern:
648
+
649
+ before '/protected/*' do
650
+ authenticate!
651
+ end
652
+
653
+ after '/create/:slug' do |slug|
654
+ session[:last_slug] = slug
655
+ end
656
+
657
+ Like routes, filters also take conditions:
658
+
659
+ before :agent => /Songbird/ do
660
+ # ...
661
+ end
662
+
663
+ after '/blog/*', :host_name => 'example.com' do
664
+ # ...
665
+ end
666
+
667
+ == Helpers
668
+
669
+ Use the top-level <tt>helpers</tt> method to define helper methods for use in
670
+ route handlers and templates:
671
+
672
+ helpers do
673
+ def bar(name)
674
+ "#{name}bar"
675
+ end
676
+ end
677
+
678
+ get '/:name' do
679
+ bar(params[:name])
680
+ end
681
+
682
+ Alternatively, helper methods can be separately defined in a module:
683
+
684
+ module FooUtils
685
+ def foo(name) "#{name}foo" end
686
+ end
687
+
688
+ module BarUtils
689
+ def bar(name) "#{name}bar" end
690
+ end
691
+
692
+ helpers FooUtils, BarUtils
693
+
694
+ The effect is the same as including the modules in the application class.
695
+
696
+ === Using Sessions
697
+
698
+ A session is used to keep state during requests. If activated, you have one
699
+ session hash per user session:
700
+
701
+ enable :sessions
702
+
703
+ get '/' do
704
+ "value = " << session[:value].inspect
705
+ end
706
+
707
+ get '/:value' do
708
+ session[:value] = params[:value]
709
+ end
710
+
711
+ Note that <tt>enable :sessions</tt> actually stores all data in a cookie. This
712
+ might not always be what you want (storing lots of data will increase your
713
+ traffic, for instance). You can use any Rack session middleware: in order to
714
+ do so, do *not* call <tt>enable :sessions</tt>, but instead pull in your
715
+ middleware of choice as you would any other middleware:
716
+
717
+ use Rack::Session::Pool, :expire_after => 2592000
718
+
719
+ get '/' do
720
+ "value = " << session[:value].inspect
721
+ end
722
+
723
+ get '/:value' do
724
+ session[:value] = params[:value]
725
+ end
726
+
727
+ To improve security, the session data in the cookie is signed with a session
728
+ secret. A random secret is generated for you by Sinatra. However, since this
729
+ secret will change with every start of your application, you might want to
730
+ set the secret yourself, so all your application instances share it:
731
+
732
+ set :session_secret, 'super secret'
733
+
734
+ If you want to configure it further, you may also store a hash with options in
735
+ the +sessions+ setting:
736
+
737
+ set :sessions, :domain => 'foo.com'
738
+
739
+ === Halting
740
+
741
+ To immediately stop a request within a filter or route use:
742
+
743
+ halt
744
+
745
+ You can also specify the status when halting:
746
+
747
+ halt 410
748
+
749
+ Or the body:
750
+
751
+ halt 'this will be the body'
752
+
753
+ Or both:
754
+
755
+ halt 401, 'go away!'
756
+
757
+ With headers:
758
+
759
+ halt 402, {'Content-Type' => 'text/plain'}, 'revenge'
760
+
761
+ It is of course possible to combine a template with +halt+:
762
+
763
+ halt erb(:error)
764
+
765
+ === Passing
766
+
767
+ A route can punt processing to the next matching route using <tt>pass</tt>:
768
+
769
+ get '/guess/:who' do
770
+ pass unless params[:who] == 'Frank'
771
+ 'You got me!'
772
+ end
773
+
774
+ get '/guess/*' do
775
+ 'You missed!'
776
+ end
777
+
778
+ The route block is immediately exited and control continues with the next
779
+ matching route. If no matching route is found, a 404 is returned.
780
+
781
+ === Triggering Another Route
782
+
783
+ Sometimes +pass+ is not what you want, instead you would like to get the result
784
+ of calling another route. Simply use +call+ to achieve this:
785
+
786
+ get '/foo' do
787
+ status, headers, body = call env.merge("PATH_INFO" => '/bar')
788
+ [status, headers, body.map(&:upcase)]
789
+ end
790
+
791
+ get '/bar' do
792
+ "bar"
793
+ end
794
+
795
+ Note that in the example above, you would ease testing and increase performance
796
+ by simply moving <tt>"bar"</tt> into a helper used by both <tt>/foo</tt>
797
+ and <tt>/bar</tt>.
798
+
799
+ If you want the request to be sent to the same application instance rather than
800
+ a duplicate, use <tt>call!</tt> instead of <tt>call</tt>.
801
+
802
+ Check out the Rack specification if you want to learn more about <tt>call</tt>.
803
+
804
+ === Setting Body, Status Code and Headers
805
+
806
+ It is possible and recommended to set the status code and response body with the
807
+ return value of the route block. However, in some scenarios you might want to
808
+ set the body at an arbitrary point in the execution flow. You can do so with the
809
+ +body+ helper method. If you do so, you can use that method from there on to
810
+ access the body:
811
+
812
+ get '/foo' do
813
+ body "bar"
814
+ end
815
+
816
+ after do
817
+ puts body
818
+ end
819
+
820
+ It is also possible to pass a block to +body+, which will be executed by the
821
+ Rack handler (this can be used to implement streaming, see "Return Values").
822
+
823
+ Similar to the body, you can also set the status code and headers:
824
+
825
+ get '/foo' do
826
+ status 418
827
+ headers \
828
+ "Allow" => "BREW, POST, GET, PROPFIND, WHEN",
829
+ "Refresh" => "Refresh: 20; http://www.ietf.org/rfc/rfc2324.txt"
830
+ body "I'm a tea pot!"
831
+ end
832
+
833
+ Like +body+, +headers+ and +status+ with no arguments can be used to access
834
+ their current values.
835
+
836
+ === Streaming Responses
837
+
838
+ Sometimes you want to start sending out data while still generating parts of
839
+ the response body. In extreme examples, you want to keep sending data until
840
+ the client closes the connection. You can use the +stream+ helper to avoid
841
+ creating your own wrapper:
842
+
843
+ get '/' do
844
+ stream do |out|
845
+ out << "It's gonna be legen -\n"
846
+ sleep 0.5
847
+ out << " (wait for it) \n"
848
+ sleep 1
849
+ out << "- dary!\n"
850
+ end
851
+ end
852
+
853
+ This allows you to implement streaming APIs,
854
+ {Server Sent Events}[http://dev.w3.org/html5/eventsource/] and can be used as
855
+ the basis for {WebSockets}[http://en.wikipedia.org/wiki/WebSocket]. It can also be
856
+ used to increase throughput if some but not all content depends on a slow
857
+ resource.
858
+
859
+ Note that the streaming behavior, especially the number of concurrent requests,
860
+ highly depends on the web server used to serve the application. Some servers,
861
+ like WEBRick, might not even support streaming at all. If the server does not
862
+ support streaming, the body will be sent all at once after the block passed to
863
+ +stream+ finishes executing. Streaming does not work at all with Shotgun.
864
+
865
+ If the optional parameter is set to +keep_open+, it will not call +close+ on
866
+ the stream object, allowing you to close it at any later point in the
867
+ execution flow. This only works on evented servers, like Thin and Rainbows.
868
+ Other servers will still close the stream:
869
+
870
+ # long polling
871
+
872
+ set :server, :thin
873
+ connections = []
874
+
875
+ get '/subscribe' do
876
+ # register a client's interest in server events
877
+ stream(:keep_open) { |out| connections << out }
878
+
879
+ # purge dead connections
880
+ connections.reject!(&:closed?)
881
+
882
+ # acknowledge
883
+ "subscribed"
884
+ end
885
+
886
+ post '/message' do
887
+ connections.each do |out|
888
+ # notify client that a new message has arrived
889
+ out << params[:message] << "\n"
890
+
891
+ # indicate client to connect again
892
+ out.close
893
+ end
894
+
895
+ # acknowledge
896
+ "message received"
897
+ end
898
+
899
+ === Logging
900
+
901
+ In the request scope, the +logger+ helper exposes a +Logger+ instance:
902
+
903
+ get '/' do
904
+ logger.info "loading data"
905
+ # ...
906
+ end
907
+
908
+ This logger will automatically take your Rack handler's logging settings into
909
+ account. If logging is disabled, this method will return a dummy object, so
910
+ you do not have to worry in your routes and filters about it.
911
+
912
+ Note that logging is only enabled for <tt>Sinatra::Application</tt> by
913
+ default, so if you inherit from <tt>Sinatra::Base</tt>, you probably want to
914
+ enable it yourself:
915
+
916
+ class MyApp < Sinatra::Base
917
+ configure :production, :development do
918
+ enable :logging
919
+ end
920
+ end
921
+
922
+ To avoid any logging middleware to be set up, set the +logging+ setting to
923
+ +nil+. However, keep in mind that +logger+ will in that case return +nil+. A
924
+ common use case is when you want to set your own logger. Sinatra will use
925
+ whatever it will find in <tt>env['rack.logger']</tt>.
926
+
927
+ === Mime Types
928
+
929
+ When using <tt>send_file</tt> or static files you may have mime types Sinatra
930
+ doesn't understand. Use +mime_type+ to register them by file extension:
931
+
932
+ configure do
933
+ mime_type :foo, 'text/foo'
934
+ end
935
+
936
+ You can also use it with the +content_type+ helper:
937
+
938
+ get '/' do
939
+ content_type :foo
940
+ "foo foo foo"
941
+ end
942
+
943
+ === Generating URLs
944
+
945
+ For generating URLs you should use the +url+ helper method, for instance, in
946
+ Haml:
947
+
948
+ %a{:href => url('/foo')} foo
949
+
950
+ It takes reverse proxies and Rack routers into account, if present.
951
+
952
+ This method is also aliased to +to+ (see below for an example).
953
+
954
+ === Browser Redirect
955
+
956
+ You can trigger a browser redirect with the +redirect+ helper method:
957
+
958
+ get '/foo' do
959
+ redirect to('/bar')
960
+ end
961
+
962
+ Any additional parameters are handled like arguments passed to +halt+:
963
+
964
+ redirect to('/bar'), 303
965
+ redirect 'http://google.com', 'wrong place, buddy'
966
+
967
+ You can also easily redirect back to the page the user came from with
968
+ <tt>redirect back</tt>:
969
+
970
+ get '/foo' do
971
+ "<a href='/bar'>do something</a>"
972
+ end
973
+
974
+ get '/bar' do
975
+ do_something
976
+ redirect back
977
+ end
978
+
979
+ To pass arguments with a redirect, either add them to the query:
980
+
981
+ redirect to('/bar?sum=42')
982
+
983
+ Or use a session:
984
+
985
+ enable :sessions
986
+
987
+ get '/foo' do
988
+ session[:secret] = 'foo'
989
+ redirect to('/bar')
990
+ end
991
+
992
+ get '/bar' do
993
+ session[:secret]
994
+ end
995
+
996
+ === Cache Control
997
+
998
+ Setting your headers correctly is the foundation for proper HTTP caching.
999
+
1000
+ You can easily set the Cache-Control header with like this:
1001
+
1002
+ get '/' do
1003
+ cache_control :public
1004
+ "cache it!"
1005
+ end
1006
+
1007
+ Pro tip: Set up caching in a before filter:
1008
+
1009
+ before do
1010
+ cache_control :public, :must_revalidate, :max_age => 60
1011
+ end
1012
+
1013
+ If you are using the +expires+ helper to set the corresponding header,
1014
+ <tt>Cache-Control</tt> will be set automatically for you:
1015
+
1016
+ before do
1017
+ expires 500, :public, :must_revalidate
1018
+ end
1019
+
1020
+ To properly use caches, you should consider using +etag+ or +last_modified+.
1021
+ It is recommended to call those helpers *before* doing heavy lifting, as they
1022
+ will immediately flush a response if the client already has the current
1023
+ version in its cache:
1024
+
1025
+ get '/article/:id' do
1026
+ @article = Article.find params[:id]
1027
+ last_modified @article.updated_at
1028
+ etag @article.sha1
1029
+ erb :article
1030
+ end
1031
+
1032
+ It is also possible to use a
1033
+ {weak ETag}[http://en.wikipedia.org/wiki/HTTP_ETag#Strong_and_weak_validation]:
1034
+
1035
+ etag @article.sha1, :weak
1036
+
1037
+ These helpers will not do any caching for you, but rather feed the necessary
1038
+ information to your cache. If you are looking for a quick reverse-proxy caching
1039
+ solution, try {rack-cache}[http://rtomayko.github.com/rack-cache/]:
1040
+
1041
+ require "rack/cache"
1042
+ require "sinatra"
1043
+
1044
+ use Rack::Cache
1045
+
1046
+ get '/' do
1047
+ cache_control :public, :max_age => 36000
1048
+ sleep 5
1049
+ "hello"
1050
+ end
1051
+
1052
+ Use the <tt>:static_cache_control</tt> setting (see below) to add
1053
+ <tt>Cache-Control</tt> header info to static files.
1054
+
1055
+ According to RFC 2616 your application should behave differently if the If-Match
1056
+ or If-None-Match header is set to <tt>*</tt> depending on whether the resource
1057
+ requested is already in existence. Sinatra assumes resources for safe (like get)
1058
+ and idempotent (like put) requests are already in existence, whereas other
1059
+ resources (for instance for post requests), are treated as new resources. You
1060
+ can change this behavior by passing in a <tt>:new_resource</tt> option:
1061
+
1062
+ get '/create' do
1063
+ etag '', :new_resource => true
1064
+ Article.create
1065
+ erb :new_article
1066
+ end
1067
+
1068
+ If you still want to use a weak ETag, pass in a <tt>:kind</tt> option:
1069
+
1070
+ etag '', :new_resource => true, :kind => :weak
1071
+
1072
+ === Sending Files
1073
+
1074
+ For sending files, you can use the <tt>send_file</tt> helper method:
1075
+
1076
+ get '/' do
1077
+ send_file 'foo.png'
1078
+ end
1079
+
1080
+ It also takes a couple of options:
1081
+
1082
+ send_file 'foo.png', :type => :jpg
1083
+
1084
+ The options are:
1085
+
1086
+ [filename]
1087
+ file name, in response, defaults to the real file name.
1088
+
1089
+ [last_modified]
1090
+ value for Last-Modified header, defaults to the file's mtime.
1091
+
1092
+ [type]
1093
+ content type to use, guessed from the file extension if missing.
1094
+
1095
+ [disposition]
1096
+ used for Content-Disposition, possible values: +nil+ (default),
1097
+ <tt>:attachment</tt> and <tt>:inline</tt>
1098
+
1099
+ [length]
1100
+ Content-Length header, defaults to file size.
1101
+
1102
+ If supported by the Rack handler, other means than streaming from the Ruby
1103
+ process will be used. If you use this helper method, Sinatra will automatically
1104
+ handle range requests.
1105
+
1106
+ === Accessing the Request Object
1107
+
1108
+ The incoming request object can be accessed from request level (filter, routes,
1109
+ error handlers) through the <tt>request</tt> method:
1110
+
1111
+ # app running on http://example.com/example
1112
+ get '/foo' do
1113
+ t = %w[text/css text/html application/javascript]
1114
+ request.accept # ['text/html', '*/*']
1115
+ request.accept? 'text/xml' # true
1116
+ request.preferred_type(t) # 'text/html'
1117
+ request.body # request body sent by the client (see below)
1118
+ request.scheme # "http"
1119
+ request.script_name # "/example"
1120
+ request.path_info # "/foo"
1121
+ request.port # 80
1122
+ request.request_method # "GET"
1123
+ request.query_string # ""
1124
+ request.content_length # length of request.body
1125
+ request.media_type # media type of request.body
1126
+ request.host # "example.com"
1127
+ request.get? # true (similar methods for other verbs)
1128
+ request.form_data? # false
1129
+ request["some_param"] # value of some_param parameter. [] is a shortcut to the params hash.
1130
+ request.referrer # the referrer of the client or '/'
1131
+ request.user_agent # user agent (used by :agent condition)
1132
+ request.cookies # hash of browser cookies
1133
+ request.xhr? # is this an ajax request?
1134
+ request.url # "http://example.com/example/foo"
1135
+ request.path # "/example/foo"
1136
+ request.ip # client IP address
1137
+ request.secure? # false (would be true over ssl)
1138
+ request.forwarded? # true (if running behind a reverse proxy)
1139
+ request.env # raw env hash handed in by Rack
1140
+ end
1141
+
1142
+ Some options, like <tt>script_name</tt> or <tt>path_info</tt>, can also be
1143
+ written:
1144
+
1145
+ before { request.path_info = "/" }
1146
+
1147
+ get "/" do
1148
+ "all requests end up here"
1149
+ end
1150
+
1151
+ The <tt>request.body</tt> is an IO or StringIO object:
1152
+
1153
+ post "/api" do
1154
+ request.body.rewind # in case someone already read it
1155
+ data = JSON.parse request.body.read
1156
+ "Hello #{data['name']}!"
1157
+ end
1158
+
1159
+ === Attachments
1160
+
1161
+ You can use the +attachment+ helper to tell the browser the response should be
1162
+ stored on disk rather than displayed in the browser:
1163
+
1164
+ get '/' do
1165
+ attachment
1166
+ "store it!"
1167
+ end
1168
+
1169
+ You can also pass it a file name:
1170
+
1171
+ get '/' do
1172
+ attachment "info.txt"
1173
+ "store it!"
1174
+ end
1175
+
1176
+ === Dealing with Date and Time
1177
+
1178
+ Sinatra offers a +time_for+ helper method, which, from the given value
1179
+ generates a Time object. It is also able to convert +DateTime+, +Date+ and
1180
+ similar classes:
1181
+
1182
+ get '/' do
1183
+ pass if Time.now > time_for('Dec 23, 2012')
1184
+ "still time"
1185
+ end
1186
+
1187
+ This method is used internally by +expires+, +last_modified+ and akin. You can
1188
+ therefore easily extend the behavior of those methods by overriding +time_for+
1189
+ in your application:
1190
+
1191
+ helpers do
1192
+ def time_for(value)
1193
+ case value
1194
+ when :yesterday then Time.now - 24*60*60
1195
+ when :tomorrow then Time.now + 24*60*60
1196
+ else super
1197
+ end
1198
+ end
1199
+ end
1200
+
1201
+ get '/' do
1202
+ last_modified :yesterday
1203
+ expires :tomorrow
1204
+ "hello"
1205
+ end
1206
+
1207
+ === Looking Up Template Files
1208
+
1209
+ The <tt>find_template</tt> helper is used to find template files for rendering:
1210
+
1211
+ find_template settings.views, 'foo', Tilt[:haml] do |file|
1212
+ puts "could be #{file}"
1213
+ end
1214
+
1215
+ This is not really useful. But it is useful that you can actually override this
1216
+ method to hook in your own lookup mechanism. For instance, if you want to be
1217
+ able to use more than one view directory:
1218
+
1219
+ set :views, ['views', 'templates']
1220
+
1221
+ helpers do
1222
+ def find_template(views, name, engine, &block)
1223
+ Array(views).each { |v| super(v, name, engine, &block) }
1224
+ end
1225
+ end
1226
+
1227
+ Another example would be using different directories for different engines:
1228
+
1229
+ set :views, :sass => 'views/sass', :haml => 'templates', :default => 'views'
1230
+
1231
+ helpers do
1232
+ def find_template(views, name, engine, &block)
1233
+ _, folder = views.detect { |k,v| engine == Tilt[k] }
1234
+ folder ||= views[:default]
1235
+ super(folder, name, engine, &block)
1236
+ end
1237
+ end
1238
+
1239
+ You can also easily wrap this up in an extension and share with others!
1240
+
1241
+ Note that <tt>find_template</tt> does not check if the file really exists but
1242
+ rather calls the given block for all possible paths. This is not a performance
1243
+ issue, since +render+ will use +break+ as soon as a file is found. Also,
1244
+ template locations (and content) will be cached if you are not running in
1245
+ development mode. You should keep that in mind if you write a really crazy
1246
+ method.
1247
+
1248
+ == Configuration
1249
+
1250
+ Run once, at startup, in any environment:
1251
+
1252
+ configure do
1253
+ # setting one option
1254
+ set :option, 'value'
1255
+
1256
+ # setting multiple options
1257
+ set :a => 1, :b => 2
1258
+
1259
+ # same as `set :option, true`
1260
+ enable :option
1261
+
1262
+ # same as `set :option, false`
1263
+ disable :option
1264
+
1265
+ # you can also have dynamic settings with blocks
1266
+ set(:css_dir) { File.join(views, 'css') }
1267
+ end
1268
+
1269
+ Run only when the environment (RACK_ENV environment variable) is set to
1270
+ <tt>:production</tt>:
1271
+
1272
+ configure :production do
1273
+ ...
1274
+ end
1275
+
1276
+ Run when the environment is set to either <tt>:production</tt> or
1277
+ <tt>:test</tt>:
1278
+
1279
+ configure :production, :test do
1280
+ ...
1281
+ end
1282
+
1283
+ You can access those options via <tt>settings</tt>:
1284
+
1285
+ configure do
1286
+ set :foo, 'bar'
1287
+ end
1288
+
1289
+ get '/' do
1290
+ settings.foo? # => true
1291
+ settings.foo # => 'bar'
1292
+ ...
1293
+ end
1294
+
1295
+ === Configuring attack protection
1296
+
1297
+ Sinatra is using
1298
+ {Rack::Protection}[https://github.com/rkh/rack-protection#readme] to defend
1299
+ your application against common, opportunistic attacks. You can easily disable
1300
+ this behavior (which will open up your application to tons of common
1301
+ vulnerabilities):
1302
+
1303
+ disable :protection
1304
+
1305
+ To skip a single defense layer, set +protection+ to an options hash:
1306
+
1307
+ set :protection, :except => :path_traversal
1308
+
1309
+ You can also hand in an array in order to disable a list of protections:
1310
+
1311
+ set :protection, :except => [:path_traversal, :session_hijacking]
1312
+
1313
+ === Available Settings
1314
+
1315
+ [absolute_redirects] If disabled, Sinatra will allow relative redirects,
1316
+ however, Sinatra will no longer conform with RFC 2616
1317
+ (HTTP 1.1), which only allows absolute redirects.
1318
+
1319
+ Enable if your app is running behind a reverse proxy that
1320
+ has not been set up properly. Note that the +url+ helper
1321
+ will still produce absolute URLs, unless you pass in
1322
+ +false+ as second parameter.
1323
+
1324
+ Disabled per default.
1325
+
1326
+ [add_charsets] mime types the <tt>content_type</tt> helper will
1327
+ automatically add the charset info to.
1328
+
1329
+ You should add to it rather than overriding this option:
1330
+
1331
+ settings.add_charsets << "application/foobar"
1332
+
1333
+ [app_file] Path to the main application file, used to detect project
1334
+ root, views and public folder and inline templates.
1335
+
1336
+ [bind] IP address to bind to (default: 0.0.0.0).
1337
+ Only used for built-in server.
1338
+
1339
+ [default_encoding] encoding to assume if unknown
1340
+ (defaults to <tt>"utf-8"</tt>).
1341
+
1342
+ [dump_errors] display errors in the log.
1343
+
1344
+ [environment] current environment, defaults to <tt>ENV['RACK_ENV']</tt>,
1345
+ or <tt>"development"</tt> if not available.
1346
+
1347
+ [logging] use the logger.
1348
+
1349
+ [lock] Places a lock around every request, only running
1350
+ processing on request per Ruby process concurrently.
1351
+
1352
+ Enabled if your app is not thread-safe.
1353
+ Disabled per default.
1354
+
1355
+ [method_override] use <tt>_method</tt> magic to allow put/delete forms in
1356
+ browsers that don't support it.
1357
+
1358
+ [port] Port to listen on. Only used for built-in server.
1359
+
1360
+ [prefixed_redirects] Whether or not to insert <tt>request.script_name</tt>
1361
+ into redirects if no absolute path is given. That way
1362
+ <tt>redirect '/foo'</tt> would behave like
1363
+ <tt>redirect to('/foo')</tt>. Disabled per default.
1364
+
1365
+ [protection] Whether or not to enable web attack protections. See
1366
+ protection section above.
1367
+
1368
+ [public_folder] Path to the folder public files are served from. Only
1369
+ used if static file serving is enabled (see
1370
+ <tt>static</tt> setting below). Inferred from
1371
+ <tt>app_file</tt> setting if not set.
1372
+
1373
+ [reload_templates] whether or not to reload templates between requests.
1374
+ Enabled in development mode.
1375
+
1376
+ [root] Path to project root folder. Inferred from +app_file+
1377
+ setting if not set.
1378
+
1379
+ [raise_errors] raise exceptions (will stop application). Enabled
1380
+ by default when <tt>environment</tt> is set to
1381
+ <tt>"test"</tt>, disabled otherwise.
1382
+
1383
+ [run] if enabled, Sinatra will handle starting the web server,
1384
+ do not enable if using rackup or other means.
1385
+
1386
+ [running] is the built-in server running now?
1387
+ do not change this setting!
1388
+
1389
+ [server] server or list of servers to use for built-in server.
1390
+ defaults to ['thin', 'mongrel', 'webrick'], order
1391
+ indicates priority.
1392
+
1393
+ [sessions] enable cookie based sessions support using
1394
+ <tt>Rack::Session::Cookie</tt>. See 'Using Sessions'
1395
+ section for more information.
1396
+
1397
+ [show_exceptions] show a stack trace in the browser when an exception
1398
+ happens. Enabled by default when <tt>environment</tt>
1399
+ is set to <tt>"development"</tt>, disabled otherwise.
1400
+ Can also be set to <tt>:after_handler</tt> to trigger
1401
+ app-specified error handling before showing a stack
1402
+ trace in the browser.
1403
+
1404
+ [static] Whether Sinatra should handle serving static files.
1405
+ Disable when using a Server able to do this on its own.
1406
+ Disabling will boost performance.
1407
+ Enabled per default in classic style, disabled for
1408
+ modular apps.
1409
+
1410
+ [static_cache_control] When Sinatra is serving static files, set this to add
1411
+ <tt>Cache-Control</tt> headers to the responses. Uses the
1412
+ +cache_control+ helper. Disabled by default.
1413
+ Use an explicit array when setting multiple values:
1414
+ <tt>set :static_cache_control, [:public, :max_age => 300]</tt>
1415
+
1416
+ [threaded] If set to +true+, will tell Thin to use
1417
+ <tt>EventMachine.defer</tt> for processing the request.
1418
+
1419
+ [views] Path to the views folder. Inferred from <tt>app_file</tt>
1420
+ setting if not set.
1421
+
1422
+ == Environments
1423
+
1424
+ There are three predefined +environments+: <tt>"development"</tt>,
1425
+ <tt>"production"</tt> and <tt>"test"</tt>. Environments can be set
1426
+ through the +RACK_ENV+ environment variable. The default value is
1427
+ <tt>"development"</tt>. In this mode, all templates are reloaded between
1428
+ requests. Special <tt>not_found</tt> and <tt>error</tt> handlers are installed
1429
+ for this environment so you will see a stack trace in your browser.
1430
+ In <tt>"production"</tt> and <tt>"test"</tt> templates are cached by default.
1431
+
1432
+ To run different environments use the <tt>-e</tt> option:
1433
+
1434
+ ruby my_app.rb -e [ENVIRONMENT]
1435
+
1436
+ You can use predefined methods: +development?+, +test?+ and +production?+ to
1437
+ check which enviroment is currently set.
1438
+
1439
+ == Error Handling
1440
+
1441
+ Error handlers run within the same context as routes and before filters, which
1442
+ means you get all the goodies it has to offer, like <tt>haml</tt>,
1443
+ <tt>erb</tt>, <tt>halt</tt>, etc.
1444
+
1445
+ === Not Found
1446
+
1447
+ When a <tt>Sinatra::NotFound</tt> exception is raised, or the response's status
1448
+ code is 404, the <tt>not_found</tt> handler is invoked:
1449
+
1450
+ not_found do
1451
+ 'This is nowhere to be found.'
1452
+ end
1453
+
1454
+ === Error
1455
+
1456
+ The +error+ handler is invoked any time an exception is raised from a route
1457
+ block or a filter. The exception object can be obtained from the
1458
+ <tt>sinatra.error</tt> Rack variable:
1459
+
1460
+ error do
1461
+ 'Sorry there was a nasty error - ' + env['sinatra.error'].name
1462
+ end
1463
+
1464
+ Custom errors:
1465
+
1466
+ error MyCustomError do
1467
+ 'So what happened was...' + env['sinatra.error'].message
1468
+ end
1469
+
1470
+ Then, if this happens:
1471
+
1472
+ get '/' do
1473
+ raise MyCustomError, 'something bad'
1474
+ end
1475
+
1476
+ You get this:
1477
+
1478
+ So what happened was... something bad
1479
+
1480
+ Alternatively, you can install an error handler for a status code:
1481
+
1482
+ error 403 do
1483
+ 'Access forbidden'
1484
+ end
1485
+
1486
+ get '/secret' do
1487
+ 403
1488
+ end
1489
+
1490
+ Or a range:
1491
+
1492
+ error 400..510 do
1493
+ 'Boom'
1494
+ end
1495
+
1496
+ Sinatra installs special <tt>not_found</tt> and <tt>error</tt> handlers when
1497
+ running under the development environment.
1498
+
1499
+ == Rack Middleware
1500
+
1501
+ Sinatra rides on Rack[http://rack.rubyforge.org/], a minimal standard
1502
+ interface for Ruby web frameworks. One of Rack's most interesting capabilities
1503
+ for application developers is support for "middleware" -- components that sit
1504
+ between the server and your application monitoring and/or manipulating the
1505
+ HTTP request/response to provide various types of common functionality.
1506
+
1507
+ Sinatra makes building Rack middleware pipelines a cinch via a top-level
1508
+ +use+ method:
1509
+
1510
+ require 'sinatra'
1511
+ require 'my_custom_middleware'
1512
+
1513
+ use Rack::Lint
1514
+ use MyCustomMiddleware
1515
+
1516
+ get '/hello' do
1517
+ 'Hello World'
1518
+ end
1519
+
1520
+ The semantics of +use+ are identical to those defined for the
1521
+ Rack::Builder[http://rack.rubyforge.org/doc/classes/Rack/Builder.html] DSL
1522
+ (most frequently used from rackup files). For example, the +use+ method
1523
+ accepts multiple/variable args as well as blocks:
1524
+
1525
+ use Rack::Auth::Basic do |username, password|
1526
+ username == 'admin' && password == 'secret'
1527
+ end
1528
+
1529
+ Rack is distributed with a variety of standard middleware for logging,
1530
+ debugging, URL routing, authentication, and session handling. Sinatra uses
1531
+ many of these components automatically based on configuration so you
1532
+ typically don't have to +use+ them explicitly.
1533
+
1534
+ You can find useful middleware in
1535
+ {rack}[https://github.com/rack/rack/tree/master/lib/rack],
1536
+ {rack-contrib}[https://github.com/rack/rack-contrib#readme],
1537
+ with {CodeRack}[http://coderack.org/] or in the
1538
+ {Rack wiki}[https://github.com/rack/rack/wiki/List-of-Middleware].
1539
+
1540
+ == Testing
1541
+
1542
+ Sinatra tests can be written using any Rack-based testing library or framework.
1543
+ {Rack::Test}[http://rdoc.info/github/brynary/rack-test/master/frames]
1544
+ is recommended:
1545
+
1546
+ require 'my_sinatra_app'
1547
+ require 'test/unit'
1548
+ require 'rack/test'
1549
+
1550
+ class MyAppTest < Test::Unit::TestCase
1551
+ include Rack::Test::Methods
1552
+
1553
+ def app
1554
+ Sinatra::Application
1555
+ end
1556
+
1557
+ def test_my_default
1558
+ get '/'
1559
+ assert_equal 'Hello World!', last_response.body
1560
+ end
1561
+
1562
+ def test_with_params
1563
+ get '/meet', :name => 'Frank'
1564
+ assert_equal 'Hello Frank!', last_response.body
1565
+ end
1566
+
1567
+ def test_with_rack_env
1568
+ get '/', {}, 'HTTP_USER_AGENT' => 'Songbird'
1569
+ assert_equal "You're using Songbird!", last_response.body
1570
+ end
1571
+ end
1572
+
1573
+ == Sinatra::Base - Middleware, Libraries, and Modular Apps
1574
+
1575
+ Defining your app at the top-level works well for micro-apps but has
1576
+ considerable drawbacks when building reusable components such as Rack
1577
+ middleware, Rails metal, simple libraries with a server component, or
1578
+ even Sinatra extensions. The top-level DSL pollutes the Object namespace
1579
+ and assumes a micro-app style configuration (e.g., a single application
1580
+ file, <tt>./public</tt> and <tt>./views</tt> directories, logging, exception
1581
+ detail page, etc.). That's where <tt>Sinatra::Base</tt> comes into play:
1582
+
1583
+ require 'sinatra/base'
1584
+
1585
+ class MyApp < Sinatra::Base
1586
+ set :sessions, true
1587
+ set :foo, 'bar'
1588
+
1589
+ get '/' do
1590
+ 'Hello world!'
1591
+ end
1592
+ end
1593
+
1594
+ The methods available to <tt>Sinatra::Base</tt> subclasses are exactly as those
1595
+ available via the top-level DSL. Most top-level apps can be converted to
1596
+ <tt>Sinatra::Base</tt> components with two modifications:
1597
+
1598
+ * Your file should require <tt>sinatra/base</tt> instead of +sinatra+;
1599
+ otherwise, all of Sinatra's DSL methods are imported into the main
1600
+ namespace.
1601
+ * Put your app's routes, error handlers, filters, and options in a subclass
1602
+ of <tt>Sinatra::Base</tt>.
1603
+
1604
+ <tt>Sinatra::Base</tt> is a blank slate. Most options are disabled by default,
1605
+ including the built-in server. See
1606
+ {Options and Configuration}[http://sinatra.github.com/configuration.html]
1607
+ for details on available options and their behavior.
1608
+
1609
+ === Modular vs. Classic Style
1610
+
1611
+ Contrary to common belief, there is nothing wrong with classic style. If it
1612
+ suits your application, you do not have to switch to a modular application.
1613
+
1614
+ There are only two downsides compared with modular style:
1615
+
1616
+ * You may only have one Sinatra application per Ruby process. If you plan to
1617
+ use more, switch to modular style.
1618
+
1619
+ * Classic style pollutes Object with delegator methods. If you plan to ship
1620
+ your application in a library/gem, switch to modular style.
1621
+
1622
+ There is no reason you cannot mix modular and classic style.
1623
+
1624
+ If switching from one style to the other, you should be aware of slightly
1625
+ different default settings:
1626
+
1627
+ Setting Classic Modular
1628
+
1629
+ app_file file loading sinatra file subclassing Sinatra::Base
1630
+ run $0 == app_file false
1631
+ logging true false
1632
+ method_override true false
1633
+ inline_templates true false
1634
+ static true false
1635
+
1636
+
1637
+ === Serving a Modular Application
1638
+
1639
+ There are two common options for starting a modular app, actively starting with
1640
+ <tt>run!</tt>:
1641
+
1642
+ # my_app.rb
1643
+ require 'sinatra/base'
1644
+
1645
+ class MyApp < Sinatra::Base
1646
+ # ... app code here ...
1647
+
1648
+ # start the server if ruby file executed directly
1649
+ run! if app_file == $0
1650
+ end
1651
+
1652
+ Start with:
1653
+
1654
+ ruby my_app.rb
1655
+
1656
+ Or with a <tt>config.ru</tt>, which allows using any Rack handler:
1657
+
1658
+ # config.ru (run with rackup)
1659
+ require './my_app'
1660
+ run MyApp
1661
+
1662
+ Run:
1663
+
1664
+ rackup -p 4567
1665
+
1666
+ === Using a Classic Style Application with a config.ru
1667
+
1668
+ Write your app file:
1669
+
1670
+ # app.rb
1671
+ require 'sinatra'
1672
+
1673
+ get '/' do
1674
+ 'Hello world!'
1675
+ end
1676
+
1677
+ And a corresponding <tt>config.ru</tt>:
1678
+
1679
+ require './app'
1680
+ run Sinatra::Application
1681
+
1682
+ === When to use a config.ru?
1683
+
1684
+ Good signs you probably want to use a <tt>config.ru</tt>:
1685
+
1686
+ * You want to deploy with a different Rack handler (Passenger, Unicorn,
1687
+ Heroku, ...).
1688
+ * You want to use more than one subclass of <tt>Sinatra::Base</tt>.
1689
+ * You want to use Sinatra only for middleware, but not as endpoint.
1690
+
1691
+ <b>There is no need to switch to a <tt>config.ru</tt> only because you
1692
+ switched to modular style, and you don't have to use modular style for running
1693
+ with a <tt>config.ru</tt>.</b>
1694
+
1695
+ === Using Sinatra as Middleware
1696
+
1697
+ Not only is Sinatra able to use other Rack middleware, any Sinatra application
1698
+ can in turn be added in front of any Rack endpoint as middleware itself. This
1699
+ endpoint could be another Sinatra application, or any other Rack-based
1700
+ application (Rails/Ramaze/Camping/...):
1701
+
1702
+ require 'sinatra/base'
1703
+
1704
+ class LoginScreen < Sinatra::Base
1705
+ enable :sessions
1706
+
1707
+ get('/login') { haml :login }
1708
+
1709
+ post('/login') do
1710
+ if params[:name] == 'admin' && params[:password] == 'admin'
1711
+ session['user_name'] = params[:name]
1712
+ else
1713
+ redirect '/login'
1714
+ end
1715
+ end
1716
+ end
1717
+
1718
+ class MyApp < Sinatra::Base
1719
+ # middleware will run before filters
1720
+ use LoginScreen
1721
+
1722
+ before do
1723
+ unless session['user_name']
1724
+ halt "Access denied, please <a href='/login'>login</a>."
1725
+ end
1726
+ end
1727
+
1728
+ get('/') { "Hello #{session['user_name']}." }
1729
+ end
1730
+
1731
+ === Dynamic Application Creation
1732
+
1733
+ Sometimes you want to create new applications at runtime without having to
1734
+ assign them to a constant, you can do this with <tt>Sinatra.new</tt>:
1735
+
1736
+ require 'sinatra/base'
1737
+ my_app = Sinatra.new { get('/') { "hi" } }
1738
+ my_app.run!
1739
+
1740
+ It takes the application to inherit from as optional argument:
1741
+
1742
+ # config.ru (run with rackup)
1743
+ require 'sinatra/base'
1744
+
1745
+ controller = Sinatra.new do
1746
+ enable :logging
1747
+ helpers MyHelpers
1748
+ end
1749
+
1750
+ map('/a') do
1751
+ run Sinatra.new(controller) { get('/') { 'a' } }
1752
+ end
1753
+
1754
+ map('/b') do
1755
+ run Sinatra.new(controller) { get('/') { 'b' } }
1756
+ end
1757
+
1758
+ This is especially useful for testing Sinatra extensions or using Sinatra in
1759
+ your own library.
1760
+
1761
+ This also makes using Sinatra as middleware extremely easy:
1762
+
1763
+ require 'sinatra/base'
1764
+
1765
+ use Sinatra do
1766
+ get('/') { ... }
1767
+ end
1768
+
1769
+ run RailsProject::Application
1770
+
1771
+ == Scopes and Binding
1772
+
1773
+ The scope you are currently in determines what methods and variables are
1774
+ available.
1775
+
1776
+ === Application/Class Scope
1777
+
1778
+ Every Sinatra application corresponds to a subclass of <tt>Sinatra::Base</tt>.
1779
+ If you are using the top-level DSL (<tt>require 'sinatra'</tt>), then this
1780
+ class is <tt>Sinatra::Application</tt>, otherwise it is the subclass you
1781
+ created explicitly. At class level you have methods like +get+ or +before+, but
1782
+ you cannot access the +request+ object or the +session+, as there only is a
1783
+ single application class for all requests.
1784
+
1785
+ Options created via +set+ are methods at class level:
1786
+
1787
+ class MyApp < Sinatra::Base
1788
+ # Hey, I'm in the application scope!
1789
+ set :foo, 42
1790
+ foo # => 42
1791
+
1792
+ get '/foo' do
1793
+ # Hey, I'm no longer in the application scope!
1794
+ end
1795
+ end
1796
+
1797
+ You have the application scope binding inside:
1798
+
1799
+ * Your application class body
1800
+ * Methods defined by extensions
1801
+ * The block passed to +helpers+
1802
+ * Procs/blocks used as value for +set+
1803
+ * The block passed to <tt>Sinatra.new</tt>
1804
+
1805
+ You can reach the scope object (the class) like this:
1806
+
1807
+ * Via the object passed to configure blocks (<tt>configure { |c| ... }</tt>)
1808
+ * +settings+ from within request scope
1809
+
1810
+ === Request/Instance Scope
1811
+
1812
+ For every incoming request, a new instance of your application class is
1813
+ created and all handler blocks run in that scope. From within this scope you
1814
+ can access the +request+ and +session+ object or call rendering methods like
1815
+ +erb+ or +haml+. You can access the application scope from within the request
1816
+ scope via the +settings+ helper:
1817
+
1818
+ class MyApp < Sinatra::Base
1819
+ # Hey, I'm in the application scope!
1820
+ get '/define_route/:name' do
1821
+ # Request scope for '/define_route/:name'
1822
+ @value = 42
1823
+
1824
+ settings.get("/#{params[:name]}") do
1825
+ # Request scope for "/#{params[:name]}"
1826
+ @value # => nil (not the same request)
1827
+ end
1828
+
1829
+ "Route defined!"
1830
+ end
1831
+ end
1832
+
1833
+ You have the request scope binding inside:
1834
+
1835
+ * get/head/post/put/delete/options blocks
1836
+ * before/after filters
1837
+ * helper methods
1838
+ * templates/views
1839
+
1840
+ === Delegation Scope
1841
+
1842
+ The delegation scope just forwards methods to the class scope. However, it
1843
+ does not behave 100% like the class scope, as you do not have the class
1844
+ binding. Only methods explicitly marked for delegation are available and you
1845
+ do not share variables/state with the class scope (read: you have a different
1846
+ +self+). You can explicitly add method delegations by calling
1847
+ <tt>Sinatra::Delegator.delegate :method_name</tt>.
1848
+
1849
+ You have the delegate scope binding inside:
1850
+
1851
+ * The top level binding, if you did <tt>require "sinatra"</tt>
1852
+ * An object extended with the <tt>Sinatra::Delegator</tt> mixin
1853
+
1854
+ Have a look at the code for yourself: here's the
1855
+ {Sinatra::Delegator mixin}[http://github.com/sinatra/sinatra/blob/ceac46f0bc129a6e994a06100aa854f606fe5992/lib/sinatra/base.rb#L1128]
1856
+ being {included into the main namespace}[http://github.com/sinatra/sinatra/blob/ceac46f0bc129a6e994a06100aa854f606fe5992/lib/sinatra/main.rb#L28].
1857
+
1858
+ == Command Line
1859
+
1860
+ Sinatra applications can be run directly:
1861
+
1862
+ ruby myapp.rb [-h] [-x] [-e ENVIRONMENT] [-p PORT] [-o HOST] [-s HANDLER]
1863
+
1864
+ Options are:
1865
+
1866
+ -h # help
1867
+ -p # set the port (default is 4567)
1868
+ -o # set the host (default is 0.0.0.0)
1869
+ -e # set the environment (default is development)
1870
+ -s # specify rack server/handler (default is thin)
1871
+ -x # turn on the mutex lock (default is off)
1872
+
1873
+ == Requirement
1874
+
1875
+ The following Ruby versions are officially supported:
1876
+
1877
+ [ Ruby 1.8.7 ]
1878
+ 1.8.7 is fully supported, however, if nothing is keeping you from it, we
1879
+ recommend upgrading to 1.9.2 or switching to JRuby or Rubinius. Support for
1880
+ 1.8.7 will not be dropped before Sinatra 2.0 and Ruby 2.0 except maybe for
1881
+ the unlikely event of 1.8.8 being released. Even then, we might continue
1882
+ supporting it. <b>Ruby 1.8.6 is no longer supported.</b> If you want to run
1883
+ with 1.8.6, downgrade to Sinatra 1.2, which will receive bug fixes until
1884
+ Sinatra 1.4.0 is released.
1885
+
1886
+ [ Ruby 1.9.2 ]
1887
+ 1.9.2 is fully supported and recommended. Do not use 1.9.2p0, it is known to
1888
+ cause segmentation faults when running Sinatra. Support will continue at least
1889
+ until the release of Ruby 1.9.4/2.0 and support for the latest 1.9 release
1890
+ will continue as long as it is still supported by the Ruby core team.
1891
+
1892
+ [ Ruby 1.9.3 ]
1893
+ 1.9.3 is fully supported and recommended. Please note that switching to 1.9.3
1894
+ from an earlier version will invalidate all sessions.
1895
+
1896
+ [ Rubinius ]
1897
+ Rubinius is officially supported (Rubinius >= 1.2.4), everything, including
1898
+ all template languages, works. The upcoming 2.0 release is supported as
1899
+ well, including 1.9 mode.
1900
+
1901
+ [ JRuby ]
1902
+ JRuby is officially supported (JRuby >= 1.6.7). No issues with third party
1903
+ template libraries are known, however, if you choose to use JRuby, please
1904
+ look into JRuby rack handlers, as the Thin web server is not fully supported
1905
+ on JRuby. JRuby's support for C extensions is still experimental, which only
1906
+ affects RDiscount, Redcarpet, RedCloth and Yajl templates as well as Thin
1907
+ and Mongrel at the moment.
1908
+
1909
+ We also keep an eye on upcoming Ruby versions.
1910
+
1911
+ The following Ruby implementations are not officially supported but still are
1912
+ known to run Sinatra:
1913
+
1914
+ * Older versions of JRuby and Rubinius
1915
+ * Ruby Enterprise Edition
1916
+ * MacRuby, Maglev, IronRuby
1917
+ * Ruby 1.9.0 and 1.9.1 (but we do recommend against using those)
1918
+
1919
+ Not being officially supported means if things only break there and not on a
1920
+ supported platform, we assume it's not our issue but theirs.
1921
+
1922
+ We also run our CI against ruby-head (the upcoming 2.0.0) and the 1.9.4
1923
+ branch, but we can't guarantee anything, since it is constantly moving. Expect
1924
+ both 1.9.4p0 and 2.0.0p0 to be supported.
1925
+
1926
+ Sinatra should work on any operating system supported by the chosen Ruby
1927
+ implementation.
1928
+
1929
+ You will not be able to run Sinatra on Cardinal, SmallRuby, BlueRuby or any
1930
+ Ruby version prior to 1.8.7 as of the time being.
1931
+
1932
+ == The Bleeding Edge
1933
+
1934
+ If you would like to use Sinatra's latest bleeding code, feel free to run your
1935
+ application against the master branch, it should be rather stable.
1936
+
1937
+ We also push out prerelease gems from time to time, so you can do a
1938
+
1939
+ gem install sinatra --pre
1940
+
1941
+ To get some of the latest features.
1942
+
1943
+ === With Bundler
1944
+
1945
+ If you want to run your application with the latest Sinatra, using
1946
+ {Bundler}[http://gembundler.com/] is the recommended way.
1947
+
1948
+ First, install bundler, if you haven't:
1949
+
1950
+ gem install bundler
1951
+
1952
+ Then, in your project directory, create a +Gemfile+:
1953
+
1954
+ source :rubygems
1955
+ gem 'sinatra', :git => "git://github.com/sinatra/sinatra.git"
1956
+
1957
+ # other dependencies
1958
+ gem 'haml' # for instance, if you use haml
1959
+ gem 'activerecord', '~> 3.0' # maybe you also need ActiveRecord 3.x
1960
+
1961
+ Note that you will have to list all your applications dependencies in there.
1962
+ Sinatra's direct dependencies (Rack and Tilt) will, however, be automatically
1963
+ fetched and added by Bundler.
1964
+
1965
+ Now you can run your app like this:
1966
+
1967
+ bundle exec ruby myapp.rb
1968
+
1969
+ === Roll Your Own
1970
+
1971
+ Create a local clone and run your app with the <tt>sinatra/lib</tt> directory
1972
+ on the <tt>$LOAD_PATH</tt>:
1973
+
1974
+ cd myapp
1975
+ git clone git://github.com/sinatra/sinatra.git
1976
+ ruby -Isinatra/lib myapp.rb
1977
+
1978
+ To update the Sinatra sources in the future:
1979
+
1980
+ cd myapp/sinatra
1981
+ git pull
1982
+
1983
+ === Install Globally
1984
+
1985
+ You can build the gem on your own:
1986
+
1987
+ git clone git://github.com/sinatra/sinatra.git
1988
+ cd sinatra
1989
+ rake sinatra.gemspec
1990
+ rake install
1991
+
1992
+ If you install gems as root, the last step should be
1993
+
1994
+ sudo rake install
1995
+
1996
+ == Versioning
1997
+
1998
+ Sinatra follows {Semantic Versioning}[http://semver.org/], both SemVer and
1999
+ SemVerTag.
2000
+
2001
+ == Further Reading
2002
+
2003
+ * {Project Website}[http://www.sinatrarb.com/] - Additional documentation,
2004
+ news, and links to other resources.
2005
+ * {Contributing}[http://www.sinatrarb.com/contributing] - Find a bug? Need
2006
+ help? Have a patch?
2007
+ * {Issue tracker}[http://github.com/sinatra/sinatra/issues]
2008
+ * {Twitter}[http://twitter.com/sinatra]
2009
+ * {Mailing List}[http://groups.google.com/group/sinatrarb/topics]
2010
+ * {IRC: #sinatra}[irc://chat.freenode.net/#sinatra] on http://freenode.net
2011
+ * {Sinatra Book}[http://sinatra-book.gittr.com] Cookbook Tutorial
2012
+ * {Sinatra Recipes}[http://recipes.sinatrarb.com/] Community
2013
+ contributed recipes
2014
+ * API documentation for the {latest release}[http://rubydoc.info/gems/sinatra]
2015
+ or the {current HEAD}[http://rubydoc.info/github/sinatra/sinatra] on
2016
+ http://rubydoc.info
2017
+ * {CI server}[http://ci.rkh.im/view/Sinatra/]