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,134 @@
1
+ require 'concurrent/errors'
2
+ require 'concurrent/executor/executor_service'
3
+ require 'concurrent/synchronization'
4
+ require 'concurrent/utility/at_exit'
5
+
6
+ module Concurrent
7
+
8
+ # @!macro abstract_executor_service_public_api
9
+ # @!visibility private
10
+ class AbstractExecutorService < Synchronization::LockableObject
11
+ include ExecutorService
12
+
13
+ # The set of possible fallback policies that may be set at thread pool creation.
14
+ FALLBACK_POLICIES = [:abort, :discard, :caller_runs].freeze
15
+
16
+ # @!macro executor_service_attr_reader_fallback_policy
17
+ attr_reader :fallback_policy
18
+
19
+ # Create a new thread pool.
20
+ def initialize(*args, &block)
21
+ super(&nil)
22
+ synchronize { ns_initialize(*args, &block) }
23
+ end
24
+
25
+ # @!macro executor_service_method_shutdown
26
+ def shutdown
27
+ raise NotImplementedError
28
+ end
29
+
30
+ # @!macro executor_service_method_kill
31
+ def kill
32
+ raise NotImplementedError
33
+ end
34
+
35
+ # @!macro executor_service_method_wait_for_termination
36
+ def wait_for_termination(timeout = nil)
37
+ raise NotImplementedError
38
+ end
39
+
40
+ # @!macro executor_service_method_running_question
41
+ def running?
42
+ synchronize { ns_running? }
43
+ end
44
+
45
+ # @!macro executor_service_method_shuttingdown_question
46
+ def shuttingdown?
47
+ synchronize { ns_shuttingdown? }
48
+ end
49
+
50
+ # @!macro executor_service_method_shutdown_question
51
+ def shutdown?
52
+ synchronize { ns_shutdown? }
53
+ end
54
+
55
+ # @!macro executor_service_method_auto_terminate_question
56
+ def auto_terminate?
57
+ synchronize { ns_auto_terminate? }
58
+ end
59
+
60
+ # @!macro executor_service_method_auto_terminate_setter
61
+ def auto_terminate=(value)
62
+ synchronize { self.ns_auto_terminate = value }
63
+ end
64
+
65
+ private
66
+
67
+ # Handler which executes the `fallback_policy` once the queue size
68
+ # reaches `max_queue`.
69
+ #
70
+ # @param [Array] args the arguments to the task which is being handled.
71
+ #
72
+ # @!visibility private
73
+ def handle_fallback(*args)
74
+ case fallback_policy
75
+ when :abort
76
+ raise RejectedExecutionError
77
+ when :discard
78
+ false
79
+ when :caller_runs
80
+ begin
81
+ yield(*args)
82
+ rescue => ex
83
+ # let it fail
84
+ log DEBUG, ex
85
+ end
86
+ true
87
+ else
88
+ fail "Unknown fallback policy #{fallback_policy}"
89
+ end
90
+ end
91
+
92
+ def ns_execute(*args, &task)
93
+ raise NotImplementedError
94
+ end
95
+
96
+ # @!macro [attach] executor_service_method_ns_shutdown_execution
97
+ #
98
+ # Callback method called when an orderly shutdown has completed.
99
+ # The default behavior is to signal all waiting threads.
100
+ def ns_shutdown_execution
101
+ # do nothing
102
+ end
103
+
104
+ # @!macro [attach] executor_service_method_ns_kill_execution
105
+ #
106
+ # Callback method called when the executor has been killed.
107
+ # The default behavior is to do nothing.
108
+ def ns_kill_execution
109
+ # do nothing
110
+ end
111
+
112
+ def ns_auto_terminate?
113
+ !!@auto_terminate
114
+ end
115
+
116
+ def ns_auto_terminate=(value)
117
+ case value
118
+ when true
119
+ AtExit.add(self) { terminate_at_exit }
120
+ @auto_terminate = true
121
+ when false
122
+ AtExit.delete(self)
123
+ @auto_terminate = false
124
+ else
125
+ raise ArgumentError
126
+ end
127
+ end
128
+
129
+ def terminate_at_exit
130
+ kill # TODO be gentle first
131
+ wait_for_termination(10)
132
+ end
133
+ end
134
+ end
@@ -0,0 +1,62 @@
1
+ require 'concurrent/utility/engine'
2
+ require 'concurrent/executor/thread_pool_executor'
3
+
4
+ module Concurrent
5
+
6
+ # A thread pool that dynamically grows and shrinks to fit the current workload.
7
+ # New threads are created as needed, existing threads are reused, and threads
8
+ # that remain idle for too long are killed and removed from the pool. These
9
+ # pools are particularly suited to applications that perform a high volume of
10
+ # short-lived tasks.
11
+ #
12
+ # On creation a `CachedThreadPool` has zero running threads. New threads are
13
+ # created on the pool as new operations are `#post`. The size of the pool
14
+ # will grow until `#max_length` threads are in the pool or until the number
15
+ # of threads exceeds the number of running and pending operations. When a new
16
+ # operation is post to the pool the first available idle thread will be tasked
17
+ # with the new operation.
18
+ #
19
+ # Should a thread crash for any reason the thread will immediately be removed
20
+ # from the pool. Similarly, threads which remain idle for an extended period
21
+ # of time will be killed and reclaimed. Thus these thread pools are very
22
+ # efficient at reclaiming unused resources.
23
+ #
24
+ # The API and behavior of this class are based on Java's `CachedThreadPool`
25
+ #
26
+ # @!macro thread_pool_options
27
+ class CachedThreadPool < ThreadPoolExecutor
28
+
29
+ # @!macro [attach] cached_thread_pool_method_initialize
30
+ #
31
+ # Create a new thread pool.
32
+ #
33
+ # @param [Hash] opts the options defining pool behavior.
34
+ # @option opts [Symbol] :fallback_policy (`:abort`) the fallback policy
35
+ #
36
+ # @raise [ArgumentError] if `fallback_policy` is not a known policy
37
+ #
38
+ # @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Executors.html#newCachedThreadPool--
39
+ def initialize(opts = {})
40
+ defaults = { idletime: DEFAULT_THREAD_IDLETIMEOUT }
41
+ overrides = { min_threads: 0,
42
+ max_threads: DEFAULT_MAX_POOL_SIZE,
43
+ max_queue: DEFAULT_MAX_QUEUE_SIZE }
44
+ super(defaults.merge(opts).merge(overrides))
45
+ end
46
+
47
+ private
48
+
49
+ # @!macro cached_thread_pool_method_initialize
50
+ # @!visibility private
51
+ def ns_initialize(opts)
52
+ super(opts)
53
+ if Concurrent.on_jruby?
54
+ @max_queue = 0
55
+ @executor = java.util.concurrent.Executors.newCachedThreadPool
56
+ @executor.setRejectedExecutionHandler(FALLBACK_POLICY_CLASSES[@fallback_policy].new)
57
+ @executor.setKeepAliveTime(opts.fetch(:idletime, DEFAULT_THREAD_IDLETIMEOUT), java.util.concurrent.TimeUnit::SECONDS)
58
+ self.auto_terminate = opts.fetch(:auto_terminate, true)
59
+ end
60
+ end
61
+ end
62
+ end
@@ -0,0 +1,185 @@
1
+ require 'concurrent/concern/logging'
2
+
3
+ module Concurrent
4
+
5
+ ###################################################################
6
+
7
+ # @!macro [new] executor_service_method_post
8
+ #
9
+ # Submit a task to the executor for asynchronous processing.
10
+ #
11
+ # @param [Array] args zero or more arguments to be passed to the task
12
+ #
13
+ # @yield the asynchronous task to perform
14
+ #
15
+ # @return [Boolean] `true` if the task is queued, `false` if the executor
16
+ # is not running
17
+ #
18
+ # @raise [ArgumentError] if no task is given
19
+
20
+ # @!macro [new] executor_service_method_left_shift
21
+ #
22
+ # Submit a task to the executor for asynchronous processing.
23
+ #
24
+ # @param [Proc] task the asynchronous task to perform
25
+ #
26
+ # @return [self] returns itself
27
+
28
+ # @!macro [new] executor_service_method_can_overflow_question
29
+ #
30
+ # Does the task queue have a maximum size?
31
+ #
32
+ # @return [Boolean] True if the task queue has a maximum size else false.
33
+
34
+ # @!macro [new] executor_service_method_serialized_question
35
+ #
36
+ # Does this executor guarantee serialization of its operations?
37
+ #
38
+ # @return [Boolean] True if the executor guarantees that all operations
39
+ # will be post in the order they are received and no two operations may
40
+ # occur simultaneously. Else false.
41
+
42
+ ###################################################################
43
+
44
+ # @!macro [new] executor_service_public_api
45
+ #
46
+ # @!method post(*args, &task)
47
+ # @!macro executor_service_method_post
48
+ #
49
+ # @!method <<(task)
50
+ # @!macro executor_service_method_left_shift
51
+ #
52
+ # @!method can_overflow?
53
+ # @!macro executor_service_method_can_overflow_question
54
+ #
55
+ # @!method serialized?
56
+ # @!macro executor_service_method_serialized_question
57
+
58
+ ###################################################################
59
+
60
+ # @!macro [new] executor_service_attr_reader_fallback_policy
61
+ # @return [Symbol] The fallback policy in effect. Either `:abort`, `:discard`, or `:caller_runs`.
62
+
63
+ # @!macro [new] executor_service_method_shutdown
64
+ #
65
+ # Begin an orderly shutdown. Tasks already in the queue will be executed,
66
+ # but no new tasks will be accepted. Has no additional effect if the
67
+ # thread pool is not running.
68
+
69
+ # @!macro [new] executor_service_method_kill
70
+ #
71
+ # Begin an immediate shutdown. In-progress tasks will be allowed to
72
+ # complete but enqueued tasks will be dismissed and no new tasks
73
+ # will be accepted. Has no additional effect if the thread pool is
74
+ # not running.
75
+
76
+ # @!macro [new] executor_service_method_wait_for_termination
77
+ #
78
+ # Block until executor shutdown is complete or until `timeout` seconds have
79
+ # passed.
80
+ #
81
+ # @note Does not initiate shutdown or termination. Either `shutdown` or `kill`
82
+ # must be called before this method (or on another thread).
83
+ #
84
+ # @param [Integer] timeout the maximum number of seconds to wait for shutdown to complete
85
+ #
86
+ # @return [Boolean] `true` if shutdown complete or false on `timeout`
87
+
88
+ # @!macro [new] executor_service_method_running_question
89
+ #
90
+ # Is the executor running?
91
+ #
92
+ # @return [Boolean] `true` when running, `false` when shutting down or shutdown
93
+
94
+ # @!macro [new] executor_service_method_shuttingdown_question
95
+ #
96
+ # Is the executor shuttingdown?
97
+ #
98
+ # @return [Boolean] `true` when not running and not shutdown, else `false`
99
+
100
+ # @!macro [new] executor_service_method_shutdown_question
101
+ #
102
+ # Is the executor shutdown?
103
+ #
104
+ # @return [Boolean] `true` when shutdown, `false` when shutting down or running
105
+
106
+ # @!macro [new] executor_service_method_auto_terminate_question
107
+ #
108
+ # Is the executor auto-terminate when the application exits?
109
+ #
110
+ # @return [Boolean] `true` when auto-termination is enabled else `false`.
111
+
112
+ # @!macro [new] executor_service_method_auto_terminate_setter
113
+ #
114
+ # Set the auto-terminate behavior for this executor.
115
+ #
116
+ # @param [Boolean] value The new auto-terminate value to set for this executor.
117
+ #
118
+ # @return [Boolean] `true` when auto-termination is enabled else `false`.
119
+
120
+ ###################################################################
121
+
122
+ # @!macro [new] abstract_executor_service_public_api
123
+ #
124
+ # @!macro executor_service_public_api
125
+ #
126
+ # @!attribute [r] fallback_policy
127
+ # @!macro executor_service_attr_reader_fallback_policy
128
+ #
129
+ # @!method shutdown
130
+ # @!macro executor_service_method_shutdown
131
+ #
132
+ # @!method kill
133
+ # @!macro executor_service_method_kill
134
+ #
135
+ # @!method wait_for_termination(timeout = nil)
136
+ # @!macro executor_service_method_wait_for_termination
137
+ #
138
+ # @!method running?
139
+ # @!macro executor_service_method_running_question
140
+ #
141
+ # @!method shuttingdown?
142
+ # @!macro executor_service_method_shuttingdown_question
143
+ #
144
+ # @!method shutdown?
145
+ # @!macro executor_service_method_shutdown_question
146
+ #
147
+ # @!method auto_terminate?
148
+ # @!macro executor_service_method_auto_terminate_question
149
+ #
150
+ # @!method auto_terminate=(value)
151
+ # @!macro executor_service_method_auto_terminate_setter
152
+
153
+ ###################################################################
154
+
155
+ # @!macro executor_service_public_api
156
+ # @!visibility private
157
+ module ExecutorService
158
+ include Concern::Logging
159
+
160
+ # @!macro executor_service_method_post
161
+ def post(*args, &task)
162
+ raise NotImplementedError
163
+ end
164
+
165
+ # @!macro executor_service_method_left_shift
166
+ def <<(task)
167
+ post(&task)
168
+ self
169
+ end
170
+
171
+ # @!macro executor_service_method_can_overflow_question
172
+ #
173
+ # @note Always returns `false`
174
+ def can_overflow?
175
+ false
176
+ end
177
+
178
+ # @!macro executor_service_method_serialized_question
179
+ #
180
+ # @note Always returns `false`
181
+ def serialized?
182
+ false
183
+ end
184
+ end
185
+ end
@@ -0,0 +1,206 @@
1
+ require 'concurrent/utility/engine'
2
+ require 'concurrent/executor/thread_pool_executor'
3
+
4
+ module Concurrent
5
+
6
+ # @!macro [new] thread_pool_executor_constant_default_max_pool_size
7
+ # Default maximum number of threads that will be created in the pool.
8
+
9
+ # @!macro [new] thread_pool_executor_constant_default_min_pool_size
10
+ # Default minimum number of threads that will be retained in the pool.
11
+
12
+ # @!macro [new] thread_pool_executor_constant_default_max_queue_size
13
+ # Default maximum number of tasks that may be added to the task queue.
14
+
15
+ # @!macro [new] thread_pool_executor_constant_default_thread_timeout
16
+ # Default maximum number of seconds a thread in the pool may remain idle
17
+ # before being reclaimed.
18
+
19
+ # @!macro [new] thread_pool_executor_attr_reader_max_length
20
+ # The maximum number of threads that may be created in the pool.
21
+ # @return [Integer] The maximum number of threads that may be created in the pool.
22
+
23
+ # @!macro [new] thread_pool_executor_attr_reader_min_length
24
+ # The minimum number of threads that may be retained in the pool.
25
+ # @return [Integer] The minimum number of threads that may be retained in the pool.
26
+
27
+ # @!macro [new] thread_pool_executor_attr_reader_largest_length
28
+ # The largest number of threads that have been created in the pool since construction.
29
+ # @return [Integer] The largest number of threads that have been created in the pool since construction.
30
+
31
+ # @!macro [new] thread_pool_executor_attr_reader_scheduled_task_count
32
+ # The number of tasks that have been scheduled for execution on the pool since construction.
33
+ # @return [Integer] The number of tasks that have been scheduled for execution on the pool since construction.
34
+
35
+ # @!macro [new] thread_pool_executor_attr_reader_completed_task_count
36
+ # The number of tasks that have been completed by the pool since construction.
37
+ # @return [Integer] The number of tasks that have been completed by the pool since construction.
38
+
39
+ # @!macro [new] thread_pool_executor_attr_reader_idletime
40
+ # The number of seconds that a thread may be idle before being reclaimed.
41
+ # @return [Integer] The number of seconds that a thread may be idle before being reclaimed.
42
+
43
+ # @!macro [new] thread_pool_executor_attr_reader_max_queue
44
+ # The maximum number of tasks that may be waiting in the work queue at any one time.
45
+ # When the queue size reaches `max_queue` subsequent tasks will be rejected in
46
+ # accordance with the configured `fallback_policy`.
47
+ #
48
+ # @return [Integer] The maximum number of tasks that may be waiting in the work queue at any one time.
49
+ # When the queue size reaches `max_queue` subsequent tasks will be rejected in
50
+ # accordance with the configured `fallback_policy`.
51
+
52
+ # @!macro [new] thread_pool_executor_attr_reader_length
53
+ # The number of threads currently in the pool.
54
+ # @return [Integer] The number of threads currently in the pool.
55
+
56
+ # @!macro [new] thread_pool_executor_attr_reader_queue_length
57
+ # The number of tasks in the queue awaiting execution.
58
+ # @return [Integer] The number of tasks in the queue awaiting execution.
59
+
60
+ # @!macro [new] thread_pool_executor_attr_reader_remaining_capacity
61
+ # Number of tasks that may be enqueued before reaching `max_queue` and rejecting
62
+ # new tasks. A value of -1 indicates that the queue may grow without bound.
63
+ #
64
+ # @return [Integer] Number of tasks that may be enqueued before reaching `max_queue` and rejecting
65
+ # new tasks. A value of -1 indicates that the queue may grow without bound.
66
+
67
+
68
+
69
+
70
+
71
+ # @!macro [new] thread_pool_executor_public_api
72
+ #
73
+ # @!macro abstract_executor_service_public_api
74
+ #
75
+ # @!attribute [r] max_length
76
+ # @!macro thread_pool_executor_attr_reader_max_length
77
+ #
78
+ # @!attribute [r] min_length
79
+ # @!macro thread_pool_executor_attr_reader_min_length
80
+ #
81
+ # @!attribute [r] largest_length
82
+ # @!macro thread_pool_executor_attr_reader_largest_length
83
+ #
84
+ # @!attribute [r] scheduled_task_count
85
+ # @!macro thread_pool_executor_attr_reader_scheduled_task_count
86
+ #
87
+ # @!attribute [r] completed_task_count
88
+ # @!macro thread_pool_executor_attr_reader_completed_task_count
89
+ #
90
+ # @!attribute [r] idletime
91
+ # @!macro thread_pool_executor_attr_reader_idletime
92
+ #
93
+ # @!attribute [r] max_queue
94
+ # @!macro thread_pool_executor_attr_reader_max_queue
95
+ #
96
+ # @!attribute [r] length
97
+ # @!macro thread_pool_executor_attr_reader_length
98
+ #
99
+ # @!attribute [r] queue_length
100
+ # @!macro thread_pool_executor_attr_reader_queue_length
101
+ #
102
+ # @!attribute [r] remaining_capacity
103
+ # @!macro thread_pool_executor_attr_reader_remaining_capacity
104
+ #
105
+ # @!method can_overflow?
106
+ # @!macro executor_service_method_can_overflow_question
107
+
108
+
109
+
110
+
111
+ # @!macro [new] thread_pool_options
112
+ #
113
+ # **Thread Pool Options**
114
+ #
115
+ # Thread pools support several configuration options:
116
+ #
117
+ # * `idletime`: The number of seconds that a thread may be idle before being reclaimed.
118
+ # * `max_queue`: The maximum number of tasks that may be waiting in the work queue at
119
+ # any one time. When the queue size reaches `max_queue` and no new threads can be created,
120
+ # subsequent tasks will be rejected in accordance with the configured `fallback_policy`.
121
+ # * `auto_terminate`: When true (default) an `at_exit` handler will be registered which
122
+ # will stop the thread pool when the application exits. See below for more information
123
+ # on shutting down thread pools.
124
+ # * `fallback_policy`: The policy defining how rejected tasks are handled.
125
+ #
126
+ # Three fallback policies are supported:
127
+ #
128
+ # * `:abort`: Raise a `RejectedExecutionError` exception and discard the task.
129
+ # * `:discard`: Discard the task and return false.
130
+ # * `:caller_runs`: Execute the task on the calling thread.
131
+ #
132
+ # **Shutting Down Thread Pools**
133
+ #
134
+ # Killing a thread pool while tasks are still being processed, either by calling
135
+ # the `#kill` method or at application exit, will have unpredictable results. There
136
+ # is no way for the thread pool to know what resources are being used by the
137
+ # in-progress tasks. When those tasks are killed the impact on those resources
138
+ # cannot be predicted. The *best* practice is to explicitly shutdown all thread
139
+ # pools using the provided methods:
140
+ #
141
+ # * Call `#shutdown` to initiate an orderly termination of all in-progress tasks
142
+ # * Call `#wait_for_termination` with an appropriate timeout interval an allow
143
+ # the orderly shutdown to complete
144
+ # * Call `#kill` *only when* the thread pool fails to shutdown in the allotted time
145
+ #
146
+ # On some runtime platforms (most notably the JVM) the application will not
147
+ # exit until all thread pools have been shutdown. To prevent applications from
148
+ # "hanging" on exit all thread pools include an `at_exit` handler that will
149
+ # stop the thread pool when the application exits. This handler uses a brute
150
+ # force method to stop the pool and makes no guarantees regarding resources being
151
+ # used by any tasks still running. Registration of this `at_exit` handler can be
152
+ # prevented by setting the thread pool's constructor `:auto_terminate` option to
153
+ # `false` when the thread pool is created. All thread pools support this option.
154
+ #
155
+ # ```ruby
156
+ # pool1 = Concurrent::FixedThreadPool.new(5) # an `at_exit` handler will be registered
157
+ # pool2 = Concurrent::FixedThreadPool.new(5, auto_terminate: false) # prevent `at_exit` handler registration
158
+ # ```
159
+ #
160
+ # @note Failure to properly shutdown a thread pool can lead to unpredictable results.
161
+ # Please read *Shutting Down Thread Pools* for more information.
162
+ #
163
+ # @see http://docs.oracle.com/javase/tutorial/essential/concurrency/pools.html Java Tutorials: Thread Pools
164
+ # @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Executors.html Java Executors class
165
+ # @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ExecutorService.html Java ExecutorService interface
166
+ # @see http://ruby-doc.org//core-2.2.0/Kernel.html#method-i-at_exit Kernel#at_exit
167
+
168
+
169
+
170
+
171
+
172
+ # @!macro [attach] fixed_thread_pool
173
+ #
174
+ # A thread pool that reuses a fixed number of threads operating off an unbounded queue.
175
+ # At any point, at most `num_threads` will be active processing tasks. When all threads are busy new
176
+ # tasks `#post` to the thread pool are enqueued until a thread becomes available.
177
+ # Should a thread crash for any reason the thread will immediately be removed
178
+ # from the pool and replaced.
179
+ #
180
+ # The API and behavior of this class are based on Java's `FixedThreadPool`
181
+ #
182
+ # @!macro thread_pool_options
183
+ class FixedThreadPool < ThreadPoolExecutor
184
+
185
+ # @!macro [attach] fixed_thread_pool_method_initialize
186
+ #
187
+ # Create a new thread pool.
188
+ #
189
+ # @param [Integer] num_threads the number of threads to allocate
190
+ # @param [Hash] opts the options defining pool behavior.
191
+ # @option opts [Symbol] :fallback_policy (`:abort`) the fallback policy
192
+ #
193
+ # @raise [ArgumentError] if `num_threads` is less than or equal to zero
194
+ # @raise [ArgumentError] if `fallback_policy` is not a known policy
195
+ #
196
+ # @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Executors.html#newFixedThreadPool-int-
197
+ def initialize(num_threads, opts = {})
198
+ raise ArgumentError.new('number of threads must be greater than zero') if num_threads.to_i < 1
199
+ defaults = { max_queue: DEFAULT_MAX_QUEUE_SIZE,
200
+ idletime: DEFAULT_THREAD_IDLETIMEOUT }
201
+ overrides = { min_threads: num_threads,
202
+ max_threads: num_threads }
203
+ super(defaults.merge(opts).merge(overrides))
204
+ end
205
+ end
206
+ end
@@ -0,0 +1,66 @@
1
+ require 'concurrent/atomic/event'
2
+ require 'concurrent/executor/abstract_executor_service'
3
+ require 'concurrent/executor/serial_executor_service'
4
+
5
+ module Concurrent
6
+
7
+ # An executor service which runs all operations on the current thread,
8
+ # blocking as necessary. Operations are performed in the order they are
9
+ # received and no two operations can be performed simultaneously.
10
+ #
11
+ # This executor service exists mainly for testing an debugging. When used
12
+ # it immediately runs every `#post` operation on the current thread, blocking
13
+ # that thread until the operation is complete. This can be very beneficial
14
+ # during testing because it makes all operations deterministic.
15
+ #
16
+ # @note Intended for use primarily in testing and debugging.
17
+ class ImmediateExecutor < AbstractExecutorService
18
+ include SerialExecutorService
19
+
20
+ # Creates a new executor
21
+ def initialize
22
+ @stopped = Concurrent::Event.new
23
+ end
24
+
25
+ # @!macro executor_service_method_post
26
+ def post(*args, &task)
27
+ raise ArgumentError.new('no block given') unless block_given?
28
+ return false unless running?
29
+ task.call(*args)
30
+ true
31
+ end
32
+
33
+ # @!macro executor_service_method_left_shift
34
+ def <<(task)
35
+ post(&task)
36
+ self
37
+ end
38
+
39
+ # @!macro executor_service_method_running_question
40
+ def running?
41
+ ! shutdown?
42
+ end
43
+
44
+ # @!macro executor_service_method_shuttingdown_question
45
+ def shuttingdown?
46
+ false
47
+ end
48
+
49
+ # @!macro executor_service_method_shutdown_question
50
+ def shutdown?
51
+ @stopped.set?
52
+ end
53
+
54
+ # @!macro executor_service_method_shutdown
55
+ def shutdown
56
+ @stopped.set
57
+ true
58
+ end
59
+ alias_method :kill, :shutdown
60
+
61
+ # @!macro executor_service_method_wait_for_termination
62
+ def wait_for_termination(timeout = nil)
63
+ @stopped.wait(timeout)
64
+ end
65
+ end
66
+ end
@@ -0,0 +1,44 @@
1
+ require 'concurrent/executor/immediate_executor'
2
+ require 'concurrent/executor/simple_executor_service'
3
+
4
+ module Concurrent
5
+ # An executor service which runs all operations on a new thread, blocking
6
+ # until it completes. Operations are performed in the order they are received
7
+ # and no two operations can be performed simultaneously.
8
+ #
9
+ # This executor service exists mainly for testing an debugging. When used it
10
+ # immediately runs every `#post` operation on a new thread, blocking the
11
+ # current thread until the operation is complete. This is similar to how the
12
+ # ImmediateExecutor works, but the operation has the full stack of the new
13
+ # thread at its disposal. This can be helpful when the operations will spawn
14
+ # more operations on the same executor and so on - such a situation might
15
+ # overflow the single stack in case of an ImmediateExecutor, which is
16
+ # inconsistent with how it would behave for a threaded executor.
17
+ #
18
+ # @note Intended for use primarily in testing and debugging.
19
+ class IndirectImmediateExecutor < ImmediateExecutor
20
+ # Creates a new executor
21
+ def initialize
22
+ super
23
+ @internal_executor = SimpleExecutorService.new
24
+ end
25
+
26
+ # @!macro executor_service_method_post
27
+ def post(*args, &task)
28
+ raise ArgumentError.new("no block given") unless block_given?
29
+ return false unless running?
30
+
31
+ event = Concurrent::Event.new
32
+ @internal_executor.post do
33
+ begin
34
+ task.call(*args)
35
+ ensure
36
+ event.set
37
+ end
38
+ end
39
+ event.wait
40
+
41
+ true
42
+ end
43
+ end
44
+ end