sprokovuln 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (578) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +8 -0
  3. data/Gemfile +6 -0
  4. data/Gemfile.lock +26 -0
  5. data/README.md +35 -0
  6. data/Rakefile +2 -0
  7. data/bin/console +14 -0
  8. data/bin/setup +8 -0
  9. data/lib/sprokovuln/version.rb +3 -0
  10. data/lib/sprokovuln.rb +5 -0
  11. data/sprokovuln.gemspec +26 -0
  12. data/vendor/ruby/bin/rackup +27 -0
  13. data/vendor/ruby/bin/rake +27 -0
  14. data/vendor/ruby/bin/sprockets +27 -0
  15. data/vendor/ruby/cache/concurrent-ruby-1.0.5.gem +0 -0
  16. data/vendor/ruby/cache/rack-2.0.5.gem +0 -0
  17. data/vendor/ruby/cache/rake-10.5.0.gem +0 -0
  18. data/vendor/ruby/cache/sprockets-3.7.1.gem +0 -0
  19. data/vendor/ruby/gems/concurrent-ruby-1.0.5/CHANGELOG.md +387 -0
  20. data/vendor/ruby/gems/concurrent-ruby-1.0.5/LICENSE.txt +21 -0
  21. data/vendor/ruby/gems/concurrent-ruby-1.0.5/README.md +247 -0
  22. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/agent.rb +587 -0
  23. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/array.rb +39 -0
  24. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/async.rb +445 -0
  25. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atom.rb +222 -0
  26. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/abstract_thread_local_var.rb +66 -0
  27. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/atomic_boolean.rb +122 -0
  28. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/atomic_fixnum.rb +139 -0
  29. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/atomic_reference.rb +51 -0
  30. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/count_down_latch.rb +100 -0
  31. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/cyclic_barrier.rb +128 -0
  32. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/event.rb +109 -0
  33. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/java_count_down_latch.rb +39 -0
  34. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/java_thread_local_var.rb +37 -0
  35. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/mutex_atomic_boolean.rb +60 -0
  36. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/mutex_atomic_fixnum.rb +75 -0
  37. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/mutex_count_down_latch.rb +43 -0
  38. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/mutex_semaphore.rb +115 -0
  39. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/read_write_lock.rb +253 -0
  40. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/reentrant_read_write_lock.rb +377 -0
  41. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/ruby_thread_local_var.rb +161 -0
  42. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/semaphore.rb +145 -0
  43. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/thread_local_var.rb +104 -0
  44. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic_reference/concurrent_update_error.rb +8 -0
  45. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic_reference/direct_update.rb +81 -0
  46. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic_reference/jruby+truffle.rb +2 -0
  47. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic_reference/jruby.rb +16 -0
  48. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic_reference/mutex_atomic.rb +61 -0
  49. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic_reference/numeric_cas_wrapper.rb +28 -0
  50. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic_reference/rbx.rb +22 -0
  51. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic_reference/ruby.rb +32 -0
  52. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atomics.rb +53 -0
  53. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/collection/copy_on_notify_observer_set.rb +107 -0
  54. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/collection/copy_on_write_observer_set.rb +111 -0
  55. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/collection/java_non_concurrent_priority_queue.rb +84 -0
  56. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/collection/map/atomic_reference_map_backend.rb +927 -0
  57. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/collection/map/mri_map_backend.rb +66 -0
  58. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/collection/map/non_concurrent_map_backend.rb +141 -0
  59. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/collection/map/synchronized_map_backend.rb +82 -0
  60. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/collection/non_concurrent_priority_queue.rb +143 -0
  61. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/collection/ruby_non_concurrent_priority_queue.rb +150 -0
  62. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/concern/deprecation.rb +34 -0
  63. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/concern/dereferenceable.rb +73 -0
  64. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/concern/logging.rb +27 -0
  65. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/concern/obligation.rb +220 -0
  66. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/concern/observable.rb +110 -0
  67. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/configuration.rb +188 -0
  68. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/constants.rb +8 -0
  69. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/dataflow.rb +80 -0
  70. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/delay.rb +197 -0
  71. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/edge.rb +26 -0
  72. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/errors.rb +69 -0
  73. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/exchanger.rb +356 -0
  74. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/abstract_executor_service.rb +134 -0
  75. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/cached_thread_pool.rb +62 -0
  76. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/executor_service.rb +185 -0
  77. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/fixed_thread_pool.rb +206 -0
  78. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/immediate_executor.rb +66 -0
  79. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/indirect_immediate_executor.rb +44 -0
  80. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/java_executor_service.rb +100 -0
  81. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/java_single_thread_executor.rb +29 -0
  82. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/java_thread_pool_executor.rb +120 -0
  83. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/ruby_executor_service.rb +78 -0
  84. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/ruby_single_thread_executor.rb +22 -0
  85. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/ruby_thread_pool_executor.rb +362 -0
  86. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/safe_task_executor.rb +35 -0
  87. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/serial_executor_service.rb +34 -0
  88. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/serialized_execution.rb +107 -0
  89. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/serialized_execution_delegator.rb +28 -0
  90. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/simple_executor_service.rb +100 -0
  91. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/single_thread_executor.rb +56 -0
  92. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/thread_pool_executor.rb +87 -0
  93. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/timer_set.rb +175 -0
  94. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/executors.rb +20 -0
  95. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/future.rb +138 -0
  96. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/hash.rb +36 -0
  97. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/immutable_struct.rb +93 -0
  98. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/ivar.rb +208 -0
  99. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/lazy_register.rb +81 -0
  100. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/map.rb +240 -0
  101. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/maybe.rb +229 -0
  102. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/mutable_struct.rb +228 -0
  103. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/mvar.rb +242 -0
  104. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/options.rb +42 -0
  105. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/promise.rb +547 -0
  106. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/scheduled_task.rb +318 -0
  107. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/settable_struct.rb +128 -0
  108. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/abstract_lockable_object.rb +98 -0
  109. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/abstract_object.rb +24 -0
  110. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/abstract_struct.rb +157 -0
  111. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/condition.rb +58 -0
  112. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/jruby_lockable_object.rb +13 -0
  113. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/jruby_object.rb +44 -0
  114. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/lock.rb +34 -0
  115. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/lockable_object.rb +74 -0
  116. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/mri_lockable_object.rb +71 -0
  117. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/mri_object.rb +43 -0
  118. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/object.rb +153 -0
  119. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/rbx_lockable_object.rb +65 -0
  120. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/rbx_object.rb +48 -0
  121. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/truffle_lockable_object.rb +9 -0
  122. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/truffle_object.rb +31 -0
  123. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/volatile.rb +34 -0
  124. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization.rb +31 -0
  125. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/thread_safe/synchronized_delegator.rb +50 -0
  126. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/thread_safe/util/adder.rb +74 -0
  127. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/thread_safe/util/array_hash_rbx.rb +30 -0
  128. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/thread_safe/util/cheap_lockable.rb +118 -0
  129. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/thread_safe/util/power_of_two_tuple.rb +38 -0
  130. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/thread_safe/util/striped64.rb +241 -0
  131. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/thread_safe/util/volatile.rb +75 -0
  132. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/thread_safe/util/xor_shift_random.rb +50 -0
  133. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/thread_safe/util.rb +16 -0
  134. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/timer_task.rb +331 -0
  135. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/tuple.rb +86 -0
  136. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/tvar.rb +258 -0
  137. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/utility/at_exit.rb +97 -0
  138. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/utility/engine.rb +56 -0
  139. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/utility/monotonic_time.rb +58 -0
  140. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/utility/native_extension_loader.rb +73 -0
  141. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/utility/native_integer.rb +53 -0
  142. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/utility/processor_counter.rb +160 -0
  143. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/version.rb +4 -0
  144. data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent.rb +130 -0
  145. data/vendor/ruby/gems/rack-2.0.5/COPYING +18 -0
  146. data/vendor/ruby/gems/rack-2.0.5/HISTORY.md +505 -0
  147. data/vendor/ruby/gems/rack-2.0.5/README.rdoc +302 -0
  148. data/vendor/ruby/gems/rack-2.0.5/Rakefile +116 -0
  149. data/vendor/ruby/gems/rack-2.0.5/SPEC +263 -0
  150. data/vendor/ruby/gems/rack-2.0.5/bin/rackup +4 -0
  151. data/vendor/ruby/gems/rack-2.0.5/contrib/rack.png +0 -0
  152. data/vendor/ruby/gems/rack-2.0.5/contrib/rack.svg +150 -0
  153. data/vendor/ruby/gems/rack-2.0.5/contrib/rack_logo.svg +164 -0
  154. data/vendor/ruby/gems/rack-2.0.5/contrib/rdoc.css +412 -0
  155. data/vendor/ruby/gems/rack-2.0.5/example/lobster.ru +4 -0
  156. data/vendor/ruby/gems/rack-2.0.5/example/protectedlobster.rb +14 -0
  157. data/vendor/ruby/gems/rack-2.0.5/example/protectedlobster.ru +8 -0
  158. data/vendor/ruby/gems/rack-2.0.5/lib/rack/auth/abstract/handler.rb +37 -0
  159. data/vendor/ruby/gems/rack-2.0.5/lib/rack/auth/abstract/request.rb +47 -0
  160. data/vendor/ruby/gems/rack-2.0.5/lib/rack/auth/basic.rb +58 -0
  161. data/vendor/ruby/gems/rack-2.0.5/lib/rack/auth/digest/md5.rb +129 -0
  162. data/vendor/ruby/gems/rack-2.0.5/lib/rack/auth/digest/nonce.rb +51 -0
  163. data/vendor/ruby/gems/rack-2.0.5/lib/rack/auth/digest/params.rb +52 -0
  164. data/vendor/ruby/gems/rack-2.0.5/lib/rack/auth/digest/request.rb +41 -0
  165. data/vendor/ruby/gems/rack-2.0.5/lib/rack/body_proxy.rb +44 -0
  166. data/vendor/ruby/gems/rack-2.0.5/lib/rack/builder.rb +164 -0
  167. data/vendor/ruby/gems/rack-2.0.5/lib/rack/cascade.rb +52 -0
  168. data/vendor/ruby/gems/rack-2.0.5/lib/rack/chunked.rb +69 -0
  169. data/vendor/ruby/gems/rack-2.0.5/lib/rack/common_logger.rb +72 -0
  170. data/vendor/ruby/gems/rack-2.0.5/lib/rack/conditional_get.rb +79 -0
  171. data/vendor/ruby/gems/rack-2.0.5/lib/rack/config.rb +20 -0
  172. data/vendor/ruby/gems/rack-2.0.5/lib/rack/content_length.rb +37 -0
  173. data/vendor/ruby/gems/rack-2.0.5/lib/rack/content_type.rb +29 -0
  174. data/vendor/ruby/gems/rack-2.0.5/lib/rack/deflater.rb +119 -0
  175. data/vendor/ruby/gems/rack-2.0.5/lib/rack/directory.rb +179 -0
  176. data/vendor/ruby/gems/rack-2.0.5/lib/rack/etag.rb +74 -0
  177. data/vendor/ruby/gems/rack-2.0.5/lib/rack/events.rb +154 -0
  178. data/vendor/ruby/gems/rack-2.0.5/lib/rack/file.rb +176 -0
  179. data/vendor/ruby/gems/rack-2.0.5/lib/rack/handler/cgi.rb +60 -0
  180. data/vendor/ruby/gems/rack-2.0.5/lib/rack/handler/fastcgi.rb +100 -0
  181. data/vendor/ruby/gems/rack-2.0.5/lib/rack/handler/lsws.rb +61 -0
  182. data/vendor/ruby/gems/rack-2.0.5/lib/rack/handler/scgi.rb +70 -0
  183. data/vendor/ruby/gems/rack-2.0.5/lib/rack/handler/thin.rb +36 -0
  184. data/vendor/ruby/gems/rack-2.0.5/lib/rack/handler/webrick.rb +120 -0
  185. data/vendor/ruby/gems/rack-2.0.5/lib/rack/handler.rb +99 -0
  186. data/vendor/ruby/gems/rack-2.0.5/lib/rack/head.rb +25 -0
  187. data/vendor/ruby/gems/rack-2.0.5/lib/rack/lint.rb +760 -0
  188. data/vendor/ruby/gems/rack-2.0.5/lib/rack/lobster.rb +70 -0
  189. data/vendor/ruby/gems/rack-2.0.5/lib/rack/lock.rb +31 -0
  190. data/vendor/ruby/gems/rack-2.0.5/lib/rack/logger.rb +18 -0
  191. data/vendor/ruby/gems/rack-2.0.5/lib/rack/media_type.rb +38 -0
  192. data/vendor/ruby/gems/rack-2.0.5/lib/rack/method_override.rb +50 -0
  193. data/vendor/ruby/gems/rack-2.0.5/lib/rack/mime.rb +677 -0
  194. data/vendor/ruby/gems/rack-2.0.5/lib/rack/mock.rb +196 -0
  195. data/vendor/ruby/gems/rack-2.0.5/lib/rack/multipart/generator.rb +93 -0
  196. data/vendor/ruby/gems/rack-2.0.5/lib/rack/multipart/parser.rb +369 -0
  197. data/vendor/ruby/gems/rack-2.0.5/lib/rack/multipart/uploaded_file.rb +33 -0
  198. data/vendor/ruby/gems/rack-2.0.5/lib/rack/multipart.rb +63 -0
  199. data/vendor/ruby/gems/rack-2.0.5/lib/rack/null_logger.rb +37 -0
  200. data/vendor/ruby/gems/rack-2.0.5/lib/rack/query_parser.rb +192 -0
  201. data/vendor/ruby/gems/rack-2.0.5/lib/rack/recursive.rb +62 -0
  202. data/vendor/ruby/gems/rack-2.0.5/lib/rack/reloader.rb +110 -0
  203. data/vendor/ruby/gems/rack-2.0.5/lib/rack/request.rb +487 -0
  204. data/vendor/ruby/gems/rack-2.0.5/lib/rack/response.rb +235 -0
  205. data/vendor/ruby/gems/rack-2.0.5/lib/rack/rewindable_input.rb +93 -0
  206. data/vendor/ruby/gems/rack-2.0.5/lib/rack/runtime.rb +32 -0
  207. data/vendor/ruby/gems/rack-2.0.5/lib/rack/sendfile.rb +158 -0
  208. data/vendor/ruby/gems/rack-2.0.5/lib/rack/server.rb +395 -0
  209. data/vendor/ruby/gems/rack-2.0.5/lib/rack/session/abstract/id.rb +445 -0
  210. data/vendor/ruby/gems/rack-2.0.5/lib/rack/session/cookie.rb +195 -0
  211. data/vendor/ruby/gems/rack-2.0.5/lib/rack/session/memcache.rb +93 -0
  212. data/vendor/ruby/gems/rack-2.0.5/lib/rack/session/pool.rb +76 -0
  213. data/vendor/ruby/gems/rack-2.0.5/lib/rack/show_exceptions.rb +386 -0
  214. data/vendor/ruby/gems/rack-2.0.5/lib/rack/show_status.rb +113 -0
  215. data/vendor/ruby/gems/rack-2.0.5/lib/rack/static.rb +175 -0
  216. data/vendor/ruby/gems/rack-2.0.5/lib/rack/tempfile_reaper.rb +22 -0
  217. data/vendor/ruby/gems/rack-2.0.5/lib/rack/urlmap.rb +91 -0
  218. data/vendor/ruby/gems/rack-2.0.5/lib/rack/utils.rb +620 -0
  219. data/vendor/ruby/gems/rack-2.0.5/lib/rack.rb +147 -0
  220. data/vendor/ruby/gems/rack-2.0.5/rack.gemspec +34 -0
  221. data/vendor/ruby/gems/rack-2.0.5/test/builder/an_underscore_app.rb +5 -0
  222. data/vendor/ruby/gems/rack-2.0.5/test/builder/anything.rb +5 -0
  223. data/vendor/ruby/gems/rack-2.0.5/test/builder/comment.ru +4 -0
  224. data/vendor/ruby/gems/rack-2.0.5/test/builder/end.ru +5 -0
  225. data/vendor/ruby/gems/rack-2.0.5/test/builder/line.ru +1 -0
  226. data/vendor/ruby/gems/rack-2.0.5/test/builder/options.ru +2 -0
  227. data/vendor/ruby/gems/rack-2.0.5/test/cgi/assets/folder/test.js +1 -0
  228. data/vendor/ruby/gems/rack-2.0.5/test/cgi/assets/fonts/font.eot +1 -0
  229. data/vendor/ruby/gems/rack-2.0.5/test/cgi/assets/images/image.png +1 -0
  230. data/vendor/ruby/gems/rack-2.0.5/test/cgi/assets/index.html +1 -0
  231. data/vendor/ruby/gems/rack-2.0.5/test/cgi/assets/javascripts/app.js +1 -0
  232. data/vendor/ruby/gems/rack-2.0.5/test/cgi/assets/stylesheets/app.css +1 -0
  233. data/vendor/ruby/gems/rack-2.0.5/test/cgi/lighttpd.conf +26 -0
  234. data/vendor/ruby/gems/rack-2.0.5/test/cgi/rackup_stub.rb +6 -0
  235. data/vendor/ruby/gems/rack-2.0.5/test/cgi/sample_rackup.ru +5 -0
  236. data/vendor/ruby/gems/rack-2.0.5/test/cgi/test +9 -0
  237. data/vendor/ruby/gems/rack-2.0.5/test/cgi/test+directory/test+file +1 -0
  238. data/vendor/ruby/gems/rack-2.0.5/test/cgi/test.fcgi +9 -0
  239. data/vendor/ruby/gems/rack-2.0.5/test/cgi/test.gz +0 -0
  240. data/vendor/ruby/gems/rack-2.0.5/test/cgi/test.ru +5 -0
  241. data/vendor/ruby/gems/rack-2.0.5/test/gemloader.rb +10 -0
  242. data/vendor/ruby/gems/rack-2.0.5/test/helper.rb +34 -0
  243. data/vendor/ruby/gems/rack-2.0.5/test/multipart/bad_robots +259 -0
  244. data/vendor/ruby/gems/rack-2.0.5/test/multipart/binary +0 -0
  245. data/vendor/ruby/gems/rack-2.0.5/test/multipart/content_type_and_no_filename +6 -0
  246. data/vendor/ruby/gems/rack-2.0.5/test/multipart/empty +10 -0
  247. data/vendor/ruby/gems/rack-2.0.5/test/multipart/fail_16384_nofile +814 -0
  248. data/vendor/ruby/gems/rack-2.0.5/test/multipart/file1.txt +1 -0
  249. data/vendor/ruby/gems/rack-2.0.5/test/multipart/filename_and_modification_param +7 -0
  250. data/vendor/ruby/gems/rack-2.0.5/test/multipart/filename_and_no_name +6 -0
  251. data/vendor/ruby/gems/rack-2.0.5/test/multipart/filename_with_encoded_words +7 -0
  252. data/vendor/ruby/gems/rack-2.0.5/test/multipart/filename_with_escaped_quotes +6 -0
  253. data/vendor/ruby/gems/rack-2.0.5/test/multipart/filename_with_escaped_quotes_and_modification_param +7 -0
  254. data/vendor/ruby/gems/rack-2.0.5/test/multipart/filename_with_null_byte +7 -0
  255. data/vendor/ruby/gems/rack-2.0.5/test/multipart/filename_with_percent_escaped_quotes +6 -0
  256. data/vendor/ruby/gems/rack-2.0.5/test/multipart/filename_with_single_quote +7 -0
  257. data/vendor/ruby/gems/rack-2.0.5/test/multipart/filename_with_unescaped_percentages +6 -0
  258. data/vendor/ruby/gems/rack-2.0.5/test/multipart/filename_with_unescaped_percentages2 +6 -0
  259. data/vendor/ruby/gems/rack-2.0.5/test/multipart/filename_with_unescaped_percentages3 +6 -0
  260. data/vendor/ruby/gems/rack-2.0.5/test/multipart/filename_with_unescaped_quotes +6 -0
  261. data/vendor/ruby/gems/rack-2.0.5/test/multipart/ie +6 -0
  262. data/vendor/ruby/gems/rack-2.0.5/test/multipart/invalid_character +6 -0
  263. data/vendor/ruby/gems/rack-2.0.5/test/multipart/mixed_files +21 -0
  264. data/vendor/ruby/gems/rack-2.0.5/test/multipart/nested +10 -0
  265. data/vendor/ruby/gems/rack-2.0.5/test/multipart/none +9 -0
  266. data/vendor/ruby/gems/rack-2.0.5/test/multipart/quoted +15 -0
  267. data/vendor/ruby/gems/rack-2.0.5/test/multipart/rack-logo.png +0 -0
  268. data/vendor/ruby/gems/rack-2.0.5/test/multipart/semicolon +6 -0
  269. data/vendor/ruby/gems/rack-2.0.5/test/multipart/text +15 -0
  270. data/vendor/ruby/gems/rack-2.0.5/test/multipart/three_files_three_fields +31 -0
  271. data/vendor/ruby/gems/rack-2.0.5/test/multipart/unity3d_wwwform +11 -0
  272. data/vendor/ruby/gems/rack-2.0.5/test/multipart/webkit +32 -0
  273. data/vendor/ruby/gems/rack-2.0.5/test/rackup/config.ru +31 -0
  274. data/vendor/ruby/gems/rack-2.0.5/test/registering_handler/rack/handler/registering_myself.rb +8 -0
  275. data/vendor/ruby/gems/rack-2.0.5/test/spec_auth_basic.rb +89 -0
  276. data/vendor/ruby/gems/rack-2.0.5/test/spec_auth_digest.rb +260 -0
  277. data/vendor/ruby/gems/rack-2.0.5/test/spec_body_proxy.rb +85 -0
  278. data/vendor/ruby/gems/rack-2.0.5/test/spec_builder.rb +233 -0
  279. data/vendor/ruby/gems/rack-2.0.5/test/spec_cascade.rb +63 -0
  280. data/vendor/ruby/gems/rack-2.0.5/test/spec_cgi.rb +84 -0
  281. data/vendor/ruby/gems/rack-2.0.5/test/spec_chunked.rb +103 -0
  282. data/vendor/ruby/gems/rack-2.0.5/test/spec_common_logger.rb +95 -0
  283. data/vendor/ruby/gems/rack-2.0.5/test/spec_conditional_get.rb +103 -0
  284. data/vendor/ruby/gems/rack-2.0.5/test/spec_config.rb +23 -0
  285. data/vendor/ruby/gems/rack-2.0.5/test/spec_content_length.rb +86 -0
  286. data/vendor/ruby/gems/rack-2.0.5/test/spec_content_type.rb +46 -0
  287. data/vendor/ruby/gems/rack-2.0.5/test/spec_deflater.rb +375 -0
  288. data/vendor/ruby/gems/rack-2.0.5/test/spec_directory.rb +148 -0
  289. data/vendor/ruby/gems/rack-2.0.5/test/spec_etag.rb +108 -0
  290. data/vendor/ruby/gems/rack-2.0.5/test/spec_events.rb +133 -0
  291. data/vendor/ruby/gems/rack-2.0.5/test/spec_fastcgi.rb +85 -0
  292. data/vendor/ruby/gems/rack-2.0.5/test/spec_file.rb +264 -0
  293. data/vendor/ruby/gems/rack-2.0.5/test/spec_handler.rb +57 -0
  294. data/vendor/ruby/gems/rack-2.0.5/test/spec_head.rb +46 -0
  295. data/vendor/ruby/gems/rack-2.0.5/test/spec_lint.rb +515 -0
  296. data/vendor/ruby/gems/rack-2.0.5/test/spec_lobster.rb +59 -0
  297. data/vendor/ruby/gems/rack-2.0.5/test/spec_lock.rb +204 -0
  298. data/vendor/ruby/gems/rack-2.0.5/test/spec_logger.rb +24 -0
  299. data/vendor/ruby/gems/rack-2.0.5/test/spec_media_type.rb +42 -0
  300. data/vendor/ruby/gems/rack-2.0.5/test/spec_method_override.rb +110 -0
  301. data/vendor/ruby/gems/rack-2.0.5/test/spec_mime.rb +51 -0
  302. data/vendor/ruby/gems/rack-2.0.5/test/spec_mock.rb +359 -0
  303. data/vendor/ruby/gems/rack-2.0.5/test/spec_multipart.rb +722 -0
  304. data/vendor/ruby/gems/rack-2.0.5/test/spec_null_logger.rb +21 -0
  305. data/vendor/ruby/gems/rack-2.0.5/test/spec_recursive.rb +75 -0
  306. data/vendor/ruby/gems/rack-2.0.5/test/spec_request.rb +1393 -0
  307. data/vendor/ruby/gems/rack-2.0.5/test/spec_response.rb +510 -0
  308. data/vendor/ruby/gems/rack-2.0.5/test/spec_rewindable_input.rb +128 -0
  309. data/vendor/ruby/gems/rack-2.0.5/test/spec_runtime.rb +50 -0
  310. data/vendor/ruby/gems/rack-2.0.5/test/spec_sendfile.rb +125 -0
  311. data/vendor/ruby/gems/rack-2.0.5/test/spec_server.rb +193 -0
  312. data/vendor/ruby/gems/rack-2.0.5/test/spec_session_abstract_id.rb +31 -0
  313. data/vendor/ruby/gems/rack-2.0.5/test/spec_session_abstract_session_hash.rb +45 -0
  314. data/vendor/ruby/gems/rack-2.0.5/test/spec_session_cookie.rb +442 -0
  315. data/vendor/ruby/gems/rack-2.0.5/test/spec_session_memcache.rb +320 -0
  316. data/vendor/ruby/gems/rack-2.0.5/test/spec_session_pool.rb +210 -0
  317. data/vendor/ruby/gems/rack-2.0.5/test/spec_show_exceptions.rb +80 -0
  318. data/vendor/ruby/gems/rack-2.0.5/test/spec_show_status.rb +104 -0
  319. data/vendor/ruby/gems/rack-2.0.5/test/spec_static.rb +184 -0
  320. data/vendor/ruby/gems/rack-2.0.5/test/spec_tempfile_reaper.rb +64 -0
  321. data/vendor/ruby/gems/rack-2.0.5/test/spec_thin.rb +96 -0
  322. data/vendor/ruby/gems/rack-2.0.5/test/spec_urlmap.rb +237 -0
  323. data/vendor/ruby/gems/rack-2.0.5/test/spec_utils.rb +742 -0
  324. data/vendor/ruby/gems/rack-2.0.5/test/spec_version.rb +11 -0
  325. data/vendor/ruby/gems/rack-2.0.5/test/spec_webrick.rb +206 -0
  326. data/vendor/ruby/gems/rack-2.0.5/test/static/another/index.html +1 -0
  327. data/vendor/ruby/gems/rack-2.0.5/test/static/foo.html +1 -0
  328. data/vendor/ruby/gems/rack-2.0.5/test/static/index.html +1 -0
  329. data/vendor/ruby/gems/rack-2.0.5/test/testrequest.rb +78 -0
  330. data/vendor/ruby/gems/rack-2.0.5/test/unregistered_handler/rack/handler/unregistered.rb +7 -0
  331. data/vendor/ruby/gems/rack-2.0.5/test/unregistered_handler/rack/handler/unregistered_long_one.rb +7 -0
  332. data/vendor/ruby/gems/rake-10.5.0/.autotest +7 -0
  333. data/vendor/ruby/gems/rake-10.5.0/.rubocop.yml +27 -0
  334. data/vendor/ruby/gems/rake-10.5.0/.togglerc +7 -0
  335. data/vendor/ruby/gems/rake-10.5.0/CONTRIBUTING.rdoc +38 -0
  336. data/vendor/ruby/gems/rake-10.5.0/History.rdoc +659 -0
  337. data/vendor/ruby/gems/rake-10.5.0/MIT-LICENSE +21 -0
  338. data/vendor/ruby/gems/rake-10.5.0/Manifest.txt +166 -0
  339. data/vendor/ruby/gems/rake-10.5.0/README.rdoc +139 -0
  340. data/vendor/ruby/gems/rake-10.5.0/Rakefile +81 -0
  341. data/vendor/ruby/gems/rake-10.5.0/bin/rake +33 -0
  342. data/vendor/ruby/gems/rake-10.5.0/doc/command_line_usage.rdoc +158 -0
  343. data/vendor/ruby/gems/rake-10.5.0/doc/example/Rakefile1 +38 -0
  344. data/vendor/ruby/gems/rake-10.5.0/doc/example/Rakefile2 +35 -0
  345. data/vendor/ruby/gems/rake-10.5.0/doc/example/a.c +6 -0
  346. data/vendor/ruby/gems/rake-10.5.0/doc/example/b.c +6 -0
  347. data/vendor/ruby/gems/rake-10.5.0/doc/example/main.c +11 -0
  348. data/vendor/ruby/gems/rake-10.5.0/doc/glossary.rdoc +42 -0
  349. data/vendor/ruby/gems/rake-10.5.0/doc/jamis.rb +591 -0
  350. data/vendor/ruby/gems/rake-10.5.0/doc/proto_rake.rdoc +127 -0
  351. data/vendor/ruby/gems/rake-10.5.0/doc/rake.1 +141 -0
  352. data/vendor/ruby/gems/rake-10.5.0/doc/rakefile.rdoc +624 -0
  353. data/vendor/ruby/gems/rake-10.5.0/doc/rational.rdoc +151 -0
  354. data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-0.4.14.rdoc +23 -0
  355. data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-0.4.15.rdoc +35 -0
  356. data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-0.5.0.rdoc +53 -0
  357. data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-0.5.3.rdoc +78 -0
  358. data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-0.5.4.rdoc +46 -0
  359. data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-0.6.0.rdoc +141 -0
  360. data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-0.7.0.rdoc +119 -0
  361. data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-0.7.1.rdoc +59 -0
  362. data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-0.7.2.rdoc +121 -0
  363. data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-0.7.3.rdoc +47 -0
  364. data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-0.8.0.rdoc +114 -0
  365. data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-0.8.2.rdoc +165 -0
  366. data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-0.8.3.rdoc +112 -0
  367. data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-0.8.4.rdoc +147 -0
  368. data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-0.8.5.rdoc +53 -0
  369. data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-0.8.6.rdoc +37 -0
  370. data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-0.8.7.rdoc +55 -0
  371. data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-0.9.0.rdoc +112 -0
  372. data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-0.9.1.rdoc +52 -0
  373. data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-0.9.2.2.rdoc +55 -0
  374. data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-0.9.2.rdoc +49 -0
  375. data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-0.9.3.rdoc +102 -0
  376. data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-0.9.4.rdoc +60 -0
  377. data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-0.9.5.rdoc +55 -0
  378. data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-0.9.6.rdoc +64 -0
  379. data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-10.0.0.rdoc +178 -0
  380. data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-10.0.1.rdoc +58 -0
  381. data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-10.0.2.rdoc +53 -0
  382. data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-10.0.3.rdoc +191 -0
  383. data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-10.1.0.rdoc +61 -0
  384. data/vendor/ruby/gems/rake-10.5.0/lib/rake/alt_system.rb +110 -0
  385. data/vendor/ruby/gems/rake-10.5.0/lib/rake/application.rb +790 -0
  386. data/vendor/ruby/gems/rake-10.5.0/lib/rake/backtrace.rb +23 -0
  387. data/vendor/ruby/gems/rake-10.5.0/lib/rake/clean.rb +76 -0
  388. data/vendor/ruby/gems/rake-10.5.0/lib/rake/cloneable.rb +16 -0
  389. data/vendor/ruby/gems/rake-10.5.0/lib/rake/contrib/.document +1 -0
  390. data/vendor/ruby/gems/rake-10.5.0/lib/rake/contrib/compositepublisher.rb +21 -0
  391. data/vendor/ruby/gems/rake-10.5.0/lib/rake/contrib/ftptools.rb +137 -0
  392. data/vendor/ruby/gems/rake-10.5.0/lib/rake/contrib/publisher.rb +81 -0
  393. data/vendor/ruby/gems/rake-10.5.0/lib/rake/contrib/rubyforgepublisher.rb +18 -0
  394. data/vendor/ruby/gems/rake-10.5.0/lib/rake/contrib/sshpublisher.rb +61 -0
  395. data/vendor/ruby/gems/rake-10.5.0/lib/rake/contrib/sys.rb +4 -0
  396. data/vendor/ruby/gems/rake-10.5.0/lib/rake/cpu_counter.rb +125 -0
  397. data/vendor/ruby/gems/rake-10.5.0/lib/rake/default_loader.rb +14 -0
  398. data/vendor/ruby/gems/rake-10.5.0/lib/rake/dsl_definition.rb +201 -0
  399. data/vendor/ruby/gems/rake-10.5.0/lib/rake/early_time.rb +21 -0
  400. data/vendor/ruby/gems/rake-10.5.0/lib/rake/ext/core.rb +25 -0
  401. data/vendor/ruby/gems/rake-10.5.0/lib/rake/ext/module.rb +2 -0
  402. data/vendor/ruby/gems/rake-10.5.0/lib/rake/ext/pathname.rb +25 -0
  403. data/vendor/ruby/gems/rake-10.5.0/lib/rake/ext/string.rb +175 -0
  404. data/vendor/ruby/gems/rake-10.5.0/lib/rake/ext/time.rb +18 -0
  405. data/vendor/ruby/gems/rake-10.5.0/lib/rake/file_creation_task.rb +24 -0
  406. data/vendor/ruby/gems/rake-10.5.0/lib/rake/file_list.rb +428 -0
  407. data/vendor/ruby/gems/rake-10.5.0/lib/rake/file_task.rb +46 -0
  408. data/vendor/ruby/gems/rake-10.5.0/lib/rake/file_utils.rb +128 -0
  409. data/vendor/ruby/gems/rake-10.5.0/lib/rake/file_utils_ext.rb +144 -0
  410. data/vendor/ruby/gems/rake-10.5.0/lib/rake/gempackagetask.rb +4 -0
  411. data/vendor/ruby/gems/rake-10.5.0/lib/rake/invocation_chain.rb +56 -0
  412. data/vendor/ruby/gems/rake-10.5.0/lib/rake/invocation_exception_mixin.rb +16 -0
  413. data/vendor/ruby/gems/rake-10.5.0/lib/rake/late_time.rb +17 -0
  414. data/vendor/ruby/gems/rake-10.5.0/lib/rake/linked_list.rb +103 -0
  415. data/vendor/ruby/gems/rake-10.5.0/lib/rake/loaders/makefile.rb +53 -0
  416. data/vendor/ruby/gems/rake-10.5.0/lib/rake/multi_task.rb +13 -0
  417. data/vendor/ruby/gems/rake-10.5.0/lib/rake/name_space.rb +38 -0
  418. data/vendor/ruby/gems/rake-10.5.0/lib/rake/packagetask.rb +199 -0
  419. data/vendor/ruby/gems/rake-10.5.0/lib/rake/pathmap.rb +3 -0
  420. data/vendor/ruby/gems/rake-10.5.0/lib/rake/phony.rb +15 -0
  421. data/vendor/ruby/gems/rake-10.5.0/lib/rake/private_reader.rb +20 -0
  422. data/vendor/ruby/gems/rake-10.5.0/lib/rake/promise.rb +99 -0
  423. data/vendor/ruby/gems/rake-10.5.0/lib/rake/pseudo_status.rb +29 -0
  424. data/vendor/ruby/gems/rake-10.5.0/lib/rake/rake_module.rb +38 -0
  425. data/vendor/ruby/gems/rake-10.5.0/lib/rake/rake_test_loader.rb +22 -0
  426. data/vendor/ruby/gems/rake-10.5.0/lib/rake/rdoctask.rb +4 -0
  427. data/vendor/ruby/gems/rake-10.5.0/lib/rake/ruby182_test_unit_fix.rb +29 -0
  428. data/vendor/ruby/gems/rake-10.5.0/lib/rake/rule_recursion_overflow_error.rb +20 -0
  429. data/vendor/ruby/gems/rake-10.5.0/lib/rake/runtest.rb +27 -0
  430. data/vendor/ruby/gems/rake-10.5.0/lib/rake/scope.rb +42 -0
  431. data/vendor/ruby/gems/rake-10.5.0/lib/rake/task.rb +383 -0
  432. data/vendor/ruby/gems/rake-10.5.0/lib/rake/task_argument_error.rb +7 -0
  433. data/vendor/ruby/gems/rake-10.5.0/lib/rake/task_arguments.rb +98 -0
  434. data/vendor/ruby/gems/rake-10.5.0/lib/rake/task_manager.rb +307 -0
  435. data/vendor/ruby/gems/rake-10.5.0/lib/rake/tasklib.rb +24 -0
  436. data/vendor/ruby/gems/rake-10.5.0/lib/rake/testtask.rb +213 -0
  437. data/vendor/ruby/gems/rake-10.5.0/lib/rake/thread_history_display.rb +48 -0
  438. data/vendor/ruby/gems/rake-10.5.0/lib/rake/thread_pool.rb +164 -0
  439. data/vendor/ruby/gems/rake-10.5.0/lib/rake/trace_output.rb +22 -0
  440. data/vendor/ruby/gems/rake-10.5.0/lib/rake/version.rb +7 -0
  441. data/vendor/ruby/gems/rake-10.5.0/lib/rake/win32.rb +56 -0
  442. data/vendor/ruby/gems/rake-10.5.0/lib/rake.rb +79 -0
  443. data/vendor/ruby/gems/rake-10.5.0/rakelib/publish.rake +20 -0
  444. data/vendor/ruby/gems/rake-10.5.0/rakelib/test_times.rake +25 -0
  445. data/vendor/ruby/gems/rake-10.5.0/test/file_creation.rb +34 -0
  446. data/vendor/ruby/gems/rake-10.5.0/test/helper.rb +129 -0
  447. data/vendor/ruby/gems/rake-10.5.0/test/support/rakefile_definitions.rb +478 -0
  448. data/vendor/ruby/gems/rake-10.5.0/test/support/ruby_runner.rb +34 -0
  449. data/vendor/ruby/gems/rake-10.5.0/test/test_private_reader.rb +42 -0
  450. data/vendor/ruby/gems/rake-10.5.0/test/test_rake.rb +40 -0
  451. data/vendor/ruby/gems/rake-10.5.0/test/test_rake_application.rb +643 -0
  452. data/vendor/ruby/gems/rake-10.5.0/test/test_rake_application_options.rb +468 -0
  453. data/vendor/ruby/gems/rake-10.5.0/test/test_rake_backtrace.rb +119 -0
  454. data/vendor/ruby/gems/rake-10.5.0/test/test_rake_clean.rb +61 -0
  455. data/vendor/ruby/gems/rake-10.5.0/test/test_rake_cpu_counter.rb +68 -0
  456. data/vendor/ruby/gems/rake-10.5.0/test/test_rake_definitions.rb +84 -0
  457. data/vendor/ruby/gems/rake-10.5.0/test/test_rake_directory_task.rb +76 -0
  458. data/vendor/ruby/gems/rake-10.5.0/test/test_rake_dsl.rb +40 -0
  459. data/vendor/ruby/gems/rake-10.5.0/test/test_rake_early_time.rb +31 -0
  460. data/vendor/ruby/gems/rake-10.5.0/test/test_rake_extension.rb +59 -0
  461. data/vendor/ruby/gems/rake-10.5.0/test/test_rake_file_creation_task.rb +56 -0
  462. data/vendor/ruby/gems/rake-10.5.0/test/test_rake_file_list.rb +670 -0
  463. data/vendor/ruby/gems/rake-10.5.0/test/test_rake_file_list_path_map.rb +8 -0
  464. data/vendor/ruby/gems/rake-10.5.0/test/test_rake_file_task.rb +197 -0
  465. data/vendor/ruby/gems/rake-10.5.0/test/test_rake_file_utils.rb +314 -0
  466. data/vendor/ruby/gems/rake-10.5.0/test/test_rake_ftp_file.rb +74 -0
  467. data/vendor/ruby/gems/rake-10.5.0/test/test_rake_functional.rb +482 -0
  468. data/vendor/ruby/gems/rake-10.5.0/test/test_rake_invocation_chain.rb +64 -0
  469. data/vendor/ruby/gems/rake-10.5.0/test/test_rake_late_time.rb +18 -0
  470. data/vendor/ruby/gems/rake-10.5.0/test/test_rake_linked_list.rb +84 -0
  471. data/vendor/ruby/gems/rake-10.5.0/test/test_rake_makefile_loader.rb +46 -0
  472. data/vendor/ruby/gems/rake-10.5.0/test/test_rake_multi_task.rb +64 -0
  473. data/vendor/ruby/gems/rake-10.5.0/test/test_rake_name_space.rb +57 -0
  474. data/vendor/ruby/gems/rake-10.5.0/test/test_rake_package_task.rb +79 -0
  475. data/vendor/ruby/gems/rake-10.5.0/test/test_rake_path_map.rb +168 -0
  476. data/vendor/ruby/gems/rake-10.5.0/test/test_rake_path_map_explode.rb +34 -0
  477. data/vendor/ruby/gems/rake-10.5.0/test/test_rake_path_map_partial.rb +18 -0
  478. data/vendor/ruby/gems/rake-10.5.0/test/test_rake_pathname_extensions.rb +15 -0
  479. data/vendor/ruby/gems/rake-10.5.0/test/test_rake_pseudo_status.rb +21 -0
  480. data/vendor/ruby/gems/rake-10.5.0/test/test_rake_rake_test_loader.rb +20 -0
  481. data/vendor/ruby/gems/rake-10.5.0/test/test_rake_reduce_compat.rb +26 -0
  482. data/vendor/ruby/gems/rake-10.5.0/test/test_rake_require.rb +40 -0
  483. data/vendor/ruby/gems/rake-10.5.0/test/test_rake_rules.rb +388 -0
  484. data/vendor/ruby/gems/rake-10.5.0/test/test_rake_scope.rb +44 -0
  485. data/vendor/ruby/gems/rake-10.5.0/test/test_rake_task.rb +393 -0
  486. data/vendor/ruby/gems/rake-10.5.0/test/test_rake_task_argument_parsing.rb +119 -0
  487. data/vendor/ruby/gems/rake-10.5.0/test/test_rake_task_arguments.rb +127 -0
  488. data/vendor/ruby/gems/rake-10.5.0/test/test_rake_task_lib.rb +9 -0
  489. data/vendor/ruby/gems/rake-10.5.0/test/test_rake_task_manager.rb +178 -0
  490. data/vendor/ruby/gems/rake-10.5.0/test/test_rake_task_manager_argument_resolution.rb +19 -0
  491. data/vendor/ruby/gems/rake-10.5.0/test/test_rake_task_with_arguments.rb +172 -0
  492. data/vendor/ruby/gems/rake-10.5.0/test/test_rake_test_task.rb +146 -0
  493. data/vendor/ruby/gems/rake-10.5.0/test/test_rake_thread_pool.rb +145 -0
  494. data/vendor/ruby/gems/rake-10.5.0/test/test_rake_top_level_functions.rb +71 -0
  495. data/vendor/ruby/gems/rake-10.5.0/test/test_rake_win32.rb +72 -0
  496. data/vendor/ruby/gems/rake-10.5.0/test/test_thread_history_display.rb +101 -0
  497. data/vendor/ruby/gems/rake-10.5.0/test/test_trace_output.rb +52 -0
  498. data/vendor/ruby/gems/sprockets-3.7.1/CHANGELOG.md +292 -0
  499. data/vendor/ruby/gems/sprockets-3.7.1/LICENSE +21 -0
  500. data/vendor/ruby/gems/sprockets-3.7.1/README.md +509 -0
  501. data/vendor/ruby/gems/sprockets-3.7.1/bin/sprockets +89 -0
  502. data/vendor/ruby/gems/sprockets-3.7.1/lib/rake/sprocketstask.rb +152 -0
  503. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/asset.rb +200 -0
  504. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/autoload/closure.rb +7 -0
  505. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/autoload/coffee_script.rb +7 -0
  506. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/autoload/eco.rb +7 -0
  507. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/autoload/ejs.rb +7 -0
  508. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/autoload/sass.rb +7 -0
  509. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/autoload/uglifier.rb +7 -0
  510. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/autoload/yui.rb +7 -0
  511. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/autoload.rb +11 -0
  512. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/base.rb +110 -0
  513. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/bower.rb +58 -0
  514. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/bundle.rb +69 -0
  515. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/cache/file_store.rb +186 -0
  516. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/cache/memory_store.rb +66 -0
  517. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/cache/null_store.rb +46 -0
  518. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/cache.rb +236 -0
  519. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/cached_environment.rb +69 -0
  520. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/closure_compressor.rb +47 -0
  521. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/coffee_script_processor.rb +25 -0
  522. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/coffee_script_template.rb +17 -0
  523. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/compressing.rb +94 -0
  524. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/configuration.rb +83 -0
  525. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/context.rb +231 -0
  526. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/dependencies.rb +73 -0
  527. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/deprecation.rb +90 -0
  528. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/digest_utils.rb +180 -0
  529. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/directive_processor.rb +404 -0
  530. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/eco_processor.rb +32 -0
  531. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/eco_template.rb +17 -0
  532. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/ejs_processor.rb +31 -0
  533. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/ejs_template.rb +17 -0
  534. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/encoding_utils.rb +261 -0
  535. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/engines.rb +92 -0
  536. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/environment.rb +41 -0
  537. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/erb_processor.rb +30 -0
  538. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/erb_template.rb +11 -0
  539. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/errors.rb +11 -0
  540. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/file_reader.rb +15 -0
  541. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/http_utils.rb +117 -0
  542. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/jst_processor.rb +49 -0
  543. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/legacy.rb +330 -0
  544. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/legacy_proc_processor.rb +35 -0
  545. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/legacy_tilt_processor.rb +29 -0
  546. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/loader.rb +325 -0
  547. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/manifest.rb +335 -0
  548. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/manifest_utils.rb +45 -0
  549. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/mime.rb +130 -0
  550. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/path_dependency_utils.rb +85 -0
  551. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/path_digest_utils.rb +47 -0
  552. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb +287 -0
  553. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/paths.rb +81 -0
  554. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/processing.rb +258 -0
  555. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb +180 -0
  556. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/resolve.rb +211 -0
  557. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/sass_cache_store.rb +34 -0
  558. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/sass_compressor.rb +51 -0
  559. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/sass_functions.rb +2 -0
  560. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/sass_importer.rb +2 -0
  561. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/sass_processor.rb +292 -0
  562. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/sass_template.rb +19 -0
  563. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/server.rb +292 -0
  564. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/transformers.rb +145 -0
  565. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/uglifier_compressor.rb +56 -0
  566. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/unloaded_asset.rb +137 -0
  567. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/uri_tar.rb +98 -0
  568. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/uri_utils.rb +188 -0
  569. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/utils/gzip.rb +67 -0
  570. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/utils.rb +235 -0
  571. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/version.rb +3 -0
  572. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/yui_compressor.rb +55 -0
  573. data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets.rb +169 -0
  574. data/vendor/ruby/specifications/concurrent-ruby-1.0.5.gemspec +23 -0
  575. data/vendor/ruby/specifications/rack-2.0.5.gemspec +42 -0
  576. data/vendor/ruby/specifications/rake-10.5.0.gemspec +43 -0
  577. data/vendor/ruby/specifications/sprockets-3.7.1.gemspec +78 -0
  578. metadata +660 -0
