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,183 @@
1
+ # encoding: UTF-8
2
+ require 'rake/clean'
3
+ require 'rake/testtask'
4
+ require 'fileutils'
5
+ require 'date'
6
+
7
+ # CI Reporter is only needed for the CI
8
+ begin
9
+ require 'ci/reporter/rake/test_unit'
10
+ rescue LoadError
11
+ end
12
+
13
+ task :default => :test
14
+ task :spec => :test
15
+
16
+ CLEAN.include "**/*.rbc"
17
+
18
+ def source_version
19
+ @source_version ||= begin
20
+ load './lib/sinatra/version.rb'
21
+ Sinatra::VERSION
22
+ end
23
+ end
24
+
25
+ def prev_feature
26
+ source_version.gsub(/^(\d\.)(\d+)\..*$/) { $1 + ($2.to_i - 1).to_s }
27
+ end
28
+
29
+ def prev_version
30
+ return prev_feature + '.0' if source_version.end_with? '.0'
31
+ source_version.gsub(/\d+$/) { |s| s.to_i - 1 }
32
+ end
33
+
34
+ # SPECS ===============================================================
35
+
36
+ task :test do
37
+ ENV['LANG'] = 'C'
38
+ ENV.delete 'LC_CTYPE'
39
+ end
40
+
41
+ Rake::TestTask.new(:test) do |t|
42
+ t.test_files = FileList['test/*_test.rb']
43
+ t.ruby_opts = ['-rubygems'] if defined? Gem
44
+ t.ruby_opts << '-I.'
45
+ end
46
+
47
+ Rake::TestTask.new(:"test:core") do |t|
48
+ core_tests = %w[base delegator encoding extensions filter
49
+ helpers mapped_error middleware radius rdoc
50
+ readme request response result route_added_hook
51
+ routing server settings sinatra static templates]
52
+ t.test_files = core_tests.map {|n| "test/#{n}_test.rb"}
53
+ t.ruby_opts = ["-rubygems"] if defined? Gem
54
+ t.ruby_opts << "-I."
55
+ end
56
+
57
+ # Rcov ================================================================
58
+
59
+ namespace :test do
60
+ desc 'Measures test coverage'
61
+ task :coverage do
62
+ rm_f "coverage"
63
+ sh "rcov -Ilib test/*_test.rb"
64
+ end
65
+ end
66
+
67
+ # Website =============================================================
68
+
69
+ desc 'Generate RDoc under doc/api'
70
+ task 'doc' => ['doc:api']
71
+ task('doc:api') { sh "yardoc -o doc/api" }
72
+ CLEAN.include 'doc/api'
73
+
74
+ # README ===============================================================
75
+
76
+ task :add_template, [:name] do |t, args|
77
+ Dir.glob('README.*') do |file|
78
+ code = File.read(file)
79
+ if code =~ /^===.*#{args.name.capitalize}/
80
+ puts "Already covered in #{file}"
81
+ else
82
+ template = code[/===[^\n]*Liquid.*index\.liquid<\/tt>[^\n]*/m]
83
+ if !template
84
+ puts "Liquid not found in #{file}"
85
+ else
86
+ puts "Adding section to #{file}"
87
+ template = template.gsub(/Liquid/, args.name.capitalize).gsub(/liquid/, args.name.downcase)
88
+ code.gsub! /^(\s*===.*CoffeeScript)/, "\n" << template << "\n\\1"
89
+ File.open(file, "w") { |f| f << code }
90
+ end
91
+ end
92
+ end
93
+ end
94
+
95
+ # Thanks in announcement ===============================================
96
+
97
+ team = ["Ryan Tomayko", "Blake Mizerany", "Simon Rozet", "Konstantin Haase"]
98
+ desc "list of contributors"
99
+ task :thanks, [:release,:backports] do |t, a|
100
+ a.with_defaults :release => "#{prev_version}..HEAD",
101
+ :backports => "#{prev_feature}.0..#{prev_feature}.x"
102
+ included = `git log --format=format:"%aN\t%s" #{a.release}`.lines.to_a
103
+ excluded = `git log --format=format:"%aN\t%s" #{a.backports}`.lines.to_a
104
+ commits = (included - excluded).group_by { |c| c[/^[^\t]+/] }
105
+ authors = commits.keys.sort_by { |n| - commits[n].size } - team
106
+ puts authors[0..-2].join(', ') << " and " << authors.last,
107
+ "(based on commits included in #{a.release}, but not in #{a.backports})"
108
+ end
109
+
110
+ desc "list of authors"
111
+ task :authors, [:commit_range, :format, :sep] do |t, a|
112
+ a.with_defaults :format => "%s (%d)", :sep => ", ", :commit_range => '--all'
113
+ authors = Hash.new { |h,k| h[k] = 0 }
114
+ blake = "Blake Mizerany"
115
+ overall = 0
116
+ mapping = {
117
+ "blake.mizerany@gmail.com" => blake, "bmizerany" => blake,
118
+ "a_user@mac.com" => blake, "ichverstehe" => "Harry Vangberg",
119
+ "Wu Jiang (nouse)" => "Wu Jiang" }
120
+ `git shortlog -s #{a.commit_range}`.lines.map do |line|
121
+ line = line.force_encoding 'binary' if line.respond_to? :force_encoding
122
+ num, name = line.split("\t", 2).map(&:strip)
123
+ authors[mapping[name] || name] += num.to_i
124
+ overall += num.to_i
125
+ end
126
+ puts "#{overall} commits by #{authors.count} authors:"
127
+ puts authors.sort_by { |n,c| -c }.map { |e| a.format % e }.join(a.sep)
128
+ end
129
+
130
+ # PACKAGING ============================================================
131
+
132
+ if defined?(Gem)
133
+ # Load the gemspec using the same limitations as github
134
+ def spec
135
+ require 'rubygems' unless defined? Gem::Specification
136
+ @spec ||= eval(File.read('sinatra.gemspec'))
137
+ end
138
+
139
+ def package(ext='')
140
+ "pkg/sinatra-#{spec.version}" + ext
141
+ end
142
+
143
+ desc 'Build packages'
144
+ task :package => %w[.gem .tar.gz].map {|e| package(e)}
145
+
146
+ desc 'Build and install as local gem'
147
+ task :install => package('.gem') do
148
+ sh "gem install #{package('.gem')}"
149
+ end
150
+
151
+ directory 'pkg/'
152
+ CLOBBER.include('pkg')
153
+
154
+ file package('.gem') => %w[pkg/ sinatra.gemspec] + spec.files do |f|
155
+ sh "gem build sinatra.gemspec"
156
+ mv File.basename(f.name), f.name
157
+ end
158
+
159
+ file package('.tar.gz') => %w[pkg/] + spec.files do |f|
160
+ sh <<-SH
161
+ git archive \
162
+ --prefix=sinatra-#{source_version}/ \
163
+ --format=tar \
164
+ HEAD | gzip > #{f.name}
165
+ SH
166
+ end
167
+
168
+ task 'release' => ['test', package('.gem')] do
169
+ if File.binread("CHANGES") =~ /= \d\.\d\.\d . not yet released$/i
170
+ fail 'please update changes first'
171
+ end
172
+
173
+ sh <<-SH
174
+ gem install #{package('.gem')} --local &&
175
+ gem push #{package('.gem')} &&
176
+ git commit --allow-empty -a -m '#{source_version} release' &&
177
+ git tag -s v#{source_version} -m '#{source_version} release' &&
178
+ git tag -s #{source_version} -m '#{source_version} release' &&
179
+ git push && (git push sinatra || true) &&
180
+ git push --tags && (git push sinatra --tags || true)
181
+ SH
182
+ end
183
+ end
@@ -0,0 +1,61 @@
1
+ #!/usr/bin/env ruby -I ../lib -I lib
2
+ # coding: utf-8
3
+ require 'sinatra'
4
+ set :server, 'thin'
5
+ connections = []
6
+
7
+ get '/' do
8
+ halt erb(:login) unless params[:user]
9
+ erb :chat, :locals => { :user => params[:user].gsub(/\W/, '') }
10
+ end
11
+
12
+ get '/stream', :provides => 'text/event-stream' do
13
+ stream :keep_open do |out|
14
+ connections << out
15
+ out.callback { connections.delete(out) }
16
+ end
17
+ end
18
+
19
+ post '/' do
20
+ connections.each { |out| out << "data: #{params[:msg]}\n\n" }
21
+ 204 # response without entity body
22
+ end
23
+
24
+ __END__
25
+
26
+ @@ layout
27
+ <html>
28
+ <head>
29
+ <title>Super Simple Chat with Sinatra</title>
30
+ <meta charset="utf-8" />
31
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
32
+ </head>
33
+ <body><%= yield %></body>
34
+ </html>
35
+
36
+ @@ login
37
+ <form action='/'>
38
+ <label for='user'>User Name:</label>
39
+ <input name='user' value='' />
40
+ <input type='submit' value="GO!" />
41
+ </form>
42
+
43
+ @@ chat
44
+ <pre id='chat'></pre>
45
+
46
+ <script>
47
+ // reading
48
+ var es = new EventSource('/stream');
49
+ es.onmessage = function(e) { $('#chat').append(e.data + "\n") };
50
+
51
+ // writing
52
+ $("form").live("submit", function(e) {
53
+ $.post('/', {msg: "<%= user %>: " + $('#msg').val()});
54
+ $('#msg').val(''); $('#msg').focus();
55
+ e.preventDefault();
56
+ });
57
+ </script>
58
+
59
+ <form>
60
+ <input id='msg' placeholder='type message here...' />
61
+ </form>
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby -I ../lib -I lib
2
+ require 'sinatra'
3
+ get('/') { 'this is a simple app' }
@@ -0,0 +1,26 @@
1
+ # this example does *not* work properly with WEBrick
2
+ #
3
+ # run *one* of these:
4
+ #
5
+ # rackup -s mongrel stream.ru # gem install mongrel
6
+ # thin -R stream.ru start # gem install thin
7
+ # unicorn stream.ru # gem install unicorn
8
+ # puma stream.ru # gem install puma
9
+
10
+ require 'sinatra/base'
11
+
12
+ class Stream < Sinatra::Base
13
+ get '/' do
14
+ content_type :txt
15
+
16
+ stream do |out|
17
+ out << "It's gonna be legen -\n"
18
+ sleep 0.5
19
+ out << " (wait for it) \n"
20
+ sleep 1
21
+ out << "- dary!\n"
22
+ end
23
+ end
24
+ end
25
+
26
+ run Stream
@@ -0,0 +1,4 @@
1
+ require 'sinatra/base'
2
+ require 'sinatra/main'
3
+
4
+ enable :inline_templates
@@ -0,0 +1,1728 @@
1
+ # external dependencies
2
+ require 'rack'
3
+ require 'tilt'
4
+ require 'rack/protection'
5
+
6
+ # stdlib dependencies
7
+ require 'thread'
8
+ require 'time'
9
+ require 'uri'
10
+
11
+ # other files we need
12
+ require 'sinatra/showexceptions'
13
+ require 'sinatra/version'
14
+
15
+ module Sinatra
16
+ # The request object. See Rack::Request for more info:
17
+ # http://rack.rubyforge.org/doc/classes/Rack/Request.html
18
+ class Request < Rack::Request
19
+ # Returns an array of acceptable media types for the response
20
+ def accept
21
+ @env['sinatra.accept'] ||= begin
22
+ entries = @env['HTTP_ACCEPT'].to_s.split(',')
23
+ entries.map { |e| accept_entry(e) }.sort_by(&:last).map(&:first)
24
+ end
25
+ end
26
+
27
+ def preferred_type(*types)
28
+ return accept.first if types.empty?
29
+ types.flatten!
30
+ accept.detect do |pattern|
31
+ type = types.detect { |t| File.fnmatch(pattern, t) }
32
+ return type if type
33
+ end
34
+ end
35
+
36
+ alias accept? preferred_type
37
+ alias secure? ssl?
38
+
39
+ def forwarded?
40
+ @env.include? "HTTP_X_FORWARDED_HOST"
41
+ end
42
+
43
+ def safe?
44
+ get? or head? or options? or trace?
45
+ end
46
+
47
+ def idempotent?
48
+ safe? or put? or delete?
49
+ end
50
+
51
+ private
52
+
53
+ def accept_entry(entry)
54
+ type, *options = entry.delete(' ').split(';')
55
+ quality = 0 # we sort smallest first
56
+ options.delete_if { |e| quality = 1 - e[2..-1].to_f if e.start_with? 'q=' }
57
+ [type, [quality, type.count('*'), 1 - options.size]]
58
+ end
59
+ end
60
+
61
+ # The response object. See Rack::Response and Rack::ResponseHelpers for
62
+ # more info:
63
+ # http://rack.rubyforge.org/doc/classes/Rack/Response.html
64
+ # http://rack.rubyforge.org/doc/classes/Rack/Response/Helpers.html
65
+ class Response < Rack::Response
66
+ def initialize(*)
67
+ super
68
+ headers['Content-Type'] ||= 'text/html'
69
+ end
70
+
71
+ def body=(value)
72
+ value = value.body while Rack::Response === value
73
+ @body = String === value ? [value.to_str] : value
74
+ end
75
+
76
+ def each
77
+ block_given? ? super : enum_for(:each)
78
+ end
79
+
80
+ def finish
81
+ result = body
82
+
83
+ if drop_content_info?
84
+ headers.delete "Content-Length"
85
+ headers.delete "Content-Type"
86
+ end
87
+
88
+ if drop_body?
89
+ close
90
+ result = []
91
+ end
92
+
93
+ if calculate_content_length?
94
+ # if some other code has already set Content-Length, don't muck with it
95
+ # currently, this would be the static file-handler
96
+ headers["Content-Length"] = body.inject(0) { |l, p| l + Rack::Utils.bytesize(p) }.to_s
97
+ end
98
+
99
+ [status.to_i, header, result]
100
+ end
101
+
102
+ private
103
+
104
+ def calculate_content_length?
105
+ headers["Content-Type"] and not headers["Content-Length"] and Array === body
106
+ end
107
+
108
+ def drop_content_info?
109
+ status.to_i / 100 == 1 or drop_body?
110
+ end
111
+
112
+ def drop_body?
113
+ [204, 205, 304].include?(status.to_i)
114
+ end
115
+ end
116
+
117
+ # Some Rack handlers (Thin, Rainbows!) implement an extended body object protocol, however,
118
+ # some middleware (namely Rack::Lint) will break it by not mirroring the methods in question.
119
+ # This middleware will detect an extended body object and will make sure it reaches the
120
+ # handler directly. We do this here, so our middleware and middleware set up by the app will
121
+ # still be able to run.
122
+ class ExtendedRack < Struct.new(:app)
123
+ def call(env)
124
+ result, callback = app.call(env), env['async.callback']
125
+ return result unless callback and async?(*result)
126
+ after_response { callback.call result }
127
+ setup_close(env, *result)
128
+ throw :async
129
+ end
130
+
131
+ private
132
+
133
+ def setup_close(env, status, header, body)
134
+ return unless body.respond_to? :close and env.include? 'async.close'
135
+ env['async.close'].callback { body.close }
136
+ env['async.close'].errback { body.close }
137
+ end
138
+
139
+ def after_response(&block)
140
+ raise NotImplementedError, "only supports EventMachine at the moment" unless defined? EventMachine
141
+ EventMachine.next_tick(&block)
142
+ end
143
+
144
+ def async?(status, headers, body)
145
+ return true if status == -1
146
+ body.respond_to? :callback and body.respond_to? :errback
147
+ end
148
+ end
149
+
150
+ # Behaves exactly like Rack::CommonLogger with the notable exception that it does nothing,
151
+ # if another CommonLogger is already in the middleware chain.
152
+ class CommonLogger < Rack::CommonLogger
153
+ def call(env)
154
+ env['sinatra.commonlogger'] ? @app.call(env) : super
155
+ end
156
+
157
+ superclass.class_eval do
158
+ alias call_without_check call unless method_defined? :call_without_check
159
+ def call(env)
160
+ env['sinatra.commonlogger'] = true
161
+ call_without_check(env)
162
+ end
163
+ end
164
+ end
165
+
166
+ class NotFound < NameError #:nodoc:
167
+ def code ; 404 ; end
168
+ end
169
+
170
+ # Methods available to routes, before/after filters, and views.
171
+ module Helpers
172
+ # Set or retrieve the response status code.
173
+ def status(value=nil)
174
+ response.status = value if value
175
+ response.status
176
+ end
177
+
178
+ # Set or retrieve the response body. When a block is given,
179
+ # evaluation is deferred until the body is read with #each.
180
+ def body(value=nil, &block)
181
+ if block_given?
182
+ def block.each; yield(call) end
183
+ response.body = block
184
+ elsif value
185
+ response.body = value
186
+ else
187
+ response.body
188
+ end
189
+ end
190
+
191
+ # Halt processing and redirect to the URI provided.
192
+ def redirect(uri, *args)
193
+ if env['HTTP_VERSION'] == 'HTTP/1.1' and env["REQUEST_METHOD"] != 'GET'
194
+ status 303
195
+ else
196
+ status 302
197
+ end
198
+
199
+ # According to RFC 2616 section 14.30, "the field value consists of a
200
+ # single absolute URI"
201
+ response['Location'] = uri(uri, settings.absolute_redirects?, settings.prefixed_redirects?)
202
+ halt(*args)
203
+ end
204
+
205
+ # Generates the absolute URI for a given path in the app.
206
+ # Takes Rack routers and reverse proxies into account.
207
+ def uri(addr = nil, absolute = true, add_script_name = true)
208
+ return addr if addr =~ /\A[A-z][A-z0-9\+\.\-]*:/
209
+ uri = [host = ""]
210
+ if absolute
211
+ host << "http#{'s' if request.secure?}://"
212
+ if request.forwarded? or request.port != (request.secure? ? 443 : 80)
213
+ host << request.host_with_port
214
+ else
215
+ host << request.host
216
+ end
217
+ end
218
+ uri << request.script_name.to_s if add_script_name
219
+ uri << (addr ? addr : request.path_info).to_s
220
+ File.join uri
221
+ end
222
+
223
+ alias url uri
224
+ alias to uri
225
+
226
+ # Halt processing and return the error status provided.
227
+ def error(code, body=nil)
228
+ code, body = 500, code.to_str if code.respond_to? :to_str
229
+ response.body = body unless body.nil?
230
+ halt code
231
+ end
232
+
233
+ # Halt processing and return a 404 Not Found.
234
+ def not_found(body=nil)
235
+ error 404, body
236
+ end
237
+
238
+ # Set multiple response headers with Hash.
239
+ def headers(hash=nil)
240
+ response.headers.merge! hash if hash
241
+ response.headers
242
+ end
243
+
244
+ # Access the underlying Rack session.
245
+ def session
246
+ request.session
247
+ end
248
+
249
+ # Access shared logger object.
250
+ def logger
251
+ request.logger
252
+ end
253
+
254
+ # Look up a media type by file extension in Rack's mime registry.
255
+ def mime_type(type)
256
+ Base.mime_type(type)
257
+ end
258
+
259
+ # Set the Content-Type of the response body given a media type or file
260
+ # extension.
261
+ def content_type(type = nil, params={})
262
+ return response['Content-Type'] unless type
263
+ default = params.delete :default
264
+ mime_type = mime_type(type) || default
265
+ fail "Unknown media type: %p" % type if mime_type.nil?
266
+ mime_type = mime_type.dup
267
+ unless params.include? :charset or settings.add_charset.all? { |p| not p === mime_type }
268
+ params[:charset] = params.delete('charset') || settings.default_encoding
269
+ end
270
+ params.delete :charset if mime_type.include? 'charset'
271
+ unless params.empty?
272
+ mime_type << (mime_type.include?(';') ? ', ' : ';')
273
+ mime_type << params.map { |kv| kv.join('=') }.join(', ')
274
+ end
275
+ response['Content-Type'] = mime_type
276
+ end
277
+
278
+ # Set the Content-Disposition to "attachment" with the specified filename,
279
+ # instructing the user agents to prompt to save.
280
+ def attachment(filename=nil)
281
+ response['Content-Disposition'] = 'attachment'
282
+ if filename
283
+ params = '; filename="%s"' % File.basename(filename)
284
+ response['Content-Disposition'] << params
285
+ ext = File.extname(filename)
286
+ content_type(ext) unless response['Content-Type'] or ext.empty?
287
+ end
288
+ end
289
+
290
+ # Use the contents of the file at +path+ as the response body.
291
+ def send_file(path, opts={})
292
+ if opts[:type] or not response['Content-Type']
293
+ content_type opts[:type] || File.extname(path), :default => 'application/octet-stream'
294
+ end
295
+
296
+ if opts[:disposition] == 'attachment' || opts[:filename]
297
+ attachment opts[:filename] || path
298
+ elsif opts[:disposition] == 'inline'
299
+ response['Content-Disposition'] = 'inline'
300
+ end
301
+
302
+ last_modified opts[:last_modified] if opts[:last_modified]
303
+
304
+ file = Rack::File.new nil
305
+ file.path = path
306
+ result = file.serving env
307
+ result[1].each { |k,v| headers[k] ||= v }
308
+ halt result[0], result[2]
309
+ rescue Errno::ENOENT
310
+ not_found
311
+ end
312
+
313
+ # Class of the response body in case you use #stream.
314
+ #
315
+ # Three things really matter: The front and back block (back being the
316
+ # block generating content, front the one sending it to the client) and
317
+ # the scheduler, integrating with whatever concurrency feature the Rack
318
+ # handler is using.
319
+ #
320
+ # Scheduler has to respond to defer and schedule.
321
+ class Stream
322
+ def self.schedule(*) yield end
323
+ def self.defer(*) yield end
324
+
325
+ def initialize(scheduler = self.class, keep_open = false, &back)
326
+ @back, @scheduler, @keep_open = back.to_proc, scheduler, keep_open
327
+ @callbacks, @closed = [], false
328
+ end
329
+
330
+ def close
331
+ return if @closed
332
+ @closed = true
333
+ @scheduler.schedule { @callbacks.each { |c| c.call }}
334
+ end
335
+
336
+ def each(&front)
337
+ @front = front
338
+ @scheduler.defer do
339
+ begin
340
+ @back.call(self)
341
+ rescue Exception => e
342
+ @scheduler.schedule { raise e }
343
+ end
344
+ close unless @keep_open
345
+ end
346
+ end
347
+
348
+ def <<(data)
349
+ @scheduler.schedule { @front.call(data.to_s) }
350
+ self
351
+ end
352
+
353
+ def callback(&block)
354
+ return yield if @closed
355
+ @callbacks << block
356
+ end
357
+
358
+ alias errback callback
359
+ end
360
+
361
+ # Allows to start sending data to the client even though later parts of
362
+ # the response body have not yet been generated.
363
+ #
364
+ # The close parameter specifies whether Stream#close should be called
365
+ # after the block has been executed. This is only relevant for evented
366
+ # servers like Thin or Rainbows.
367
+ def stream(keep_open = false)
368
+ scheduler = env['async.callback'] ? EventMachine : Stream
369
+ current = @params.dup
370
+ body Stream.new(scheduler, keep_open) { |out| with_params(current) { yield(out) } }
371
+ end
372
+
373
+ # Specify response freshness policy for HTTP caches (Cache-Control header).
374
+ # Any number of non-value directives (:public, :private, :no_cache,
375
+ # :no_store, :must_revalidate, :proxy_revalidate) may be passed along with
376
+ # a Hash of value directives (:max_age, :min_stale, :s_max_age).
377
+ #
378
+ # cache_control :public, :must_revalidate, :max_age => 60
379
+ # => Cache-Control: public, must-revalidate, max-age=60
380
+ #
381
+ # See RFC 2616 / 14.9 for more on standard cache control directives:
382
+ # http://tools.ietf.org/html/rfc2616#section-14.9.1
383
+ def cache_control(*values)
384
+ if values.last.kind_of?(Hash)
385
+ hash = values.pop
386
+ hash.reject! { |k,v| v == false }
387
+ hash.reject! { |k,v| values << k if v == true }
388
+ else
389
+ hash = {}
390
+ end
391
+
392
+ values.map! { |value| value.to_s.tr('_','-') }
393
+ hash.each do |key, value|
394
+ key = key.to_s.tr('_', '-')
395
+ value = value.to_i if key == "max-age"
396
+ values << [key, value].join('=')
397
+ end
398
+
399
+ response['Cache-Control'] = values.join(', ') if values.any?
400
+ end
401
+
402
+ # Set the Expires header and Cache-Control/max-age directive. Amount
403
+ # can be an integer number of seconds in the future or a Time object
404
+ # indicating when the response should be considered "stale". The remaining
405
+ # "values" arguments are passed to the #cache_control helper:
406
+ #
407
+ # expires 500, :public, :must_revalidate
408
+ # => Cache-Control: public, must-revalidate, max-age=60
409
+ # => Expires: Mon, 08 Jun 2009 08:50:17 GMT
410
+ #
411
+ def expires(amount, *values)
412
+ values << {} unless values.last.kind_of?(Hash)
413
+
414
+ if amount.is_a? Integer
415
+ time = Time.now + amount.to_i
416
+ max_age = amount
417
+ else
418
+ time = time_for amount
419
+ max_age = time - Time.now
420
+ end
421
+
422
+ values.last.merge!(:max_age => max_age)
423
+ cache_control(*values)
424
+
425
+ response['Expires'] = time.httpdate
426
+ end
427
+
428
+ # Set the last modified time of the resource (HTTP 'Last-Modified' header)
429
+ # and halt if conditional GET matches. The +time+ argument is a Time,
430
+ # DateTime, or other object that responds to +to_time+.
431
+ #
432
+ # When the current request includes an 'If-Modified-Since' header that is
433
+ # equal or later than the time specified, execution is immediately halted
434
+ # with a '304 Not Modified' response.
435
+ def last_modified(time)
436
+ return unless time
437
+ time = time_for time
438
+ response['Last-Modified'] = time.httpdate
439
+ return if env['HTTP_IF_NONE_MATCH']
440
+
441
+ if status == 200 and env['HTTP_IF_MODIFIED_SINCE']
442
+ # compare based on seconds since epoch
443
+ since = Time.httpdate(env['HTTP_IF_MODIFIED_SINCE']).to_i
444
+ halt 304 if since >= time.to_i
445
+ end
446
+
447
+ if (success? or status == 412) and env['HTTP_IF_UNMODIFIED_SINCE']
448
+ # compare based on seconds since epoch
449
+ since = Time.httpdate(env['HTTP_IF_UNMODIFIED_SINCE']).to_i
450
+ halt 412 if since < time.to_i
451
+ end
452
+ rescue ArgumentError
453
+ end
454
+
455
+ # Set the response entity tag (HTTP 'ETag' header) and halt if conditional
456
+ # GET matches. The +value+ argument is an identifier that uniquely
457
+ # identifies the current version of the resource. The +kind+ argument
458
+ # indicates whether the etag should be used as a :strong (default) or :weak
459
+ # cache validator.
460
+ #
461
+ # When the current request includes an 'If-None-Match' header with a
462
+ # matching etag, execution is immediately halted. If the request method is
463
+ # GET or HEAD, a '304 Not Modified' response is sent.
464
+ def etag(value, options = {})
465
+ # Before touching this code, please double check RFC 2616 14.24 and 14.26.
466
+ options = {:kind => options} unless Hash === options
467
+ kind = options[:kind] || :strong
468
+ new_resource = options.fetch(:new_resource) { request.post? }
469
+
470
+ unless [:strong, :weak].include?(kind)
471
+ raise ArgumentError, ":strong or :weak expected"
472
+ end
473
+
474
+ value = '"%s"' % value
475
+ value = 'W/' + value if kind == :weak
476
+ response['ETag'] = value
477
+
478
+ if success? or status == 304
479
+ if etag_matches? env['HTTP_IF_NONE_MATCH'], new_resource
480
+ halt(request.safe? ? 304 : 412)
481
+ end
482
+
483
+ if env['HTTP_IF_MATCH']
484
+ halt 412 unless etag_matches? env['HTTP_IF_MATCH'], new_resource
485
+ end
486
+ end
487
+ end
488
+
489
+ # Sugar for redirect (example: redirect back)
490
+ def back
491
+ request.referer
492
+ end
493
+
494
+ # whether or not the status is set to 1xx
495
+ def informational?
496
+ status.between? 100, 199
497
+ end
498
+
499
+ # whether or not the status is set to 2xx
500
+ def success?
501
+ status.between? 200, 299
502
+ end
503
+
504
+ # whether or not the status is set to 3xx
505
+ def redirect?
506
+ status.between? 300, 399
507
+ end
508
+
509
+ # whether or not the status is set to 4xx
510
+ def client_error?
511
+ status.between? 400, 499
512
+ end
513
+
514
+ # whether or not the status is set to 5xx
515
+ def server_error?
516
+ status.between? 500, 599
517
+ end
518
+
519
+ # whether or not the status is set to 404
520
+ def not_found?
521
+ status == 404
522
+ end
523
+
524
+ # Generates a Time object from the given value.
525
+ # Used by #expires and #last_modified.
526
+ def time_for(value)
527
+ if value.respond_to? :to_time
528
+ value.to_time
529
+ elsif value.is_a? Time
530
+ value
531
+ elsif value.respond_to? :new_offset
532
+ # DateTime#to_time does the same on 1.9
533
+ d = value.new_offset 0
534
+ t = Time.utc d.year, d.mon, d.mday, d.hour, d.min, d.sec + d.sec_fraction
535
+ t.getlocal
536
+ elsif value.respond_to? :mday
537
+ # Date#to_time does the same on 1.9
538
+ Time.local(value.year, value.mon, value.mday)
539
+ elsif value.is_a? Numeric
540
+ Time.at value
541
+ else
542
+ Time.parse value.to_s
543
+ end
544
+ rescue ArgumentError => boom
545
+ raise boom
546
+ rescue Exception
547
+ raise ArgumentError, "unable to convert #{value.inspect} to a Time object"
548
+ end
549
+
550
+ private
551
+
552
+ # Helper method checking if a ETag value list includes the current ETag.
553
+ def etag_matches?(list, new_resource = request.post?)
554
+ return !new_resource if list == '*'
555
+ list.to_s.split(/\s*,\s*/).include? response['ETag']
556
+ end
557
+
558
+ def with_params(temp_params)
559
+ original, @params = @params, temp_params
560
+ yield
561
+ ensure
562
+ @params = original if original
563
+ end
564
+ end
565
+
566
+ private
567
+
568
+ # Template rendering methods. Each method takes the name of a template
569
+ # to render as a Symbol and returns a String with the rendered output,
570
+ # as well as an optional hash with additional options.
571
+ #
572
+ # `template` is either the name or path of the template as symbol
573
+ # (Use `:'subdir/myview'` for views in subdirectories), or a string
574
+ # that will be rendered.
575
+ #
576
+ # Possible options are:
577
+ # :content_type The content type to use, same arguments as content_type.
578
+ # :layout If set to false, no layout is rendered, otherwise
579
+ # the specified layout is used (Ignored for `sass` and `less`)
580
+ # :layout_engine Engine to use for rendering the layout.
581
+ # :locals A hash with local variables that should be available
582
+ # in the template
583
+ # :scope If set, template is evaluate with the binding of the given
584
+ # object rather than the application instance.
585
+ # :views Views directory to use.
586
+ module Templates
587
+ module ContentTyped
588
+ attr_accessor :content_type
589
+ end
590
+
591
+ def initialize
592
+ super
593
+ @default_layout = :layout
594
+ end
595
+
596
+ def erb(template, options={}, locals={})
597
+ render :erb, template, options, locals
598
+ end
599
+
600
+ def erubis(template, options={}, locals={})
601
+ warn "Sinatra::Templates#erubis is deprecated and will be removed, use #erb instead.\n" \
602
+ "If you have Erubis installed, it will be used automatically."
603
+ render :erubis, template, options, locals
604
+ end
605
+
606
+ def haml(template, options={}, locals={})
607
+ render :haml, template, options, locals
608
+ end
609
+
610
+ def sass(template, options={}, locals={})
611
+ options.merge! :layout => false, :default_content_type => :css
612
+ render :sass, template, options, locals
613
+ end
614
+
615
+ def scss(template, options={}, locals={})
616
+ options.merge! :layout => false, :default_content_type => :css
617
+ render :scss, template, options, locals
618
+ end
619
+
620
+ def less(template, options={}, locals={})
621
+ options.merge! :layout => false, :default_content_type => :css
622
+ render :less, template, options, locals
623
+ end
624
+
625
+ def builder(template=nil, options={}, locals={}, &block)
626
+ options[:default_content_type] = :xml
627
+ render_ruby(:builder, template, options, locals, &block)
628
+ end
629
+
630
+ def liquid(template, options={}, locals={})
631
+ render :liquid, template, options, locals
632
+ end
633
+
634
+ def markdown(template, options={}, locals={})
635
+ render :markdown, template, options, locals
636
+ end
637
+
638
+ def textile(template, options={}, locals={})
639
+ render :textile, template, options, locals
640
+ end
641
+
642
+ def rdoc(template, options={}, locals={})
643
+ render :rdoc, template, options, locals
644
+ end
645
+
646
+ def radius(template, options={}, locals={})
647
+ render :radius, template, options, locals
648
+ end
649
+
650
+ def markaby(template=nil, options={}, locals={}, &block)
651
+ render_ruby(:mab, template, options, locals, &block)
652
+ end
653
+
654
+ def coffee(template, options={}, locals={})
655
+ options.merge! :layout => false, :default_content_type => :js
656
+ render :coffee, template, options, locals
657
+ end
658
+
659
+ def nokogiri(template=nil, options={}, locals={}, &block)
660
+ options[:default_content_type] = :xml
661
+ render_ruby(:nokogiri, template, options, locals, &block)
662
+ end
663
+
664
+ def slim(template, options={}, locals={})
665
+ render :slim, template, options, locals
666
+ end
667
+
668
+ def creole(template, options={}, locals={})
669
+ render :creole, template, options, locals
670
+ end
671
+
672
+ # Calls the given block for every possible template file in views,
673
+ # named name.ext, where ext is registered on engine.
674
+ def find_template(views, name, engine)
675
+ yield ::File.join(views, "#{name}.#{@preferred_extension}")
676
+ Tilt.mappings.each do |ext, engines|
677
+ next unless ext != @preferred_extension and engines.include? engine
678
+ yield ::File.join(views, "#{name}.#{ext}")
679
+ end
680
+ end
681
+
682
+ private
683
+ # logic shared between builder and nokogiri
684
+ def render_ruby(engine, template, options={}, locals={}, &block)
685
+ options, template = template, nil if template.is_a?(Hash)
686
+ template = Proc.new { block } if template.nil?
687
+ render engine, template, options, locals
688
+ end
689
+
690
+ def render(engine, data, options={}, locals={}, &block)
691
+ # merge app-level options
692
+ options = settings.send(engine).merge(options) if settings.respond_to?(engine)
693
+ options[:outvar] ||= '@_out_buf'
694
+ options[:default_encoding] ||= settings.default_encoding
695
+
696
+ # extract generic options
697
+ locals = options.delete(:locals) || locals || {}
698
+ views = options.delete(:views) || settings.views || "./views"
699
+ layout = options.delete(:layout)
700
+ eat_errors = layout.nil?
701
+ layout = @default_layout if layout.nil? or layout == true
702
+ content_type = options.delete(:content_type) || options.delete(:default_content_type)
703
+ layout_engine = options.delete(:layout_engine) || engine
704
+ scope = options.delete(:scope) || self
705
+
706
+ # compile and render template
707
+ begin
708
+ layout_was = @default_layout
709
+ @default_layout = false
710
+ template = compile_template(engine, data, options, views)
711
+ output = template.render(scope, locals, &block)
712
+ ensure
713
+ @default_layout = layout_was
714
+ end
715
+
716
+ # render layout
717
+ if layout
718
+ options = options.merge(:views => views, :layout => false, :eat_errors => eat_errors, :scope => scope)
719
+ catch(:layout_missing) { return render(layout_engine, layout, options, locals) { output } }
720
+ end
721
+
722
+ output.extend(ContentTyped).content_type = content_type if content_type
723
+ output
724
+ end
725
+
726
+ def compile_template(engine, data, options, views)
727
+ eat_errors = options.delete :eat_errors
728
+ template_cache.fetch engine, data, options do
729
+ template = Tilt[engine]
730
+ raise "Template engine not found: #{engine}" if template.nil?
731
+
732
+ case data
733
+ when Symbol
734
+ body, path, line = settings.templates[data]
735
+ if body
736
+ body = body.call if body.respond_to?(:call)
737
+ template.new(path, line.to_i, options) { body }
738
+ else
739
+ found = false
740
+ @preferred_extension = engine.to_s
741
+ find_template(views, data, template) do |file|
742
+ path ||= file # keep the initial path rather than the last one
743
+ if found = File.exists?(file)
744
+ path = file
745
+ break
746
+ end
747
+ end
748
+ throw :layout_missing if eat_errors and not found
749
+ template.new(path, 1, options)
750
+ end
751
+ when Proc, String
752
+ body = data.is_a?(String) ? Proc.new { data } : data
753
+ path, line = settings.caller_locations.first
754
+ template.new(path, line.to_i, options, &body)
755
+ else
756
+ raise ArgumentError, "Sorry, don't know how to render #{data.inspect}."
757
+ end
758
+ end
759
+ end
760
+ end
761
+
762
+ # Base class for all Sinatra applications and middleware.
763
+ class Base
764
+ include Rack::Utils
765
+ include Helpers
766
+ include Templates
767
+
768
+ attr_accessor :app
769
+ attr_reader :template_cache
770
+
771
+ def initialize(app=nil)
772
+ super()
773
+ @app = app
774
+ @template_cache = Tilt::Cache.new
775
+ yield self if block_given?
776
+ end
777
+
778
+ # Rack call interface.
779
+ def call(env)
780
+ dup.call!(env)
781
+ end
782
+
783
+ attr_accessor :env, :request, :response, :params
784
+
785
+ def call!(env) # :nodoc:
786
+ @env = env
787
+ @request = Request.new(env)
788
+ @response = Response.new
789
+ @params = indifferent_params(@request.params)
790
+ template_cache.clear if settings.reload_templates
791
+ force_encoding(@params)
792
+
793
+ @response['Content-Type'] = nil
794
+ invoke { dispatch! }
795
+ invoke { error_block!(response.status) }
796
+
797
+ unless @response['Content-Type']
798
+ if Array === body and body[0].respond_to? :content_type
799
+ content_type body[0].content_type
800
+ else
801
+ content_type :html
802
+ end
803
+ end
804
+
805
+ @response.finish
806
+ end
807
+
808
+ # Access settings defined with Base.set.
809
+ def self.settings
810
+ self
811
+ end
812
+
813
+ # Access settings defined with Base.set.
814
+ def settings
815
+ self.class.settings
816
+ end
817
+
818
+ def options
819
+ warn "Sinatra::Base#options is deprecated and will be removed, " \
820
+ "use #settings instead."
821
+ settings
822
+ end
823
+
824
+ # Exit the current block, halts any further processing
825
+ # of the request, and returns the specified response.
826
+ def halt(*response)
827
+ response = response.first if response.length == 1
828
+ throw :halt, response
829
+ end
830
+
831
+ # Pass control to the next matching route.
832
+ # If there are no more matching routes, Sinatra will
833
+ # return a 404 response.
834
+ def pass(&block)
835
+ throw :pass, block
836
+ end
837
+
838
+ # Forward the request to the downstream app -- middleware only.
839
+ def forward
840
+ fail "downstream app not set" unless @app.respond_to? :call
841
+ status, headers, body = @app.call env
842
+ @response.status = status
843
+ @response.body = body
844
+ @response.headers.merge! headers
845
+ nil
846
+ end
847
+
848
+ private
849
+ # Run filters defined on the class and all superclasses.
850
+ def filter!(type, base = settings)
851
+ filter! type, base.superclass if base.superclass.respond_to?(:filters)
852
+ base.filters[type].each { |args| process_route(*args) }
853
+ end
854
+
855
+ # Run routes defined on the class and all superclasses.
856
+ def route!(base = settings, pass_block=nil)
857
+ if routes = base.routes[@request.request_method]
858
+ routes.each do |pattern, keys, conditions, block|
859
+ pass_block = process_route(pattern, keys, conditions) do |*args|
860
+ route_eval { block[*args] }
861
+ end
862
+ end
863
+ end
864
+
865
+ # Run routes defined in superclass.
866
+ if base.superclass.respond_to?(:routes)
867
+ return route!(base.superclass, pass_block)
868
+ end
869
+
870
+ route_eval(&pass_block) if pass_block
871
+ route_missing
872
+ end
873
+
874
+ # Run a route block and throw :halt with the result.
875
+ def route_eval
876
+ throw :halt, yield
877
+ end
878
+
879
+ # If the current request matches pattern and conditions, fill params
880
+ # with keys and call the given block.
881
+ # Revert params afterwards.
882
+ #
883
+ # Returns pass block.
884
+ def process_route(pattern, keys, conditions, block = nil, values = [])
885
+ route = @request.path_info
886
+ route = '/' if route.empty? and not settings.empty_path_info?
887
+ return unless match = pattern.match(route)
888
+ values += match.captures.to_a.map { |v| force_encoding URI.decode_www_form_component(v) if v }
889
+
890
+ if values.any?
891
+ original, @params = params, params.merge('splat' => [], 'captures' => values)
892
+ keys.zip(values) { |k,v| Array === @params[k] ? @params[k] << v : @params[k] = v if v }
893
+ end
894
+
895
+ catch(:pass) do
896
+ conditions.each { |c| throw :pass if c.bind(self).call == false }
897
+ block ? block[self, values] : yield(self, values)
898
+ end
899
+ ensure
900
+ @params = original if original
901
+ end
902
+
903
+ # No matching route was found or all routes passed. The default
904
+ # implementation is to forward the request downstream when running
905
+ # as middleware (@app is non-nil); when no downstream app is set, raise
906
+ # a NotFound exception. Subclasses can override this method to perform
907
+ # custom route miss logic.
908
+ def route_missing
909
+ if @app
910
+ forward
911
+ else
912
+ raise NotFound
913
+ end
914
+ end
915
+
916
+ # Attempt to serve static files from public directory. Throws :halt when
917
+ # a matching file is found, returns nil otherwise.
918
+ def static!
919
+ return if (public_dir = settings.public_folder).nil?
920
+ public_dir = File.expand_path(public_dir)
921
+
922
+ path = File.expand_path(public_dir + unescape(request.path_info))
923
+ return unless path.start_with?(public_dir) and File.file?(path)
924
+
925
+ env['sinatra.static_file'] = path
926
+ cache_control(*settings.static_cache_control) if settings.static_cache_control?
927
+ send_file path, :disposition => nil
928
+ end
929
+
930
+ # Enable string or symbol key access to the nested params hash.
931
+ def indifferent_params(params)
932
+ params = indifferent_hash.merge(params)
933
+ params.each do |key, value|
934
+ next unless value.is_a?(Hash)
935
+ params[key] = indifferent_params(value)
936
+ end
937
+ end
938
+
939
+ # Creates a Hash with indifferent access.
940
+ def indifferent_hash
941
+ Hash.new {|hash,key| hash[key.to_s] if Symbol === key }
942
+ end
943
+
944
+ # Run the block with 'throw :halt' support and apply result to the response.
945
+ def invoke
946
+ res = catch(:halt) { yield }
947
+ res = [res] if Fixnum === res or String === res
948
+ if Array === res and Fixnum === res.first
949
+ status(res.shift)
950
+ body(res.pop)
951
+ headers(*res)
952
+ elsif res.respond_to? :each
953
+ body res
954
+ end
955
+ nil # avoid double setting the same response tuple twice
956
+ end
957
+
958
+ # Dispatch a request with error handling.
959
+ def dispatch!
960
+ invoke do
961
+ static! if settings.static? && (request.get? || request.head?)
962
+ filter! :before
963
+ route!
964
+ end
965
+ rescue ::Exception => boom
966
+ invoke { handle_exception!(boom) }
967
+ ensure
968
+ filter! :after unless env['sinatra.static_file']
969
+ end
970
+
971
+ # Error handling during requests.
972
+ def handle_exception!(boom)
973
+ @env['sinatra.error'] = boom
974
+ status boom.respond_to?(:code) ? Integer(boom.code) : 500
975
+
976
+ if server_error?
977
+ dump_errors! boom if settings.dump_errors?
978
+ raise boom if settings.show_exceptions? and settings.show_exceptions != :after_handler
979
+ end
980
+
981
+ if not_found?
982
+ headers['X-Cascade'] = 'pass'
983
+ body '<h1>Not Found</h1>'
984
+ end
985
+
986
+ res = error_block!(boom.class, boom) || error_block!(status, boom)
987
+ return res if res or not server_error?
988
+ raise boom if settings.raise_errors? or settings.show_exceptions?
989
+ error_block! Exception, boom
990
+ end
991
+
992
+ # Find an custom error block for the key(s) specified.
993
+ def error_block!(key, *block_params)
994
+ base = settings
995
+ while base.respond_to?(:errors)
996
+ next base = base.superclass unless args = base.errors[key]
997
+ args += [block_params]
998
+ return process_route(*args)
999
+ end
1000
+ return false unless key.respond_to? :superclass and key.superclass < Exception
1001
+ error_block!(key.superclass, *block_params)
1002
+ end
1003
+
1004
+ def dump_errors!(boom)
1005
+ msg = ["#{boom.class} - #{boom.message}:", *boom.backtrace].join("\n\t")
1006
+ @env['rack.errors'].puts(msg)
1007
+ end
1008
+
1009
+ class << self
1010
+ attr_reader :routes, :filters, :templates, :errors
1011
+
1012
+ # Removes all routes, filters, middleware and extension hooks from the
1013
+ # current class (not routes/filters/... defined by its superclass).
1014
+ def reset!
1015
+ @conditions = []
1016
+ @routes = {}
1017
+ @filters = {:before => [], :after => []}
1018
+ @errors = {}
1019
+ @middleware = []
1020
+ @prototype = nil
1021
+ @extensions = []
1022
+
1023
+ if superclass.respond_to?(:templates)
1024
+ @templates = Hash.new { |hash,key| superclass.templates[key] }
1025
+ else
1026
+ @templates = {}
1027
+ end
1028
+ end
1029
+
1030
+ # Extension modules registered on this class and all superclasses.
1031
+ def extensions
1032
+ if superclass.respond_to?(:extensions)
1033
+ (@extensions + superclass.extensions).uniq
1034
+ else
1035
+ @extensions
1036
+ end
1037
+ end
1038
+
1039
+ # Middleware used in this class and all superclasses.
1040
+ def middleware
1041
+ if superclass.respond_to?(:middleware)
1042
+ superclass.middleware + @middleware
1043
+ else
1044
+ @middleware
1045
+ end
1046
+ end
1047
+
1048
+ # Sets an option to the given value. If the value is a proc,
1049
+ # the proc will be called every time the option is accessed.
1050
+ def set(option, value = (not_set = true), ignore_setter = false, &block)
1051
+ raise ArgumentError if block and !not_set
1052
+ value, not_set = block, false if block
1053
+
1054
+ if not_set
1055
+ raise ArgumentError unless option.respond_to?(:each)
1056
+ option.each { |k,v| set(k, v) }
1057
+ return self
1058
+ end
1059
+
1060
+ if respond_to?("#{option}=") and not ignore_setter
1061
+ return __send__("#{option}=", value)
1062
+ end
1063
+
1064
+ setter = proc { |val| set option, val, true }
1065
+ getter = proc { value }
1066
+
1067
+ case value
1068
+ when Proc
1069
+ getter = value
1070
+ when Symbol, Fixnum, FalseClass, TrueClass, NilClass
1071
+ getter = value.inspect
1072
+ when Hash
1073
+ setter = proc do |val|
1074
+ val = value.merge val if Hash === val
1075
+ set option, val, true
1076
+ end
1077
+ end
1078
+
1079
+ define_singleton_method("#{option}=", setter) if setter
1080
+ define_singleton_method(option, getter) if getter
1081
+ define_singleton_method("#{option}?", "!!#{option}") unless method_defined? "#{option}?"
1082
+ self
1083
+ end
1084
+
1085
+ # Same as calling `set :option, true` for each of the given options.
1086
+ def enable(*opts)
1087
+ opts.each { |key| set(key, true) }
1088
+ end
1089
+
1090
+ # Same as calling `set :option, false` for each of the given options.
1091
+ def disable(*opts)
1092
+ opts.each { |key| set(key, false) }
1093
+ end
1094
+
1095
+ # Define a custom error handler. Optionally takes either an Exception
1096
+ # class, or an HTTP status code to specify which errors should be
1097
+ # handled.
1098
+ def error(*codes, &block)
1099
+ args = compile! "ERROR", //, block
1100
+ codes = codes.map { |c| Array(c) }.flatten
1101
+ codes << Exception if codes.empty?
1102
+ codes.each { |c| @errors[c] = args }
1103
+ end
1104
+
1105
+ # Sugar for `error(404) { ... }`
1106
+ def not_found(&block)
1107
+ error 404, &block
1108
+ end
1109
+
1110
+ # Define a named template. The block must return the template source.
1111
+ def template(name, &block)
1112
+ filename, line = caller_locations.first
1113
+ templates[name] = [block, filename, line.to_i]
1114
+ end
1115
+
1116
+ # Define the layout template. The block must return the template source.
1117
+ def layout(name=:layout, &block)
1118
+ template name, &block
1119
+ end
1120
+
1121
+ # Load embeded templates from the file; uses the caller's __FILE__
1122
+ # when no file is specified.
1123
+ def inline_templates=(file=nil)
1124
+ file = (file.nil? || file == true) ? (caller_files.first || File.expand_path($0)) : file
1125
+
1126
+ begin
1127
+ io = ::IO.respond_to?(:binread) ? ::IO.binread(file) : ::IO.read(file)
1128
+ app, data = io.gsub("\r\n", "\n").split(/^__END__$/, 2)
1129
+ rescue Errno::ENOENT
1130
+ app, data = nil
1131
+ end
1132
+
1133
+ if data
1134
+ if app and app =~ /([^\n]*\n)?#[^\n]*coding: *(\S+)/m
1135
+ encoding = $2
1136
+ else
1137
+ encoding = settings.default_encoding
1138
+ end
1139
+ lines = app.count("\n") + 1
1140
+ template = nil
1141
+ force_encoding data, encoding
1142
+ data.each_line do |line|
1143
+ lines += 1
1144
+ if line =~ /^@@\s*(.*\S)\s*$/
1145
+ template = force_encoding('', encoding)
1146
+ templates[$1.to_sym] = [template, file, lines]
1147
+ elsif template
1148
+ template << line
1149
+ end
1150
+ end
1151
+ end
1152
+ end
1153
+
1154
+ # Lookup or register a mime type in Rack's mime registry.
1155
+ def mime_type(type, value=nil)
1156
+ return type if type.nil? || type.to_s.include?('/')
1157
+ type = ".#{type}" unless type.to_s[0] == ?.
1158
+ return Rack::Mime.mime_type(type, nil) unless value
1159
+ Rack::Mime::MIME_TYPES[type] = value
1160
+ end
1161
+
1162
+ # provides all mime types matching type, including deprecated types:
1163
+ # mime_types :html # => ['text/html']
1164
+ # mime_types :js # => ['application/javascript', 'text/javascript']
1165
+ def mime_types(type)
1166
+ type = mime_type type
1167
+ type =~ /^application\/(xml|javascript)$/ ? [type, "text/#$1"] : [type]
1168
+ end
1169
+
1170
+ # Define a before filter; runs before all requests within the same
1171
+ # context as route handlers and may access/modify the request and
1172
+ # response.
1173
+ def before(path = nil, options = {}, &block)
1174
+ add_filter(:before, path, options, &block)
1175
+ end
1176
+
1177
+ # Define an after filter; runs after all requests within the same
1178
+ # context as route handlers and may access/modify the request and
1179
+ # response.
1180
+ def after(path = nil, options = {}, &block)
1181
+ add_filter(:after, path, options, &block)
1182
+ end
1183
+
1184
+ # add a filter
1185
+ def add_filter(type, path = nil, options = {}, &block)
1186
+ path, options = //, path if path.respond_to?(:each_pair)
1187
+ filters[type] << compile!(type, path || //, block, options)
1188
+ end
1189
+
1190
+ # Add a route condition. The route is considered non-matching when the
1191
+ # block returns false.
1192
+ def condition(name = "#{caller.first[/`.*'/]} condition", &block)
1193
+ @conditions << generate_method(name, &block)
1194
+ end
1195
+
1196
+ def public=(value)
1197
+ warn ":public is no longer used to avoid overloading Module#public, use :public_folder instead"
1198
+ set(:public_folder, value)
1199
+ end
1200
+
1201
+ private
1202
+ # Dynamically defines a method on settings.
1203
+ def define_singleton_method(name, content = Proc.new)
1204
+ # replace with call to singleton_class once we're 1.9 only
1205
+ (class << self; self; end).class_eval do
1206
+ undef_method(name) if method_defined? name
1207
+ String === content ? class_eval("def #{name}() #{content}; end") : define_method(name, &content)
1208
+ end
1209
+ end
1210
+
1211
+ # Condition for matching host name. Parameter might be String or Regexp.
1212
+ def host_name(pattern)
1213
+ condition { pattern === request.host }
1214
+ end
1215
+
1216
+ # Condition for matching user agent. Parameter should be Regexp.
1217
+ # Will set params[:agent].
1218
+ def user_agent(pattern)
1219
+ condition do
1220
+ if request.user_agent.to_s =~ pattern
1221
+ @params[:agent] = $~[1..-1]
1222
+ true
1223
+ else
1224
+ false
1225
+ end
1226
+ end
1227
+ end
1228
+ alias_method :agent, :user_agent
1229
+
1230
+ # Condition for matching mimetypes. Accepts file extensions.
1231
+ def provides(*types)
1232
+ types.map! { |t| mime_types(t) }
1233
+ types.flatten!
1234
+ condition do
1235
+ if type = request.preferred_type(types)
1236
+ content_type(type)
1237
+ true
1238
+ else
1239
+ false
1240
+ end
1241
+ end
1242
+ end
1243
+
1244
+ public
1245
+ # Defining a `GET` handler also automatically defines
1246
+ # a `HEAD` handler.
1247
+ def get(path, opts={}, &block)
1248
+ conditions = @conditions.dup
1249
+ route('GET', path, opts, &block)
1250
+
1251
+ @conditions = conditions
1252
+ route('HEAD', path, opts, &block)
1253
+ end
1254
+
1255
+ def put(path, opts={}, &bk) route 'PUT', path, opts, &bk end
1256
+ def post(path, opts={}, &bk) route 'POST', path, opts, &bk end
1257
+ def delete(path, opts={}, &bk) route 'DELETE', path, opts, &bk end
1258
+ def head(path, opts={}, &bk) route 'HEAD', path, opts, &bk end
1259
+ def options(path, opts={}, &bk) route 'OPTIONS', path, opts, &bk end
1260
+ def patch(path, opts={}, &bk) route 'PATCH', path, opts, &bk end
1261
+
1262
+ private
1263
+ def route(verb, path, options={}, &block)
1264
+ # Because of self.options.host
1265
+ host_name(options.delete(:host)) if options.key?(:host)
1266
+ enable :empty_path_info if path == "" and empty_path_info.nil?
1267
+ signature = compile!(verb, path, block, options)
1268
+ (@routes[verb] ||= []) << signature
1269
+ invoke_hook(:route_added, verb, path, block)
1270
+ signature
1271
+ end
1272
+
1273
+ def invoke_hook(name, *args)
1274
+ extensions.each { |e| e.send(name, *args) if e.respond_to?(name) }
1275
+ end
1276
+
1277
+ def generate_method(method_name, &block)
1278
+ define_method(method_name, &block)
1279
+ method = instance_method method_name
1280
+ remove_method method_name
1281
+ method
1282
+ end
1283
+
1284
+ def compile!(verb, path, block, options = {})
1285
+ options.each_pair { |option, args| send(option, *args) }
1286
+ method_name = "#{verb} #{path}"
1287
+ unbound_method = generate_method(method_name, &block)
1288
+ pattern, keys = compile path
1289
+ conditions, @conditions = @conditions, []
1290
+
1291
+ [ pattern, keys, conditions, block.arity != 0 ?
1292
+ proc { |a,p| unbound_method.bind(a).call(*p) } :
1293
+ proc { |a,p| unbound_method.bind(a).call } ]
1294
+ end
1295
+
1296
+ def compile(path)
1297
+ keys = []
1298
+ if path.respond_to? :to_str
1299
+ pattern = path.to_str.gsub(/[^\?\%\\\/\:\*\w]/) { |c| encoded(c) }
1300
+ pattern.gsub!(/((:\w+)|\*)/) do |match|
1301
+ if match == "*"
1302
+ keys << 'splat'
1303
+ "(.*?)"
1304
+ else
1305
+ keys << $2[1..-1]
1306
+ "([^/?#]+)"
1307
+ end
1308
+ end
1309
+ [/^#{pattern}$/, keys]
1310
+ elsif path.respond_to?(:keys) && path.respond_to?(:match)
1311
+ [path, path.keys]
1312
+ elsif path.respond_to?(:names) && path.respond_to?(:match)
1313
+ [path, path.names]
1314
+ elsif path.respond_to? :match
1315
+ [path, keys]
1316
+ else
1317
+ raise TypeError, path
1318
+ end
1319
+ end
1320
+
1321
+ URI = ::URI.const_defined?(:Parser) ? ::URI::Parser.new : ::URI
1322
+
1323
+ def encoded(char)
1324
+ enc = URI.escape(char)
1325
+ enc = "(?:#{Regexp.escape enc}|#{URI.escape char, /./})" if enc == char
1326
+ enc = "(?:#{enc}|#{encoded('+')})" if char == " "
1327
+ enc
1328
+ end
1329
+
1330
+ public
1331
+ # Makes the methods defined in the block and in the Modules given
1332
+ # in `extensions` available to the handlers and templates
1333
+ def helpers(*extensions, &block)
1334
+ class_eval(&block) if block_given?
1335
+ include(*extensions) if extensions.any?
1336
+ end
1337
+
1338
+ # Register an extension. Alternatively take a block from which an
1339
+ # extension will be created and registered on the fly.
1340
+ def register(*extensions, &block)
1341
+ extensions << Module.new(&block) if block_given?
1342
+ @extensions += extensions
1343
+ extensions.each do |extension|
1344
+ extend extension
1345
+ extension.registered(self) if extension.respond_to?(:registered)
1346
+ end
1347
+ end
1348
+
1349
+ def development?; environment == :development end
1350
+ def production?; environment == :production end
1351
+ def test?; environment == :test end
1352
+
1353
+ # Set configuration options for Sinatra and/or the app.
1354
+ # Allows scoping of settings for certain environments.
1355
+ def configure(*envs, &block)
1356
+ yield self if envs.empty? || envs.include?(environment.to_sym)
1357
+ end
1358
+
1359
+ # Use the specified Rack middleware
1360
+ def use(middleware, *args, &block)
1361
+ @prototype = nil
1362
+ @middleware << [middleware, args, block]
1363
+ end
1364
+
1365
+ def quit!(server, handler_name)
1366
+ # Use Thin's hard #stop! if available, otherwise just #stop.
1367
+ server.respond_to?(:stop!) ? server.stop! : server.stop
1368
+ $stderr.puts "\n== Sinatra has ended his set (crowd applauds)" unless handler_name =~/cgi/i
1369
+ end
1370
+
1371
+ # Run the Sinatra app as a self-hosted server using
1372
+ # Thin, Mongrel or WEBrick (in that order). If given a block, will call
1373
+ # with the constructed handler once we have taken the stage.
1374
+ def run!(options={})
1375
+ set options
1376
+ handler = detect_rack_handler
1377
+ handler_name = handler.name.gsub(/.*::/, '')
1378
+ handler.run self, :Host => bind, :Port => port do |server|
1379
+ unless handler_name =~ /cgi/i
1380
+ $stderr.puts "== Sinatra/#{Sinatra::VERSION} has taken the stage " +
1381
+ "on #{port} for #{environment} with backup from #{handler_name}"
1382
+ end
1383
+ [:INT, :TERM].each { |sig| trap(sig) { quit!(server, handler_name) } }
1384
+ server.threaded = settings.threaded if server.respond_to? :threaded=
1385
+ set :running, true
1386
+ yield server if block_given?
1387
+ end
1388
+ rescue Errno::EADDRINUSE
1389
+ $stderr.puts "== Someone is already performing on port #{port}!"
1390
+ end
1391
+
1392
+ # The prototype instance used to process requests.
1393
+ def prototype
1394
+ @prototype ||= new
1395
+ end
1396
+
1397
+ # Create a new instance without middleware in front of it.
1398
+ alias new! new unless method_defined? :new!
1399
+
1400
+ # Create a new instance of the class fronted by its middleware
1401
+ # pipeline. The object is guaranteed to respond to #call but may not be
1402
+ # an instance of the class new was called on.
1403
+ def new(*args, &bk)
1404
+ build(Rack::Builder.new, *args, &bk).to_app
1405
+ end
1406
+
1407
+ # Creates a Rack::Builder instance with all the middleware set up and
1408
+ # an instance of this class as end point.
1409
+ def build(builder, *args, &bk)
1410
+ setup_default_middleware builder
1411
+ setup_middleware builder
1412
+ builder.run new!(*args, &bk)
1413
+ builder
1414
+ end
1415
+
1416
+ def call(env)
1417
+ synchronize { prototype.call(env) }
1418
+ end
1419
+
1420
+ private
1421
+ def setup_default_middleware(builder)
1422
+ builder.use ExtendedRack
1423
+ builder.use ShowExceptions if show_exceptions?
1424
+ builder.use Rack::MethodOverride if method_override?
1425
+ builder.use Rack::Head
1426
+ setup_logging builder
1427
+ setup_sessions builder
1428
+ setup_protection builder
1429
+ end
1430
+
1431
+ def setup_middleware(builder)
1432
+ middleware.each { |c,a,b| builder.use(c, *a, &b) }
1433
+ end
1434
+
1435
+ def setup_logging(builder)
1436
+ if logging?
1437
+ setup_common_logger(builder)
1438
+ setup_custom_logger(builder)
1439
+ elsif logging == false
1440
+ setup_null_logger(builder)
1441
+ end
1442
+ end
1443
+
1444
+ def setup_null_logger(builder)
1445
+ builder.use Rack::NullLogger
1446
+ end
1447
+
1448
+ def setup_common_logger(builder)
1449
+ builder.use Sinatra::CommonLogger
1450
+ end
1451
+
1452
+ def setup_custom_logger(builder)
1453
+ if logging.respond_to? :to_int
1454
+ builder.use Rack::Logger, logging
1455
+ else
1456
+ builder.use Rack::Logger
1457
+ end
1458
+ end
1459
+
1460
+ def setup_protection(builder)
1461
+ return unless protection?
1462
+ options = Hash === protection ? protection.dup : {}
1463
+ options[:except] = Array options[:except]
1464
+ options[:except] += [:session_hijacking, :remote_token] unless sessions?
1465
+ options[:reaction] ||= :drop_session
1466
+ builder.use Rack::Protection, options
1467
+ end
1468
+
1469
+ def setup_sessions(builder)
1470
+ return unless sessions?
1471
+ options = {}
1472
+ options[:secret] = session_secret if session_secret?
1473
+ options.merge! sessions.to_hash if sessions.respond_to? :to_hash
1474
+ builder.use Rack::Session::Cookie, options
1475
+ end
1476
+
1477
+ def detect_rack_handler
1478
+ servers = Array(server)
1479
+ servers.each do |server_name|
1480
+ begin
1481
+ return Rack::Handler.get(server_name.to_s)
1482
+ rescue LoadError, NameError
1483
+ end
1484
+ end
1485
+ fail "Server handler (#{servers.join(',')}) not found."
1486
+ end
1487
+
1488
+ def inherited(subclass)
1489
+ subclass.reset!
1490
+ subclass.set :app_file, caller_files.first unless subclass.app_file?
1491
+ super
1492
+ end
1493
+
1494
+ @@mutex = Mutex.new
1495
+ def synchronize(&block)
1496
+ if lock?
1497
+ @@mutex.synchronize(&block)
1498
+ else
1499
+ yield
1500
+ end
1501
+ end
1502
+
1503
+ public
1504
+ CALLERS_TO_IGNORE = [ # :nodoc:
1505
+ /\/sinatra(\/(base|main|showexceptions))?\.rb$/, # all sinatra code
1506
+ /lib\/tilt.*\.rb$/, # all tilt code
1507
+ /^\(.*\)$/, # generated code
1508
+ /rubygems\/(custom|core_ext\/kernel)_require\.rb$/, # rubygems require hacks
1509
+ /active_support/, # active_support require hacks
1510
+ /bundler(\/runtime)?\.rb/, # bundler require hacks
1511
+ /<internal:/, # internal in ruby >= 1.9.2
1512
+ /src\/kernel\/bootstrap\/[A-Z]/ # maglev kernel files
1513
+ ]
1514
+
1515
+ # contrary to what the comment said previously, rubinius never supported this
1516
+ if defined?(RUBY_IGNORE_CALLERS)
1517
+ warn "RUBY_IGNORE_CALLERS is deprecated and will no longer be supported by Sinatra 2.0"
1518
+ CALLERS_TO_IGNORE.concat(RUBY_IGNORE_CALLERS)
1519
+ end
1520
+
1521
+ # Like Kernel#caller but excluding certain magic entries and without
1522
+ # line / method information; the resulting array contains filenames only.
1523
+ def caller_files
1524
+ cleaned_caller(1).flatten
1525
+ end
1526
+
1527
+ # Like caller_files, but containing Arrays rather than strings with the
1528
+ # first element being the file, and the second being the line.
1529
+ def caller_locations
1530
+ cleaned_caller 2
1531
+ end
1532
+
1533
+ private
1534
+ # used for deprecation warnings
1535
+ def warn(message)
1536
+ super message + "\n\tfrom #{cleaned_caller.first.join(':')}"
1537
+ end
1538
+
1539
+ # Like Kernel#caller but excluding certain magic entries
1540
+ def cleaned_caller(keep = 3)
1541
+ caller(1).
1542
+ map { |line| line.split(/:(?=\d|in )/, 3)[0,keep] }.
1543
+ reject { |file, *_| CALLERS_TO_IGNORE.any? { |pattern| file =~ pattern } }
1544
+ end
1545
+ end
1546
+
1547
+ # Fixes encoding issues by
1548
+ # * defaulting to UTF-8
1549
+ # * casting params to Encoding.default_external
1550
+ #
1551
+ # The latter might not be necessary if Rack handles it one day.
1552
+ # Keep an eye on Rack's LH #100.
1553
+ def force_encoding(*args) settings.force_encoding(*args) end
1554
+ if defined? Encoding
1555
+ def self.force_encoding(data, encoding = default_encoding)
1556
+ return if data == settings || data.is_a?(Tempfile)
1557
+ if data.respond_to? :force_encoding
1558
+ data.force_encoding(encoding).encode!
1559
+ elsif data.respond_to? :each_value
1560
+ data.each_value { |v| force_encoding(v, encoding) }
1561
+ elsif data.respond_to? :each
1562
+ data.each { |v| force_encoding(v, encoding) }
1563
+ end
1564
+ data
1565
+ end
1566
+ else
1567
+ def self.force_encoding(data, *) data end
1568
+ end
1569
+
1570
+ reset!
1571
+
1572
+ set :environment, (ENV['RACK_ENV'] || :development).to_sym
1573
+ set :raise_errors, Proc.new { test? }
1574
+ set :dump_errors, Proc.new { !test? }
1575
+ set :show_exceptions, Proc.new { development? }
1576
+ set :sessions, false
1577
+ set :logging, false
1578
+ set :protection, true
1579
+ set :method_override, false
1580
+ set :default_encoding, "utf-8"
1581
+ set :add_charset, %w[javascript xml xhtml+xml json].map { |t| "application/#{t}" }
1582
+ settings.add_charset << /^text\//
1583
+
1584
+ # explicitly generating a session secret eagerly to play nice with preforking
1585
+ begin
1586
+ require 'securerandom'
1587
+ set :session_secret, SecureRandom.hex(64)
1588
+ rescue LoadError, NotImplementedError
1589
+ # SecureRandom raises a NotImplementedError if no random device is available
1590
+ set :session_secret, "%064x" % Kernel.rand(2**256-1)
1591
+ end
1592
+
1593
+ class << self
1594
+ alias_method :methodoverride?, :method_override?
1595
+ alias_method :methodoverride=, :method_override=
1596
+ end
1597
+
1598
+ set :run, false # start server via at-exit hook?
1599
+ set :running, false # is the built-in server running now?
1600
+ set :server, %w[thin mongrel webrick]
1601
+ set :bind, '0.0.0.0'
1602
+ set :port, 4567
1603
+
1604
+ set :absolute_redirects, true
1605
+ set :prefixed_redirects, false
1606
+ set :empty_path_info, nil
1607
+
1608
+ set :app_file, nil
1609
+ set :root, Proc.new { app_file && File.expand_path(File.dirname(app_file)) }
1610
+ set :views, Proc.new { root && File.join(root, 'views') }
1611
+ set :reload_templates, Proc.new { development? }
1612
+ set :lock, false
1613
+ set :threaded, true
1614
+
1615
+ set :public_folder, Proc.new { root && File.join(root, 'public') }
1616
+ set :static, Proc.new { public_folder && File.exist?(public_folder) }
1617
+ set :static_cache_control, false
1618
+
1619
+ error ::Exception do
1620
+ response.status = 500
1621
+ content_type 'text/html'
1622
+ '<h1>Internal Server Error</h1>'
1623
+ end
1624
+
1625
+ configure :development do
1626
+ get '/__sinatra__/:image.png' do
1627
+ filename = File.dirname(__FILE__) + "/images/#{params[:image]}.png"
1628
+ content_type :png
1629
+ send_file filename
1630
+ end
1631
+
1632
+ error NotFound do
1633
+ content_type 'text/html'
1634
+
1635
+ (<<-HTML).gsub(/^ {8}/, '')
1636
+ <!DOCTYPE html>
1637
+ <html>
1638
+ <head>
1639
+ <style type="text/css">
1640
+ body { text-align:center;font-family:helvetica,arial;font-size:22px;
1641
+ color:#888;margin:20px}
1642
+ #c {margin:0 auto;width:500px;text-align:left}
1643
+ </style>
1644
+ </head>
1645
+ <body>
1646
+ <h2>Sinatra doesn&rsquo;t know this ditty.</h2>
1647
+ <img src='#{uri "/__sinatra__/404.png"}'>
1648
+ <div id="c">
1649
+ Try this:
1650
+ <pre>#{request.request_method.downcase} '#{request.path_info}' do\n "Hello World"\nend</pre>
1651
+ </div>
1652
+ </body>
1653
+ </html>
1654
+ HTML
1655
+ end
1656
+ end
1657
+ end
1658
+
1659
+ # Execution context for classic style (top-level) applications. All
1660
+ # DSL methods executed on main are delegated to this class.
1661
+ #
1662
+ # The Application class should not be subclassed, unless you want to
1663
+ # inherit all settings, routes, handlers, and error pages from the
1664
+ # top-level. Subclassing Sinatra::Base is highly recommended for
1665
+ # modular applications.
1666
+ class Application < Base
1667
+ set :logging, Proc.new { ! test? }
1668
+ set :method_override, true
1669
+ set :run, Proc.new { ! test? }
1670
+ set :session_secret, Proc.new { super() unless development? }
1671
+ set :app_file, nil
1672
+
1673
+ def self.register(*extensions, &block) #:nodoc:
1674
+ added_methods = extensions.map {|m| m.public_instance_methods }.flatten
1675
+ Delegator.delegate(*added_methods)
1676
+ super(*extensions, &block)
1677
+ end
1678
+ end
1679
+
1680
+ # Sinatra delegation mixin. Mixing this module into an object causes all
1681
+ # methods to be delegated to the Sinatra::Application class. Used primarily
1682
+ # at the top-level.
1683
+ module Delegator #:nodoc:
1684
+ def self.delegate(*methods)
1685
+ methods.each do |method_name|
1686
+ define_method(method_name) do |*args, &block|
1687
+ return super(*args, &block) if respond_to? method_name
1688
+ Delegator.target.send(method_name, *args, &block)
1689
+ end
1690
+ private method_name
1691
+ end
1692
+ end
1693
+
1694
+ delegate :get, :patch, :put, :post, :delete, :head, :options, :template, :layout,
1695
+ :before, :after, :error, :not_found, :configure, :set, :mime_type,
1696
+ :enable, :disable, :use, :development?, :test?, :production?,
1697
+ :helpers, :settings
1698
+
1699
+ class << self
1700
+ attr_accessor :target
1701
+ end
1702
+
1703
+ self.target = Application
1704
+ end
1705
+
1706
+ # Create a new Sinatra application. The block is evaluated in the new app's
1707
+ # class scope.
1708
+ def self.new(base=Base, options={}, &block)
1709
+ base = Class.new(base)
1710
+ base.class_eval(&block) if block_given?
1711
+ base
1712
+ end
1713
+
1714
+ # Extend the top-level DSL with the modules provided.
1715
+ def self.register(*extensions, &block)
1716
+ Delegator.target.register(*extensions, &block)
1717
+ end
1718
+
1719
+ # Include the helper modules provided in Sinatra's request context.
1720
+ def self.helpers(*extensions, &block)
1721
+ Delegator.target.helpers(*extensions, &block)
1722
+ end
1723
+
1724
+ # Use the middleware for classic applications.
1725
+ def self.use(*args, &block)
1726
+ Delegator.target.use(*args, &block)
1727
+ end
1728
+ end