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,760 @@
1
+ require 'rack/utils'
2
+ require 'forwardable'
3
+
4
+ module Rack
5
+ # Rack::Lint validates your application and the requests and
6
+ # responses according to the Rack spec.
7
+
8
+ class Lint
9
+ def initialize(app)
10
+ @app = app
11
+ @content_length = nil
12
+ end
13
+
14
+ # :stopdoc:
15
+
16
+ class LintError < RuntimeError; end
17
+ module Assertion
18
+ def assert(message)
19
+ unless yield
20
+ raise LintError, message
21
+ end
22
+ end
23
+ end
24
+ include Assertion
25
+
26
+ ## This specification aims to formalize the Rack protocol. You
27
+ ## can (and should) use Rack::Lint to enforce it.
28
+ ##
29
+ ## When you develop middleware, be sure to add a Lint before and
30
+ ## after to catch all mistakes.
31
+
32
+ ## = Rack applications
33
+
34
+ ## A Rack application is a Ruby object (not a class) that
35
+ ## responds to +call+.
36
+ def call(env=nil)
37
+ dup._call(env)
38
+ end
39
+
40
+ def _call(env)
41
+ ## It takes exactly one argument, the *environment*
42
+ assert("No env given") { env }
43
+ check_env env
44
+
45
+ env[RACK_INPUT] = InputWrapper.new(env[RACK_INPUT])
46
+ env[RACK_ERRORS] = ErrorWrapper.new(env[RACK_ERRORS])
47
+
48
+ ## and returns an Array of exactly three values:
49
+ status, headers, @body = @app.call(env)
50
+ ## The *status*,
51
+ check_status status
52
+ ## the *headers*,
53
+ check_headers headers
54
+
55
+ check_hijack_response headers, env
56
+
57
+ ## and the *body*.
58
+ check_content_type status, headers
59
+ check_content_length status, headers
60
+ @head_request = env[REQUEST_METHOD] == HEAD
61
+ [status, headers, self]
62
+ end
63
+
64
+ ## == The Environment
65
+ def check_env(env)
66
+ ## The environment must be an instance of Hash that includes
67
+ ## CGI-like headers. The application is free to modify the
68
+ ## environment.
69
+ assert("env #{env.inspect} is not a Hash, but #{env.class}") {
70
+ env.kind_of? Hash
71
+ }
72
+
73
+ ##
74
+ ## The environment is required to include these variables
75
+ ## (adopted from PEP333), except when they'd be empty, but see
76
+ ## below.
77
+
78
+ ## <tt>REQUEST_METHOD</tt>:: The HTTP request method, such as
79
+ ## "GET" or "POST". This cannot ever
80
+ ## be an empty string, and so is
81
+ ## always required.
82
+
83
+ ## <tt>SCRIPT_NAME</tt>:: The initial portion of the request
84
+ ## URL's "path" that corresponds to the
85
+ ## application object, so that the
86
+ ## application knows its virtual
87
+ ## "location". This may be an empty
88
+ ## string, if the application corresponds
89
+ ## to the "root" of the server.
90
+
91
+ ## <tt>PATH_INFO</tt>:: The remainder of the request URL's
92
+ ## "path", designating the virtual
93
+ ## "location" of the request's target
94
+ ## within the application. This may be an
95
+ ## empty string, if the request URL targets
96
+ ## the application root and does not have a
97
+ ## trailing slash. This value may be
98
+ ## percent-encoded when originating from
99
+ ## a URL.
100
+
101
+ ## <tt>QUERY_STRING</tt>:: The portion of the request URL that
102
+ ## follows the <tt>?</tt>, if any. May be
103
+ ## empty, but is always required!
104
+
105
+ ## <tt>SERVER_NAME</tt>, <tt>SERVER_PORT</tt>::
106
+ ## When combined with <tt>SCRIPT_NAME</tt> and
107
+ ## <tt>PATH_INFO</tt>, these variables can be
108
+ ## used to complete the URL. Note, however,
109
+ ## that <tt>HTTP_HOST</tt>, if present,
110
+ ## should be used in preference to
111
+ ## <tt>SERVER_NAME</tt> for reconstructing
112
+ ## the request URL.
113
+ ## <tt>SERVER_NAME</tt> and <tt>SERVER_PORT</tt>
114
+ ## can never be empty strings, and so
115
+ ## are always required.
116
+
117
+ ## <tt>HTTP_</tt> Variables:: Variables corresponding to the
118
+ ## client-supplied HTTP request
119
+ ## headers (i.e., variables whose
120
+ ## names begin with <tt>HTTP_</tt>). The
121
+ ## presence or absence of these
122
+ ## variables should correspond with
123
+ ## the presence or absence of the
124
+ ## appropriate HTTP header in the
125
+ ## request. See
126
+ ## <a href="https://tools.ietf.org/html/rfc3875#section-4.1.18">
127
+ ## RFC3875 section 4.1.18</a> for
128
+ ## specific behavior.
129
+
130
+ ## In addition to this, the Rack environment must include these
131
+ ## Rack-specific variables:
132
+
133
+ ## <tt>rack.version</tt>:: The Array representing this version of Rack
134
+ ## See Rack::VERSION, that corresponds to
135
+ ## the version of this SPEC.
136
+
137
+ ## <tt>rack.url_scheme</tt>:: +http+ or +https+, depending on the
138
+ ## request URL.
139
+
140
+ ## <tt>rack.input</tt>:: See below, the input stream.
141
+
142
+ ## <tt>rack.errors</tt>:: See below, the error stream.
143
+
144
+ ## <tt>rack.multithread</tt>:: true if the application object may be
145
+ ## simultaneously invoked by another thread
146
+ ## in the same process, false otherwise.
147
+
148
+ ## <tt>rack.multiprocess</tt>:: true if an equivalent application object
149
+ ## may be simultaneously invoked by another
150
+ ## process, false otherwise.
151
+
152
+ ## <tt>rack.run_once</tt>:: true if the server expects
153
+ ## (but does not guarantee!) that the
154
+ ## application will only be invoked this one
155
+ ## time during the life of its containing
156
+ ## process. Normally, this will only be true
157
+ ## for a server based on CGI
158
+ ## (or something similar).
159
+
160
+ ## <tt>rack.hijack?</tt>:: present and true if the server supports
161
+ ## connection hijacking. See below, hijacking.
162
+
163
+ ## <tt>rack.hijack</tt>:: an object responding to #call that must be
164
+ ## called at least once before using
165
+ ## rack.hijack_io.
166
+ ## It is recommended #call return rack.hijack_io
167
+ ## as well as setting it in env if necessary.
168
+
169
+ ## <tt>rack.hijack_io</tt>:: if rack.hijack? is true, and rack.hijack
170
+ ## has received #call, this will contain
171
+ ## an object resembling an IO. See hijacking.
172
+
173
+ ## Additional environment specifications have approved to
174
+ ## standardized middleware APIs. None of these are required to
175
+ ## be implemented by the server.
176
+
177
+ ## <tt>rack.session</tt>:: A hash like interface for storing
178
+ ## request session data.
179
+ ## The store must implement:
180
+ if session = env[RACK_SESSION]
181
+ ## store(key, value) (aliased as []=);
182
+ assert("session #{session.inspect} must respond to store and []=") {
183
+ session.respond_to?(:store) && session.respond_to?(:[]=)
184
+ }
185
+
186
+ ## fetch(key, default = nil) (aliased as []);
187
+ assert("session #{session.inspect} must respond to fetch and []") {
188
+ session.respond_to?(:fetch) && session.respond_to?(:[])
189
+ }
190
+
191
+ ## delete(key);
192
+ assert("session #{session.inspect} must respond to delete") {
193
+ session.respond_to?(:delete)
194
+ }
195
+
196
+ ## clear;
197
+ assert("session #{session.inspect} must respond to clear") {
198
+ session.respond_to?(:clear)
199
+ }
200
+ end
201
+
202
+ ## <tt>rack.logger</tt>:: A common object interface for logging messages.
203
+ ## The object must implement:
204
+ if logger = env[RACK_LOGGER]
205
+ ## info(message, &block)
206
+ assert("logger #{logger.inspect} must respond to info") {
207
+ logger.respond_to?(:info)
208
+ }
209
+
210
+ ## debug(message, &block)
211
+ assert("logger #{logger.inspect} must respond to debug") {
212
+ logger.respond_to?(:debug)
213
+ }
214
+
215
+ ## warn(message, &block)
216
+ assert("logger #{logger.inspect} must respond to warn") {
217
+ logger.respond_to?(:warn)
218
+ }
219
+
220
+ ## error(message, &block)
221
+ assert("logger #{logger.inspect} must respond to error") {
222
+ logger.respond_to?(:error)
223
+ }
224
+
225
+ ## fatal(message, &block)
226
+ assert("logger #{logger.inspect} must respond to fatal") {
227
+ logger.respond_to?(:fatal)
228
+ }
229
+ end
230
+
231
+ ## <tt>rack.multipart.buffer_size</tt>:: An Integer hint to the multipart parser as to what chunk size to use for reads and writes.
232
+ if bufsize = env[RACK_MULTIPART_BUFFER_SIZE]
233
+ assert("rack.multipart.buffer_size must be an Integer > 0 if specified") {
234
+ bufsize.is_a?(Integer) && bufsize > 0
235
+ }
236
+ end
237
+
238
+ ## <tt>rack.multipart.tempfile_factory</tt>:: An object responding to #call with two arguments, the filename and content_type given for the multipart form field, and returning an IO-like object that responds to #<< and optionally #rewind. This factory will be used to instantiate the tempfile for each multipart form file upload field, rather than the default class of Tempfile.
239
+ if tempfile_factory = env[RACK_MULTIPART_TEMPFILE_FACTORY]
240
+ assert("rack.multipart.tempfile_factory must respond to #call") { tempfile_factory.respond_to?(:call) }
241
+ env[RACK_MULTIPART_TEMPFILE_FACTORY] = lambda do |filename, content_type|
242
+ io = tempfile_factory.call(filename, content_type)
243
+ assert("rack.multipart.tempfile_factory return value must respond to #<<") { io.respond_to?(:<<) }
244
+ io
245
+ end
246
+ end
247
+
248
+ ## The server or the application can store their own data in the
249
+ ## environment, too. The keys must contain at least one dot,
250
+ ## and should be prefixed uniquely. The prefix <tt>rack.</tt>
251
+ ## is reserved for use with the Rack core distribution and other
252
+ ## accepted specifications and must not be used otherwise.
253
+ ##
254
+
255
+ %w[REQUEST_METHOD SERVER_NAME SERVER_PORT
256
+ QUERY_STRING
257
+ rack.version rack.input rack.errors
258
+ rack.multithread rack.multiprocess rack.run_once].each { |header|
259
+ assert("env missing required key #{header}") { env.include? header }
260
+ }
261
+
262
+ ## The environment must not contain the keys
263
+ ## <tt>HTTP_CONTENT_TYPE</tt> or <tt>HTTP_CONTENT_LENGTH</tt>
264
+ ## (use the versions without <tt>HTTP_</tt>).
265
+ %w[HTTP_CONTENT_TYPE HTTP_CONTENT_LENGTH].each { |header|
266
+ assert("env contains #{header}, must use #{header[5,-1]}") {
267
+ not env.include? header
268
+ }
269
+ }
270
+
271
+ ## The CGI keys (named without a period) must have String values.
272
+ env.each { |key, value|
273
+ next if key.include? "." # Skip extensions
274
+ assert("env variable #{key} has non-string value #{value.inspect}") {
275
+ value.kind_of? String
276
+ }
277
+ }
278
+
279
+ ## There are the following restrictions:
280
+
281
+ ## * <tt>rack.version</tt> must be an array of Integers.
282
+ assert("rack.version must be an Array, was #{env[RACK_VERSION].class}") {
283
+ env[RACK_VERSION].kind_of? Array
284
+ }
285
+ ## * <tt>rack.url_scheme</tt> must either be +http+ or +https+.
286
+ assert("rack.url_scheme unknown: #{env[RACK_URL_SCHEME].inspect}") {
287
+ %w[http https].include?(env[RACK_URL_SCHEME])
288
+ }
289
+
290
+ ## * There must be a valid input stream in <tt>rack.input</tt>.
291
+ check_input env[RACK_INPUT]
292
+ ## * There must be a valid error stream in <tt>rack.errors</tt>.
293
+ check_error env[RACK_ERRORS]
294
+ ## * There may be a valid hijack stream in <tt>rack.hijack_io</tt>
295
+ check_hijack env
296
+
297
+ ## * The <tt>REQUEST_METHOD</tt> must be a valid token.
298
+ assert("REQUEST_METHOD unknown: #{env[REQUEST_METHOD]}") {
299
+ env[REQUEST_METHOD] =~ /\A[0-9A-Za-z!\#$%&'*+.^_`|~-]+\z/
300
+ }
301
+
302
+ ## * The <tt>SCRIPT_NAME</tt>, if non-empty, must start with <tt>/</tt>
303
+ assert("SCRIPT_NAME must start with /") {
304
+ !env.include?(SCRIPT_NAME) ||
305
+ env[SCRIPT_NAME] == "" ||
306
+ env[SCRIPT_NAME] =~ /\A\//
307
+ }
308
+ ## * The <tt>PATH_INFO</tt>, if non-empty, must start with <tt>/</tt>
309
+ assert("PATH_INFO must start with /") {
310
+ !env.include?(PATH_INFO) ||
311
+ env[PATH_INFO] == "" ||
312
+ env[PATH_INFO] =~ /\A\//
313
+ }
314
+ ## * The <tt>CONTENT_LENGTH</tt>, if given, must consist of digits only.
315
+ assert("Invalid CONTENT_LENGTH: #{env["CONTENT_LENGTH"]}") {
316
+ !env.include?("CONTENT_LENGTH") || env["CONTENT_LENGTH"] =~ /\A\d+\z/
317
+ }
318
+
319
+ ## * One of <tt>SCRIPT_NAME</tt> or <tt>PATH_INFO</tt> must be
320
+ ## set. <tt>PATH_INFO</tt> should be <tt>/</tt> if
321
+ ## <tt>SCRIPT_NAME</tt> is empty.
322
+ assert("One of SCRIPT_NAME or PATH_INFO must be set (make PATH_INFO '/' if SCRIPT_NAME is empty)") {
323
+ env[SCRIPT_NAME] || env[PATH_INFO]
324
+ }
325
+ ## <tt>SCRIPT_NAME</tt> never should be <tt>/</tt>, but instead be empty.
326
+ assert("SCRIPT_NAME cannot be '/', make it '' and PATH_INFO '/'") {
327
+ env[SCRIPT_NAME] != "/"
328
+ }
329
+ end
330
+
331
+ ## === The Input Stream
332
+ ##
333
+ ## The input stream is an IO-like object which contains the raw HTTP
334
+ ## POST data.
335
+ def check_input(input)
336
+ ## When applicable, its external encoding must be "ASCII-8BIT" and it
337
+ ## must be opened in binary mode, for Ruby 1.9 compatibility.
338
+ assert("rack.input #{input} does not have ASCII-8BIT as its external encoding") {
339
+ input.external_encoding.name == "ASCII-8BIT"
340
+ } if input.respond_to?(:external_encoding)
341
+ assert("rack.input #{input} is not opened in binary mode") {
342
+ input.binmode?
343
+ } if input.respond_to?(:binmode?)
344
+
345
+ ## The input stream must respond to +gets+, +each+, +read+ and +rewind+.
346
+ [:gets, :each, :read, :rewind].each { |method|
347
+ assert("rack.input #{input} does not respond to ##{method}") {
348
+ input.respond_to? method
349
+ }
350
+ }
351
+ end
352
+
353
+ class InputWrapper
354
+ include Assertion
355
+
356
+ def initialize(input)
357
+ @input = input
358
+ end
359
+
360
+ ## * +gets+ must be called without arguments and return a string,
361
+ ## or +nil+ on EOF.
362
+ def gets(*args)
363
+ assert("rack.input#gets called with arguments") { args.size == 0 }
364
+ v = @input.gets
365
+ assert("rack.input#gets didn't return a String") {
366
+ v.nil? or v.kind_of? String
367
+ }
368
+ v
369
+ end
370
+
371
+ ## * +read+ behaves like IO#read.
372
+ ## Its signature is <tt>read([length, [buffer]])</tt>.
373
+ ##
374
+ ## If given, +length+ must be a non-negative Integer (>= 0) or +nil+,
375
+ ## and +buffer+ must be a String and may not be nil.
376
+ ##
377
+ ## If +length+ is given and not nil, then this method reads at most
378
+ ## +length+ bytes from the input stream.
379
+ ##
380
+ ## If +length+ is not given or nil, then this method reads
381
+ ## all data until EOF.
382
+ ##
383
+ ## When EOF is reached, this method returns nil if +length+ is given
384
+ ## and not nil, or "" if +length+ is not given or is nil.
385
+ ##
386
+ ## If +buffer+ is given, then the read data will be placed
387
+ ## into +buffer+ instead of a newly created String object.
388
+ def read(*args)
389
+ assert("rack.input#read called with too many arguments") {
390
+ args.size <= 2
391
+ }
392
+ if args.size >= 1
393
+ assert("rack.input#read called with non-integer and non-nil length") {
394
+ args.first.kind_of?(Integer) || args.first.nil?
395
+ }
396
+ assert("rack.input#read called with a negative length") {
397
+ args.first.nil? || args.first >= 0
398
+ }
399
+ end
400
+ if args.size >= 2
401
+ assert("rack.input#read called with non-String buffer") {
402
+ args[1].kind_of?(String)
403
+ }
404
+ end
405
+
406
+ v = @input.read(*args)
407
+
408
+ assert("rack.input#read didn't return nil or a String") {
409
+ v.nil? or v.kind_of? String
410
+ }
411
+ if args[0].nil?
412
+ assert("rack.input#read(nil) returned nil on EOF") {
413
+ !v.nil?
414
+ }
415
+ end
416
+
417
+ v
418
+ end
419
+
420
+ ## * +each+ must be called without arguments and only yield Strings.
421
+ def each(*args)
422
+ assert("rack.input#each called with arguments") { args.size == 0 }
423
+ @input.each { |line|
424
+ assert("rack.input#each didn't yield a String") {
425
+ line.kind_of? String
426
+ }
427
+ yield line
428
+ }
429
+ end
430
+
431
+ ## * +rewind+ must be called without arguments. It rewinds the input
432
+ ## stream back to the beginning. It must not raise Errno::ESPIPE:
433
+ ## that is, it may not be a pipe or a socket. Therefore, handler
434
+ ## developers must buffer the input data into some rewindable object
435
+ ## if the underlying input stream is not rewindable.
436
+ def rewind(*args)
437
+ assert("rack.input#rewind called with arguments") { args.size == 0 }
438
+ assert("rack.input#rewind raised Errno::ESPIPE") {
439
+ begin
440
+ @input.rewind
441
+ true
442
+ rescue Errno::ESPIPE
443
+ false
444
+ end
445
+ }
446
+ end
447
+
448
+ ## * +close+ must never be called on the input stream.
449
+ def close(*args)
450
+ assert("rack.input#close must not be called") { false }
451
+ end
452
+ end
453
+
454
+ ## === The Error Stream
455
+ def check_error(error)
456
+ ## The error stream must respond to +puts+, +write+ and +flush+.
457
+ [:puts, :write, :flush].each { |method|
458
+ assert("rack.error #{error} does not respond to ##{method}") {
459
+ error.respond_to? method
460
+ }
461
+ }
462
+ end
463
+
464
+ class ErrorWrapper
465
+ include Assertion
466
+
467
+ def initialize(error)
468
+ @error = error
469
+ end
470
+
471
+ ## * +puts+ must be called with a single argument that responds to +to_s+.
472
+ def puts(str)
473
+ @error.puts str
474
+ end
475
+
476
+ ## * +write+ must be called with a single argument that is a String.
477
+ def write(str)
478
+ assert("rack.errors#write not called with a String") { str.kind_of? String }
479
+ @error.write str
480
+ end
481
+
482
+ ## * +flush+ must be called without arguments and must be called
483
+ ## in order to make the error appear for sure.
484
+ def flush
485
+ @error.flush
486
+ end
487
+
488
+ ## * +close+ must never be called on the error stream.
489
+ def close(*args)
490
+ assert("rack.errors#close must not be called") { false }
491
+ end
492
+ end
493
+
494
+ class HijackWrapper
495
+ include Assertion
496
+ extend Forwardable
497
+
498
+ REQUIRED_METHODS = [
499
+ :read, :write, :read_nonblock, :write_nonblock, :flush, :close,
500
+ :close_read, :close_write, :closed?
501
+ ]
502
+
503
+ def_delegators :@io, *REQUIRED_METHODS
504
+
505
+ def initialize(io)
506
+ @io = io
507
+ REQUIRED_METHODS.each do |meth|
508
+ assert("rack.hijack_io must respond to #{meth}") { io.respond_to? meth }
509
+ end
510
+ end
511
+ end
512
+
513
+ ## === Hijacking
514
+ #
515
+ # AUTHORS: n.b. The trailing whitespace between paragraphs is important and
516
+ # should not be removed. The whitespace creates paragraphs in the RDoc
517
+ # output.
518
+ #
519
+ ## ==== Request (before status)
520
+ def check_hijack(env)
521
+ if env[RACK_IS_HIJACK]
522
+ ## If rack.hijack? is true then rack.hijack must respond to #call.
523
+ original_hijack = env[RACK_HIJACK]
524
+ assert("rack.hijack must respond to call") { original_hijack.respond_to?(:call) }
525
+ env[RACK_HIJACK] = proc do
526
+ ## rack.hijack must return the io that will also be assigned (or is
527
+ ## already present, in rack.hijack_io.
528
+ io = original_hijack.call
529
+ HijackWrapper.new(io)
530
+ ##
531
+ ## rack.hijack_io must respond to:
532
+ ## <tt>read, write, read_nonblock, write_nonblock, flush, close,
533
+ ## close_read, close_write, closed?</tt>
534
+ ##
535
+ ## The semantics of these IO methods must be a best effort match to
536
+ ## those of a normal ruby IO or Socket object, using standard
537
+ ## arguments and raising standard exceptions. Servers are encouraged
538
+ ## to simply pass on real IO objects, although it is recognized that
539
+ ## this approach is not directly compatible with SPDY and HTTP 2.0.
540
+ ##
541
+ ## IO provided in rack.hijack_io should preference the
542
+ ## IO::WaitReadable and IO::WaitWritable APIs wherever supported.
543
+ ##
544
+ ## There is a deliberate lack of full specification around
545
+ ## rack.hijack_io, as semantics will change from server to server.
546
+ ## Users are encouraged to utilize this API with a knowledge of their
547
+ ## server choice, and servers may extend the functionality of
548
+ ## hijack_io to provide additional features to users. The purpose of
549
+ ## rack.hijack is for Rack to "get out of the way", as such, Rack only
550
+ ## provides the minimum of specification and support.
551
+ env[RACK_HIJACK_IO] = HijackWrapper.new(env[RACK_HIJACK_IO])
552
+ io
553
+ end
554
+ else
555
+ ##
556
+ ## If rack.hijack? is false, then rack.hijack should not be set.
557
+ assert("rack.hijack? is false, but rack.hijack is present") { env[RACK_HIJACK].nil? }
558
+ ##
559
+ ## If rack.hijack? is false, then rack.hijack_io should not be set.
560
+ assert("rack.hijack? is false, but rack.hijack_io is present") { env[RACK_HIJACK_IO].nil? }
561
+ end
562
+ end
563
+
564
+ ## ==== Response (after headers)
565
+ ## It is also possible to hijack a response after the status and headers
566
+ ## have been sent.
567
+ def check_hijack_response(headers, env)
568
+
569
+ # this check uses headers like a hash, but the spec only requires
570
+ # headers respond to #each
571
+ headers = Rack::Utils::HeaderHash.new(headers)
572
+
573
+ ## In order to do this, an application may set the special header
574
+ ## <tt>rack.hijack</tt> to an object that responds to <tt>call</tt>
575
+ ## accepting an argument that conforms to the <tt>rack.hijack_io</tt>
576
+ ## protocol.
577
+ ##
578
+ ## After the headers have been sent, and this hijack callback has been
579
+ ## called, the application is now responsible for the remaining lifecycle
580
+ ## of the IO. The application is also responsible for maintaining HTTP
581
+ ## semantics. Of specific note, in almost all cases in the current SPEC,
582
+ ## applications will have wanted to specify the header Connection:close in
583
+ ## HTTP/1.1, and not Connection:keep-alive, as there is no protocol for
584
+ ## returning hijacked sockets to the web server. For that purpose, use the
585
+ ## body streaming API instead (progressively yielding strings via each).
586
+ ##
587
+ ## Servers must ignore the <tt>body</tt> part of the response tuple when
588
+ ## the <tt>rack.hijack</tt> response API is in use.
589
+
590
+ if env[RACK_IS_HIJACK] && headers[RACK_HIJACK]
591
+ assert('rack.hijack header must respond to #call') {
592
+ headers[RACK_HIJACK].respond_to? :call
593
+ }
594
+ original_hijack = headers[RACK_HIJACK]
595
+ headers[RACK_HIJACK] = proc do |io|
596
+ original_hijack.call HijackWrapper.new(io)
597
+ end
598
+ else
599
+ ##
600
+ ## The special response header <tt>rack.hijack</tt> must only be set
601
+ ## if the request env has <tt>rack.hijack?</tt> <tt>true</tt>.
602
+ assert('rack.hijack header must not be present if server does not support hijacking') {
603
+ headers[RACK_HIJACK].nil?
604
+ }
605
+ end
606
+ end
607
+ ## ==== Conventions
608
+ ## * Middleware should not use hijack unless it is handling the whole
609
+ ## response.
610
+ ## * Middleware may wrap the IO object for the response pattern.
611
+ ## * Middleware should not wrap the IO object for the request pattern. The
612
+ ## request pattern is intended to provide the hijacker with "raw tcp".
613
+
614
+ ## == The Response
615
+
616
+ ## === The Status
617
+ def check_status(status)
618
+ ## This is an HTTP status. When parsed as integer (+to_i+), it must be
619
+ ## greater than or equal to 100.
620
+ assert("Status must be >=100 seen as integer") { status.to_i >= 100 }
621
+ end
622
+
623
+ ## === The Headers
624
+ def check_headers(header)
625
+ ## The header must respond to +each+, and yield values of key and value.
626
+ assert("headers object should respond to #each, but doesn't (got #{header.class} as headers)") {
627
+ header.respond_to? :each
628
+ }
629
+ header.each { |key, value|
630
+ ## Special headers starting "rack." are for communicating with the
631
+ ## server, and must not be sent back to the client.
632
+ next if key =~ /^rack\..+$/
633
+
634
+ ## The header keys must be Strings.
635
+ assert("header key must be a string, was #{key.class}") {
636
+ key.kind_of? String
637
+ }
638
+ ## The header must not contain a +Status+ key.
639
+ assert("header must not contain Status") { key.downcase != "status" }
640
+ ## The header must conform to RFC7230 token specification, i.e. cannot
641
+ ## contain non-printable ASCII, DQUOTE or "(),/:;<=>?@[\]{}".
642
+ assert("invalid header name: #{key}") { key !~ /[\(\),\/:;<=>\?@\[\\\]{}[:cntrl:]]/ }
643
+
644
+ ## The values of the header must be Strings,
645
+ assert("a header value must be a String, but the value of " +
646
+ "'#{key}' is a #{value.class}") { value.kind_of? String }
647
+ ## consisting of lines (for multiple header values, e.g. multiple
648
+ ## <tt>Set-Cookie</tt> values) separated by "\\n".
649
+ value.split("\n").each { |item|
650
+ ## The lines must not contain characters below 037.
651
+ assert("invalid header value #{key}: #{item.inspect}") {
652
+ item !~ /[\000-\037]/
653
+ }
654
+ }
655
+ }
656
+ end
657
+
658
+ ## === The Content-Type
659
+ def check_content_type(status, headers)
660
+ headers.each { |key, value|
661
+ ## There must not be a <tt>Content-Type</tt>, when the +Status+ is 1xx,
662
+ ## 204 or 304.
663
+ if key.downcase == "content-type"
664
+ assert("Content-Type header found in #{status} response, not allowed") {
665
+ not Rack::Utils::STATUS_WITH_NO_ENTITY_BODY.include? status.to_i
666
+ }
667
+ return
668
+ end
669
+ }
670
+ end
671
+
672
+ ## === The Content-Length
673
+ def check_content_length(status, headers)
674
+ headers.each { |key, value|
675
+ if key.downcase == 'content-length'
676
+ ## There must not be a <tt>Content-Length</tt> header when the
677
+ ## +Status+ is 1xx, 204 or 304.
678
+ assert("Content-Length header found in #{status} response, not allowed") {
679
+ not Rack::Utils::STATUS_WITH_NO_ENTITY_BODY.include? status.to_i
680
+ }
681
+ @content_length = value
682
+ end
683
+ }
684
+ end
685
+
686
+ def verify_content_length(bytes)
687
+ if @head_request
688
+ assert("Response body was given for HEAD request, but should be empty") {
689
+ bytes == 0
690
+ }
691
+ elsif @content_length
692
+ assert("Content-Length header was #{@content_length}, but should be #{bytes}") {
693
+ @content_length == bytes.to_s
694
+ }
695
+ end
696
+ end
697
+
698
+ ## === The Body
699
+ def each
700
+ @closed = false
701
+ bytes = 0
702
+
703
+ ## The Body must respond to +each+
704
+ assert("Response body must respond to each") do
705
+ @body.respond_to?(:each)
706
+ end
707
+
708
+ @body.each { |part|
709
+ ## and must only yield String values.
710
+ assert("Body yielded non-string value #{part.inspect}") {
711
+ part.kind_of? String
712
+ }
713
+ bytes += part.bytesize
714
+ yield part
715
+ }
716
+ verify_content_length(bytes)
717
+
718
+ ##
719
+ ## The Body itself should not be an instance of String, as this will
720
+ ## break in Ruby 1.9.
721
+ ##
722
+ ## If the Body responds to +close+, it will be called after iteration. If
723
+ ## the body is replaced by a middleware after action, the original body
724
+ ## must be closed first, if it responds to close.
725
+ # XXX howto: assert("Body has not been closed") { @closed }
726
+
727
+
728
+ ##
729
+ ## If the Body responds to +to_path+, it must return a String
730
+ ## identifying the location of a file whose contents are identical
731
+ ## to that produced by calling +each+; this may be used by the
732
+ ## server as an alternative, possibly more efficient way to
733
+ ## transport the response.
734
+
735
+ if @body.respond_to?(:to_path)
736
+ assert("The file identified by body.to_path does not exist") {
737
+ ::File.exist? @body.to_path
738
+ }
739
+ end
740
+
741
+ ##
742
+ ## The Body commonly is an Array of Strings, the application
743
+ ## instance itself, or a File-like object.
744
+ end
745
+
746
+ def close
747
+ @closed = true
748
+ @body.close if @body.respond_to?(:close)
749
+ end
750
+
751
+ # :startdoc:
752
+
753
+ end
754
+ end
755
+
756
+ ## == Thanks
757
+ ## Some parts of this specification are adopted from PEP333: Python
758
+ ## Web Server Gateway Interface
759
+ ## v1.0 (http://www.python.org/dev/peps/pep-0333/). I'd like to thank
760
+ ## everyone involved in that effort.