@@ -0,0 +1,510 @@
1
+ require 'minitest/autorun'
2
+ require 'rack'
3
+ require 'rack/response'
4
+ require 'stringio'
5
+
6
+ describe Rack::Response do
7
+ it 'has cache-control methods' do
8
+ response = Rack::Response.new
9
+ cc = 'foo'
10
+ response.cache_control = cc
11
+ assert_equal cc, response.cache_control
12
+ assert_equal cc, response.to_a[2]['Cache-Control']
13
+ end
14
+
15
+ it 'has an etag method' do
16
+ response = Rack::Response.new
17
+ etag = 'foo'
18
+ response.etag = etag
19
+ assert_equal etag, response.etag
20
+ assert_equal etag, response.to_a[2]['ETag']
21
+ end
22
+
23
+ it "have sensible default values" do
24
+ response = Rack::Response.new
25
+ status, header, body = response.finish
26
+ status.must_equal 200
27
+ header.must_equal({})
28
+ body.each { |part|
29
+ part.must_equal ""
30
+ }
31
+
32
+ response = Rack::Response.new
33
+ status, header, body = *response
34
+ status.must_equal 200
35
+ header.must_equal({})
36
+ body.each { |part|
37
+ part.must_equal ""
38
+ }
39
+ end
40
+
41
+ it "can be written to" do
42
+ response = Rack::Response.new
43
+
44
+ _, _, body = response.finish do
45
+ response.write "foo"
46
+ response.write "bar"
47
+ response.write "baz"
48
+ end
49
+
50
+ parts = []
51
+ body.each { |part| parts << part }
52
+
53
+ parts.must_equal ["foo", "bar", "baz"]
54
+ end
55
+
56
+ it "can set and read headers" do
57
+ response = Rack::Response.new
58
+ response["Content-Type"].must_be_nil
59
+ response["Content-Type"] = "text/plain"
60
+ response["Content-Type"].must_equal "text/plain"
61
+ end
62
+
63
+ it "can override the initial Content-Type with a different case" do
64
+ response = Rack::Response.new("", 200, "content-type" => "text/plain")
65
+ response["Content-Type"].must_equal "text/plain"
66
+ end
67
+
68
+ it "can set cookies" do
69
+ response = Rack::Response.new
70
+
71
+ response.set_cookie "foo", "bar"
72
+ response["Set-Cookie"].must_equal "foo=bar"
73
+ response.set_cookie "foo2", "bar2"
74
+ response["Set-Cookie"].must_equal ["foo=bar", "foo2=bar2"].join("\n")
75
+ response.set_cookie "foo3", "bar3"
76
+ response["Set-Cookie"].must_equal ["foo=bar", "foo2=bar2", "foo3=bar3"].join("\n")
77
+ end
78
+
79
+ it "can set cookies with the same name for multiple domains" do
80
+ response = Rack::Response.new
81
+ response.set_cookie "foo", {:value => "bar", :domain => "sample.example.com"}
82
+ response.set_cookie "foo", {:value => "bar", :domain => ".example.com"}
83
+ response["Set-Cookie"].must_equal ["foo=bar; domain=sample.example.com", "foo=bar; domain=.example.com"].join("\n")
84
+ end
85
+
86
+ it "formats the Cookie expiration date accordingly to RFC 6265" do
87
+ response = Rack::Response.new
88
+
89
+ response.set_cookie "foo", {:value => "bar", :expires => Time.now+10}
90
+ response["Set-Cookie"].must_match(
91
+ /expires=..., \d\d ... \d\d\d\d \d\d:\d\d:\d\d .../)
92
+ end
93
+
94
+ it "can set secure cookies" do
95
+ response = Rack::Response.new
96
+ response.set_cookie "foo", {:value => "bar", :secure => true}
97
+ response["Set-Cookie"].must_equal "foo=bar; secure"
98
+ end
99
+
100
+ it "can set http only cookies" do
101
+ response = Rack::Response.new
102
+ response.set_cookie "foo", {:value => "bar", :httponly => true}
103
+ response["Set-Cookie"].must_equal "foo=bar; HttpOnly"
104
+ end
105
+
106
+ it "can set http only cookies with :http_only" do
107
+ response = Rack::Response.new
108
+ response.set_cookie "foo", {:value => "bar", :http_only => true}
109
+ response["Set-Cookie"].must_equal "foo=bar; HttpOnly"
110
+ end
111
+
112
+ it "can set prefers :httponly for http only cookie setting when :httponly and :http_only provided" do
113
+ response = Rack::Response.new
114
+ response.set_cookie "foo", {:value => "bar", :httponly => false, :http_only => true}
115
+ response["Set-Cookie"].must_equal "foo=bar"
116
+ end
117
+
118
+ it "can set SameSite cookies with symbol value :lax" do
119
+ response = Rack::Response.new
120
+ response.set_cookie "foo", {:value => "bar", :same_site => :lax}
121
+ response["Set-Cookie"].must_equal "foo=bar; SameSite=Lax"
122
+ end
123
+
124
+ it "can set SameSite cookies with symbol value :Lax" do
125
+ response = Rack::Response.new
126
+ response.set_cookie "foo", {:value => "bar", :same_site => :lax}
127
+ response["Set-Cookie"].must_equal "foo=bar; SameSite=Lax"
128
+ end
129
+
130
+ it "can set SameSite cookies with string value 'Lax'" do
131
+ response = Rack::Response.new
132
+ response.set_cookie "foo", {:value => "bar", :same_site => "Lax"}
133
+ response["Set-Cookie"].must_equal "foo=bar; SameSite=Lax"
134
+ end
135
+
136
+ it "can set SameSite cookies with boolean value true" do
137
+ response = Rack::Response.new
138
+ response.set_cookie "foo", {:value => "bar", :same_site => true}
139
+ response["Set-Cookie"].must_equal "foo=bar; SameSite=Strict"
140
+ end
141
+
142
+ it "can set SameSite cookies with symbol value :strict" do
143
+ response = Rack::Response.new
144
+ response.set_cookie "foo", {:value => "bar", :same_site => :strict}
145
+ response["Set-Cookie"].must_equal "foo=bar; SameSite=Strict"
146
+ end
147
+
148
+ it "can set SameSite cookies with symbol value :Strict" do
149
+ response = Rack::Response.new
150
+ response.set_cookie "foo", {:value => "bar", :same_site => :Strict}
151
+ response["Set-Cookie"].must_equal "foo=bar; SameSite=Strict"
152
+ end
153
+
154
+ it "can set SameSite cookies with string value 'Strict'" do
155
+ response = Rack::Response.new
156
+ response.set_cookie "foo", {:value => "bar", :same_site => "Strict"}
157
+ response["Set-Cookie"].must_equal "foo=bar; SameSite=Strict"
158
+ end
159
+
160
+ it "validates the SameSite option value" do
161
+ response = Rack::Response.new
162
+ lambda {
163
+ response.set_cookie "foo", {:value => "bar", :same_site => "Foo"}
164
+ }.must_raise(ArgumentError).
165
+ message.must_match(/Invalid SameSite value: "Foo"/)
166
+ end
167
+
168
+ it "can set SameSite cookies with symbol value" do
169
+ response = Rack::Response.new
170
+ response.set_cookie "foo", {:value => "bar", :same_site => :Strict}
171
+ response["Set-Cookie"].must_equal "foo=bar; SameSite=Strict"
172
+ end
173
+
174
+ [ nil, false ].each do |non_truthy|
175
+ it "omits SameSite attribute given a #{non_truthy.inspect} value" do
176
+ response = Rack::Response.new
177
+ response.set_cookie "foo", {:value => "bar", :same_site => non_truthy}
178
+ response["Set-Cookie"].must_equal "foo=bar"
179
+ end
180
+ end
181
+
182
+ it "can delete cookies" do
183
+ response = Rack::Response.new
184
+ response.set_cookie "foo", "bar"
185
+ response.set_cookie "foo2", "bar2"
186
+ response.delete_cookie "foo"
187
+ response["Set-Cookie"].must_equal [
188
+ "foo2=bar2",
189
+ "foo=; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 -0000"
190
+ ].join("\n")
191
+ end
192
+
193
+ it "can delete cookies with the same name from multiple domains" do
194
+ response = Rack::Response.new
195
+ response.set_cookie "foo", {:value => "bar", :domain => "sample.example.com"}
196
+ response.set_cookie "foo", {:value => "bar", :domain => ".example.com"}
197
+ response["Set-Cookie"].must_equal ["foo=bar; domain=sample.example.com", "foo=bar; domain=.example.com"].join("\n")
198
+ response.delete_cookie "foo", :domain => ".example.com"
199
+ response["Set-Cookie"].must_equal ["foo=bar; domain=sample.example.com", "foo=; domain=.example.com; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 -0000"].join("\n")
200
+ response.delete_cookie "foo", :domain => "sample.example.com"
201
+ response["Set-Cookie"].must_equal ["foo=; domain=.example.com; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 -0000",
202
+ "foo=; domain=sample.example.com; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 -0000"].join("\n")
203
+ end
204
+
205
+ it "can delete cookies with the same name with different paths" do
206
+ response = Rack::Response.new
207
+ response.set_cookie "foo", {:value => "bar", :path => "/"}
208
+ response.set_cookie "foo", {:value => "bar", :path => "/path"}
209
+ response["Set-Cookie"].must_equal ["foo=bar; path=/",
210
+ "foo=bar; path=/path"].join("\n")
211
+
212
+ response.delete_cookie "foo", :path => "/path"
213
+ response["Set-Cookie"].must_equal ["foo=bar; path=/",
214
+ "foo=; path=/path; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 -0000"].join("\n")
215
+ end
216
+
217
+ it "can do redirects" do
218
+ response = Rack::Response.new
219
+ response.redirect "/foo"
220
+ status, header, body = response.finish
221
+ status.must_equal 302
222
+ header["Location"].must_equal "/foo"
223
+
224
+ response = Rack::Response.new
225
+ response.redirect "/foo", 307
226
+ status, header, body = response.finish
227
+
228
+ status.must_equal 307
229
+ end
230
+
231
+ it "has a useful constructor" do
232
+ r = Rack::Response.new("foo")
233
+ status, header, body = r.finish
234
+ str = ""; body.each { |part| str << part }
235
+ str.must_equal "foo"
236
+
237
+ r = Rack::Response.new(["foo", "bar"])
238
+ status, header, body = r.finish
239
+ str = ""; body.each { |part| str << part }
240
+ str.must_equal "foobar"
241
+
242
+ object_with_each = Object.new
243
+ def object_with_each.each
244
+ yield "foo"
245
+ yield "bar"
246
+ end
247
+ r = Rack::Response.new(object_with_each)
248
+ r.write "foo"
249
+ status, header, body = r.finish
250
+ str = ""; body.each { |part| str << part }
251
+ str.must_equal "foobarfoo"
252
+
253
+ r = Rack::Response.new([], 500)
254
+ r.status.must_equal 500
255
+
256
+ r = Rack::Response.new([], "200 OK")
257
+ r.status.must_equal 200
258
+ end
259
+
260
+ it "has a constructor that can take a block" do
261
+ r = Rack::Response.new { |res|
262
+ res.status = 404
263
+ res.write "foo"
264
+ }
265
+ status, _, body = r.finish
266
+ str = ""; body.each { |part| str << part }
267
+ str.must_equal "foo"
268
+ status.must_equal 404
269
+ end
270
+
271
+ it "doesn't return invalid responses" do
272
+ r = Rack::Response.new(["foo", "bar"], 204)
273
+ _, header, body = r.finish
274
+ str = ""; body.each { |part| str << part }
275
+ str.must_be :empty?
276
+ header["Content-Type"].must_be_nil
277
+ header['Content-Length'].must_be_nil
278
+
279
+ lambda {
280
+ Rack::Response.new(Object.new)
281
+ }.must_raise(TypeError).
282
+ message.must_match(/stringable or iterable required/)
283
+ end
284
+
285
+ it "knows if it's empty" do
286
+ r = Rack::Response.new
287
+ r.must_be :empty?
288
+ r.write "foo"
289
+ r.wont_be :empty?
290
+
291
+ r = Rack::Response.new
292
+ r.must_be :empty?
293
+ r.finish
294
+ r.must_be :empty?
295
+
296
+ r = Rack::Response.new
297
+ r.must_be :empty?
298
+ r.finish { }
299
+ r.wont_be :empty?
300
+ end
301
+
302
+ it "provide access to the HTTP status" do
303
+ res = Rack::Response.new
304
+ res.status = 200
305
+ res.must_be :successful?
306
+ res.must_be :ok?
307
+
308
+ res.status = 201
309
+ res.must_be :successful?
310
+ res.must_be :created?
311
+
312
+ res.status = 202
313
+ res.must_be :successful?
314
+ res.must_be :accepted?
315
+
316
+ res.status = 204
317
+ res.must_be :successful?
318
+ res.must_be :no_content?
319
+
320
+ res.status = 301
321
+ res.must_be :redirect?
322
+ res.must_be :moved_permanently?
323
+
324
+ res.status = 302
325
+ res.must_be :redirect?
326
+
327
+ res.status = 303
328
+ res.must_be :redirect?
329
+
330
+ res.status = 307
331
+ res.must_be :redirect?
332
+
333
+ res.status = 308
334
+ res.must_be :redirect?
335
+
336
+ res.status = 400
337
+ res.wont_be :successful?
338
+ res.must_be :client_error?
339
+ res.must_be :bad_request?
340
+
341
+ res.status = 401
342
+ res.wont_be :successful?
343
+ res.must_be :client_error?
344
+ res.must_be :unauthorized?
345
+
346
+ res.status = 404
347
+ res.wont_be :successful?
348
+ res.must_be :client_error?
349
+ res.must_be :not_found?
350
+
351
+ res.status = 405
352
+ res.wont_be :successful?
353
+ res.must_be :client_error?
354
+ res.must_be :method_not_allowed?
355
+
356
+ res.status = 412
357
+ res.wont_be :successful?
358
+ res.must_be :client_error?
359
+ res.must_be :precondition_failed?
360
+
361
+ res.status = 422
362
+ res.wont_be :successful?
363
+ res.must_be :client_error?
364
+ res.must_be :unprocessable?
365
+
366
+ res.status = 501
367
+ res.wont_be :successful?
368
+ res.must_be :server_error?
369
+ end
370
+
371
+ it "provide access to the HTTP headers" do
372
+ res = Rack::Response.new
373
+ res["Content-Type"] = "text/yaml"
374
+
375
+ res.must_include "Content-Type"
376
+ res.headers["Content-Type"].must_equal "text/yaml"
377
+ res["Content-Type"].must_equal "text/yaml"
378
+ res.content_type.must_equal "text/yaml"
379
+ res.content_length.must_be_nil
380
+ res.location.must_be_nil
381
+ end
382
+
383
+ it "does not add or change Content-Length when #finish()ing" do
384
+ res = Rack::Response.new
385
+ res.status = 200
386
+ res.finish
387
+ res.headers["Content-Length"].must_be_nil
388
+
389
+ res = Rack::Response.new
390
+ res.status = 200
391
+ res.headers["Content-Length"] = "10"
392
+ res.finish
393
+ res.headers["Content-Length"].must_equal "10"
394
+ end
395
+
396
+ it "updates Content-Length when body appended to using #write" do
397
+ res = Rack::Response.new
398
+ res.status = 200
399
+ res.headers["Content-Length"].must_be_nil
400
+ res.write "Hi"
401
+ res.headers["Content-Length"].must_equal "2"
402
+ res.write " there"
403
+ res.headers["Content-Length"].must_equal "8"
404
+ end
405
+
406
+ it "calls close on #body" do
407
+ res = Rack::Response.new
408
+ res.body = StringIO.new
409
+ res.close
410
+ res.body.must_be :closed?
411
+ end
412
+
413
+ it "calls close on #body when 204 or 304" do
414
+ res = Rack::Response.new
415
+ res.body = StringIO.new
416
+ res.finish
417
+ res.body.wont_be :closed?
418
+
419
+ res.status = 204
420
+ _, _, b = res.finish
421
+ res.body.must_be :closed?
422
+ b.wont_equal res.body
423
+
424
+ res.body = StringIO.new
425
+ res.status = 205
426
+ _, _, b = res.finish
427
+ res.body.wont_be :closed?
428
+ b.wont_equal res.body
429
+
430
+ res.body = StringIO.new
431
+ res.status = 304
432
+ _, _, b = res.finish
433
+ res.body.must_be :closed?
434
+ b.wont_equal res.body
435
+ end
436
+
437
+ it "wraps the body from #to_ary to prevent infinite loops" do
438
+ res = Rack::Response.new
439
+ res.finish.last.wont_respond_to(:to_ary)
440
+ lambda { res.finish.last.to_ary }.must_raise NoMethodError
441
+ end
442
+ end
443
+
444
+ describe Rack::Response, 'headers' do
445
+ before do
446
+ @response = Rack::Response.new([], 200, { 'Foo' => '1' })
447
+ end
448
+
449
+ it 'has_header?' do
450
+ lambda { @response.has_header? nil }.must_raise NoMethodError
451
+
452
+ @response.has_header?('Foo').must_equal true
453
+ @response.has_header?('foo').must_equal true
454
+ end
455
+
456
+ it 'get_header' do
457
+ lambda { @response.get_header nil }.must_raise NoMethodError
458
+
459
+ @response.get_header('Foo').must_equal '1'
460
+ @response.get_header('foo').must_equal '1'
461
+ end
462
+
463
+ it 'set_header' do
464
+ lambda { @response.set_header nil, '1' }.must_raise NoMethodError
465
+
466
+ @response.set_header('Foo', '2').must_equal '2'
467
+ @response.has_header?('Foo').must_equal true
468
+ @response.get_header('Foo').must_equal('2')
469
+
470
+ @response.set_header('Foo', nil).must_be_nil
471
+ @response.has_header?('Foo').must_equal true
472
+ @response.get_header('Foo').must_be_nil
473
+ end
474
+
475
+ it 'add_header' do
476
+ lambda { @response.add_header nil, '1' }.must_raise NoMethodError
477
+
478
+ # Add a value to an existing header
479
+ @response.add_header('Foo', '2').must_equal '1,2'
480
+ @response.get_header('Foo').must_equal '1,2'
481
+
482
+ # Add nil to an existing header
483
+ @response.add_header('Foo', nil).must_equal '1,2'
484
+ @response.get_header('Foo').must_equal '1,2'
485
+
486
+ # Add nil to a nonexistent header
487
+ @response.add_header('Bar', nil).must_be_nil
488
+ @response.has_header?('Bar').must_equal false
489
+ @response.get_header('Bar').must_be_nil
490
+
491
+ # Add a value to a nonexistent header
492
+ @response.add_header('Bar', '1').must_equal '1'
493
+ @response.has_header?('Bar').must_equal true
494
+ @response.get_header('Bar').must_equal '1'
495
+ end
496
+
497
+ it 'delete_header' do
498
+ lambda { @response.delete_header nil }.must_raise NoMethodError
499
+
500
+ @response.delete_header('Foo').must_equal '1'
501
+ (!!@response.has_header?('Foo')).must_equal false
502
+
503
+ @response.delete_header('Foo').must_be_nil
504
+ @response.has_header?('Foo').must_equal false
505
+
506
+ @response.set_header('Foo', 1)
507
+ @response.delete_header('foo').must_equal 1
508
+ @response.has_header?('Foo').must_equal false
509
+ end
510
+ end
@@ -0,0 +1,128 @@
1
+ require 'minitest/autorun'
2
+ require 'stringio'
3
+ require 'rack/rewindable_input'
4
+
5
+ module RewindableTest
6
+ extend Minitest::Spec::DSL
7
+
8
+ def setup
9
+ @rio = Rack::RewindableInput.new(@io)
10
+ end
11
+
12
+ class << self # HACK to get this running w/ as few changes as possible
13
+ alias_method :should, :it
14
+ end
15
+
16
+ it "be able to handle to read()" do
17
+ @rio.read.must_equal "hello world"
18
+ end
19
+
20
+ it "be able to handle to read(nil)" do
21
+ @rio.read(nil).must_equal "hello world"
22
+ end
23
+
24
+ it "be able to handle to read(length)" do
25
+ @rio.read(1).must_equal "h"
26
+ end
27
+
28
+ it "be able to handle to read(length, buffer)" do
29
+ buffer = ""
30
+ result = @rio.read(1, buffer)
31
+ result.must_equal "h"
32
+ result.object_id.must_equal buffer.object_id
33
+ end
34
+
35
+ it "be able to handle to read(nil, buffer)" do
36
+ buffer = ""
37
+ result = @rio.read(nil, buffer)
38
+ result.must_equal "hello world"
39
+ result.object_id.must_equal buffer.object_id
40
+ end
41
+
42
+ it "rewind to the beginning when #rewind is called" do
43
+ @rio.read(1)
44
+ @rio.rewind
45
+ @rio.read.must_equal "hello world"
46
+ end
47
+
48
+ it "be able to handle gets" do
49
+ @rio.gets.must_equal "hello world"
50
+ end
51
+
52
+ it "be able to handle each" do
53
+ array = []
54
+ @rio.each do |data|
55
+ array << data
56
+ end
57
+ array.must_equal ["hello world"]
58
+ end
59
+
60
+ it "not buffer into a Tempfile if no data has been read yet" do
61
+ @rio.instance_variable_get(:@rewindable_io).must_be_nil
62
+ end
63
+
64
+ it "buffer into a Tempfile when data has been consumed for the first time" do
65
+ @rio.read(1)
66
+ tempfile = @rio.instance_variable_get(:@rewindable_io)
67
+ tempfile.wont_be :nil?
68
+ @rio.read(1)
69
+ tempfile2 = @rio.instance_variable_get(:@rewindable_io)
70
+ tempfile2.path.must_equal tempfile.path
71
+ end
72
+
73
+ it "close the underlying tempfile upon calling #close" do
74
+ @rio.read(1)
75
+ tempfile = @rio.instance_variable_get(:@rewindable_io)
76
+ @rio.close
77
+ tempfile.must_be :closed?
78
+ end
79
+
80
+ it "be possible to call #close when no data has been buffered yet" do
81
+ @rio.close.must_be_nil
82
+ end
83
+
84
+ it "be possible to call #close multiple times" do
85
+ @rio.close.must_be_nil
86
+ @rio.close.must_be_nil
87
+ end
88
+
89
+ after do
90
+ @rio.close
91
+ @rio = nil
92
+ end
93
+ end
94
+
95
+ describe Rack::RewindableInput do
96
+ describe "given an IO object that is already rewindable" do
97
+ def setup
98
+ @io = StringIO.new("hello world")
99
+ super
100
+ end
101
+
102
+ include RewindableTest
103
+ end
104
+
105
+ describe "given an IO object that is not rewindable" do
106
+ def setup
107
+ @io = StringIO.new("hello world")
108
+ @io.instance_eval do
109
+ undef :rewind
110
+ end
111
+ super
112
+ end
113
+
114
+ include RewindableTest
115
+ end
116
+
117
+ describe "given an IO object whose rewind method raises Errno::ESPIPE" do
118
+ def setup
119
+ @io = StringIO.new("hello world")
120
+ def @io.rewind
121
+ raise Errno::ESPIPE, "You can't rewind this!"
122
+ end
123
+ super
124
+ end
125
+
126
+ include RewindableTest
127
+ end
128
+ end
@@ -0,0 +1,50 @@
1
+ require 'minitest/autorun'
2
+ require 'rack/lint'
3
+ require 'rack/mock'
4
+ require 'rack/runtime'
5
+
6
+ describe Rack::Runtime do
7
+ def runtime_app(app, *args)
8
+ Rack::Lint.new Rack::Runtime.new(app, *args)
9
+ end
10
+
11
+ def request
12
+ Rack::MockRequest.env_for
13
+ end
14
+
15
+ it "sets X-Runtime is none is set" do
16
+ app = lambda { |env| [200, {'Content-Type' => 'text/plain'}, "Hello, World!"] }
17
+ response = runtime_app(app).call(request)
18
+ response[1]['X-Runtime'].must_match(/[\d\.]+/)
19
+ end
20
+
21
+ it "doesn't set the X-Runtime if it is already set" do
22
+ app = lambda { |env| [200, {'Content-Type' => 'text/plain', "X-Runtime" => "foobar"}, "Hello, World!"] }
23
+ response = runtime_app(app).call(request)
24
+ response[1]['X-Runtime'].must_equal "foobar"
25
+ end
26
+
27
+ it "allow a suffix to be set" do
28
+ app = lambda { |env| [200, {'Content-Type' => 'text/plain'}, "Hello, World!"] }
29
+ response = runtime_app(app, "Test").call(request)
30
+ response[1]['X-Runtime-Test'].must_match(/[\d\.]+/)
31
+ end
32
+
33
+ it "allow multiple timers to be set" do
34
+ app = lambda { |env| sleep 0.1; [200, {'Content-Type' => 'text/plain'}, "Hello, World!"] }
35
+ runtime = runtime_app(app, "App")
36
+
37
+ # wrap many times to guarantee a measurable difference
38
+ 100.times do |i|
39
+ runtime = Rack::Runtime.new(runtime, i.to_s)
40
+ end
41
+ runtime = Rack::Runtime.new(runtime, "All")
42
+
43
+ response = runtime.call(request)
44
+
45
+ response[1]['X-Runtime-App'].must_match(/[\d\.]+/)
46
+ response[1]['X-Runtime-All'].must_match(/[\d\.]+/)
47
+
48
+ Float(response[1]['X-Runtime-All']).must_be :>, Float(response[1]['X-Runtime-App'])
49
+ end
50
+ end