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.
- checksums.yaml +7 -0
- data/.gitignore +8 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +26 -0
- data/README.md +35 -0
- data/Rakefile +2 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/sprokovuln/version.rb +3 -0
- data/lib/sprokovuln.rb +5 -0
- data/sprokovuln.gemspec +26 -0
- data/vendor/ruby/bin/rackup +27 -0
- data/vendor/ruby/bin/rake +27 -0
- data/vendor/ruby/bin/sprockets +27 -0
- data/vendor/ruby/cache/concurrent-ruby-1.0.5.gem +0 -0
- data/vendor/ruby/cache/rack-2.0.5.gem +0 -0
- data/vendor/ruby/cache/rake-10.5.0.gem +0 -0
- data/vendor/ruby/cache/sprockets-3.7.1.gem +0 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/CHANGELOG.md +387 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/LICENSE.txt +21 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/README.md +247 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/agent.rb +587 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/array.rb +39 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/async.rb +445 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atom.rb +222 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/abstract_thread_local_var.rb +66 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/atomic_boolean.rb +122 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/atomic_fixnum.rb +139 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/atomic_reference.rb +51 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/count_down_latch.rb +100 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/cyclic_barrier.rb +128 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/event.rb +109 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/java_count_down_latch.rb +39 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/java_thread_local_var.rb +37 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/mutex_atomic_boolean.rb +60 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/mutex_atomic_fixnum.rb +75 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/mutex_count_down_latch.rb +43 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/mutex_semaphore.rb +115 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/read_write_lock.rb +253 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/reentrant_read_write_lock.rb +377 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/ruby_thread_local_var.rb +161 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/semaphore.rb +145 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic/thread_local_var.rb +104 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic_reference/concurrent_update_error.rb +8 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic_reference/direct_update.rb +81 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic_reference/jruby+truffle.rb +2 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic_reference/jruby.rb +16 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic_reference/mutex_atomic.rb +61 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic_reference/numeric_cas_wrapper.rb +28 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic_reference/rbx.rb +22 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atomic_reference/ruby.rb +32 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/atomics.rb +53 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/collection/copy_on_notify_observer_set.rb +107 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/collection/copy_on_write_observer_set.rb +111 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/collection/java_non_concurrent_priority_queue.rb +84 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/collection/map/atomic_reference_map_backend.rb +927 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/collection/map/mri_map_backend.rb +66 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/collection/map/non_concurrent_map_backend.rb +141 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/collection/map/synchronized_map_backend.rb +82 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/collection/non_concurrent_priority_queue.rb +143 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/collection/ruby_non_concurrent_priority_queue.rb +150 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/concern/deprecation.rb +34 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/concern/dereferenceable.rb +73 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/concern/logging.rb +27 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/concern/obligation.rb +220 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/concern/observable.rb +110 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/configuration.rb +188 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/constants.rb +8 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/dataflow.rb +80 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/delay.rb +197 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/edge.rb +26 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/errors.rb +69 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/exchanger.rb +356 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/abstract_executor_service.rb +134 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/cached_thread_pool.rb +62 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/executor_service.rb +185 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/fixed_thread_pool.rb +206 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/immediate_executor.rb +66 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/indirect_immediate_executor.rb +44 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/java_executor_service.rb +100 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/java_single_thread_executor.rb +29 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/java_thread_pool_executor.rb +120 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/ruby_executor_service.rb +78 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/ruby_single_thread_executor.rb +22 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/ruby_thread_pool_executor.rb +362 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/safe_task_executor.rb +35 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/serial_executor_service.rb +34 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/serialized_execution.rb +107 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/serialized_execution_delegator.rb +28 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/simple_executor_service.rb +100 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/single_thread_executor.rb +56 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/thread_pool_executor.rb +87 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/executor/timer_set.rb +175 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/executors.rb +20 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/future.rb +138 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/hash.rb +36 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/immutable_struct.rb +93 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/ivar.rb +208 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/lazy_register.rb +81 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/map.rb +240 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/maybe.rb +229 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/mutable_struct.rb +228 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/mvar.rb +242 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/options.rb +42 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/promise.rb +547 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/scheduled_task.rb +318 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/settable_struct.rb +128 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/abstract_lockable_object.rb +98 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/abstract_object.rb +24 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/abstract_struct.rb +157 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/condition.rb +58 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/jruby_lockable_object.rb +13 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/jruby_object.rb +44 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/lock.rb +34 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/lockable_object.rb +74 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/mri_lockable_object.rb +71 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/mri_object.rb +43 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/object.rb +153 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/rbx_lockable_object.rb +65 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/rbx_object.rb +48 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/truffle_lockable_object.rb +9 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/truffle_object.rb +31 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization/volatile.rb +34 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/synchronization.rb +31 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/thread_safe/synchronized_delegator.rb +50 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/thread_safe/util/adder.rb +74 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/thread_safe/util/array_hash_rbx.rb +30 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/thread_safe/util/cheap_lockable.rb +118 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/thread_safe/util/power_of_two_tuple.rb +38 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/thread_safe/util/striped64.rb +241 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/thread_safe/util/volatile.rb +75 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/thread_safe/util/xor_shift_random.rb +50 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/thread_safe/util.rb +16 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/timer_task.rb +331 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/tuple.rb +86 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/tvar.rb +258 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/utility/at_exit.rb +97 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/utility/engine.rb +56 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/utility/monotonic_time.rb +58 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/utility/native_extension_loader.rb +73 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/utility/native_integer.rb +53 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/utility/processor_counter.rb +160 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent/version.rb +4 -0
- data/vendor/ruby/gems/concurrent-ruby-1.0.5/lib/concurrent.rb +130 -0
- data/vendor/ruby/gems/rack-2.0.5/COPYING +18 -0
- data/vendor/ruby/gems/rack-2.0.5/HISTORY.md +505 -0
- data/vendor/ruby/gems/rack-2.0.5/README.rdoc +302 -0
- data/vendor/ruby/gems/rack-2.0.5/Rakefile +116 -0
- data/vendor/ruby/gems/rack-2.0.5/SPEC +263 -0
- data/vendor/ruby/gems/rack-2.0.5/bin/rackup +4 -0
- data/vendor/ruby/gems/rack-2.0.5/contrib/rack.png +0 -0
- data/vendor/ruby/gems/rack-2.0.5/contrib/rack.svg +150 -0
- data/vendor/ruby/gems/rack-2.0.5/contrib/rack_logo.svg +164 -0
- data/vendor/ruby/gems/rack-2.0.5/contrib/rdoc.css +412 -0
- data/vendor/ruby/gems/rack-2.0.5/example/lobster.ru +4 -0
- data/vendor/ruby/gems/rack-2.0.5/example/protectedlobster.rb +14 -0
- data/vendor/ruby/gems/rack-2.0.5/example/protectedlobster.ru +8 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/auth/abstract/handler.rb +37 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/auth/abstract/request.rb +47 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/auth/basic.rb +58 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/auth/digest/md5.rb +129 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/auth/digest/nonce.rb +51 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/auth/digest/params.rb +52 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/auth/digest/request.rb +41 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/body_proxy.rb +44 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/builder.rb +164 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/cascade.rb +52 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/chunked.rb +69 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/common_logger.rb +72 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/conditional_get.rb +79 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/config.rb +20 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/content_length.rb +37 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/content_type.rb +29 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/deflater.rb +119 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/directory.rb +179 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/etag.rb +74 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/events.rb +154 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/file.rb +176 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/handler/cgi.rb +60 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/handler/fastcgi.rb +100 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/handler/lsws.rb +61 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/handler/scgi.rb +70 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/handler/thin.rb +36 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/handler/webrick.rb +120 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/handler.rb +99 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/head.rb +25 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/lint.rb +760 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/lobster.rb +70 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/lock.rb +31 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/logger.rb +18 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/media_type.rb +38 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/method_override.rb +50 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/mime.rb +677 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/mock.rb +196 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/multipart/generator.rb +93 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/multipart/parser.rb +369 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/multipart/uploaded_file.rb +33 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/multipart.rb +63 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/null_logger.rb +37 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/query_parser.rb +192 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/recursive.rb +62 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/reloader.rb +110 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/request.rb +487 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/response.rb +235 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/rewindable_input.rb +93 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/runtime.rb +32 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/sendfile.rb +158 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/server.rb +395 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/session/abstract/id.rb +445 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/session/cookie.rb +195 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/session/memcache.rb +93 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/session/pool.rb +76 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/show_exceptions.rb +386 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/show_status.rb +113 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/static.rb +175 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/tempfile_reaper.rb +22 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/urlmap.rb +91 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack/utils.rb +620 -0
- data/vendor/ruby/gems/rack-2.0.5/lib/rack.rb +147 -0
- data/vendor/ruby/gems/rack-2.0.5/rack.gemspec +34 -0
- data/vendor/ruby/gems/rack-2.0.5/test/builder/an_underscore_app.rb +5 -0
- data/vendor/ruby/gems/rack-2.0.5/test/builder/anything.rb +5 -0
- data/vendor/ruby/gems/rack-2.0.5/test/builder/comment.ru +4 -0
- data/vendor/ruby/gems/rack-2.0.5/test/builder/end.ru +5 -0
- data/vendor/ruby/gems/rack-2.0.5/test/builder/line.ru +1 -0
- data/vendor/ruby/gems/rack-2.0.5/test/builder/options.ru +2 -0
- data/vendor/ruby/gems/rack-2.0.5/test/cgi/assets/folder/test.js +1 -0
- data/vendor/ruby/gems/rack-2.0.5/test/cgi/assets/fonts/font.eot +1 -0
- data/vendor/ruby/gems/rack-2.0.5/test/cgi/assets/images/image.png +1 -0
- data/vendor/ruby/gems/rack-2.0.5/test/cgi/assets/index.html +1 -0
- data/vendor/ruby/gems/rack-2.0.5/test/cgi/assets/javascripts/app.js +1 -0
- data/vendor/ruby/gems/rack-2.0.5/test/cgi/assets/stylesheets/app.css +1 -0
- data/vendor/ruby/gems/rack-2.0.5/test/cgi/lighttpd.conf +26 -0
- data/vendor/ruby/gems/rack-2.0.5/test/cgi/rackup_stub.rb +6 -0
- data/vendor/ruby/gems/rack-2.0.5/test/cgi/sample_rackup.ru +5 -0
- data/vendor/ruby/gems/rack-2.0.5/test/cgi/test +9 -0
- data/vendor/ruby/gems/rack-2.0.5/test/cgi/test+directory/test+file +1 -0
- data/vendor/ruby/gems/rack-2.0.5/test/cgi/test.fcgi +9 -0
- data/vendor/ruby/gems/rack-2.0.5/test/cgi/test.gz +0 -0
- data/vendor/ruby/gems/rack-2.0.5/test/cgi/test.ru +5 -0
- data/vendor/ruby/gems/rack-2.0.5/test/gemloader.rb +10 -0
- data/vendor/ruby/gems/rack-2.0.5/test/helper.rb +34 -0
- data/vendor/ruby/gems/rack-2.0.5/test/multipart/bad_robots +259 -0
- data/vendor/ruby/gems/rack-2.0.5/test/multipart/binary +0 -0
- data/vendor/ruby/gems/rack-2.0.5/test/multipart/content_type_and_no_filename +6 -0
- data/vendor/ruby/gems/rack-2.0.5/test/multipart/empty +10 -0
- data/vendor/ruby/gems/rack-2.0.5/test/multipart/fail_16384_nofile +814 -0
- data/vendor/ruby/gems/rack-2.0.5/test/multipart/file1.txt +1 -0
- data/vendor/ruby/gems/rack-2.0.5/test/multipart/filename_and_modification_param +7 -0
- data/vendor/ruby/gems/rack-2.0.5/test/multipart/filename_and_no_name +6 -0
- data/vendor/ruby/gems/rack-2.0.5/test/multipart/filename_with_encoded_words +7 -0
- data/vendor/ruby/gems/rack-2.0.5/test/multipart/filename_with_escaped_quotes +6 -0
- data/vendor/ruby/gems/rack-2.0.5/test/multipart/filename_with_escaped_quotes_and_modification_param +7 -0
- data/vendor/ruby/gems/rack-2.0.5/test/multipart/filename_with_null_byte +7 -0
- data/vendor/ruby/gems/rack-2.0.5/test/multipart/filename_with_percent_escaped_quotes +6 -0
- data/vendor/ruby/gems/rack-2.0.5/test/multipart/filename_with_single_quote +7 -0
- data/vendor/ruby/gems/rack-2.0.5/test/multipart/filename_with_unescaped_percentages +6 -0
- data/vendor/ruby/gems/rack-2.0.5/test/multipart/filename_with_unescaped_percentages2 +6 -0
- data/vendor/ruby/gems/rack-2.0.5/test/multipart/filename_with_unescaped_percentages3 +6 -0
- data/vendor/ruby/gems/rack-2.0.5/test/multipart/filename_with_unescaped_quotes +6 -0
- data/vendor/ruby/gems/rack-2.0.5/test/multipart/ie +6 -0
- data/vendor/ruby/gems/rack-2.0.5/test/multipart/invalid_character +6 -0
- data/vendor/ruby/gems/rack-2.0.5/test/multipart/mixed_files +21 -0
- data/vendor/ruby/gems/rack-2.0.5/test/multipart/nested +10 -0
- data/vendor/ruby/gems/rack-2.0.5/test/multipart/none +9 -0
- data/vendor/ruby/gems/rack-2.0.5/test/multipart/quoted +15 -0
- data/vendor/ruby/gems/rack-2.0.5/test/multipart/rack-logo.png +0 -0
- data/vendor/ruby/gems/rack-2.0.5/test/multipart/semicolon +6 -0
- data/vendor/ruby/gems/rack-2.0.5/test/multipart/text +15 -0
- data/vendor/ruby/gems/rack-2.0.5/test/multipart/three_files_three_fields +31 -0
- data/vendor/ruby/gems/rack-2.0.5/test/multipart/unity3d_wwwform +11 -0
- data/vendor/ruby/gems/rack-2.0.5/test/multipart/webkit +32 -0
- data/vendor/ruby/gems/rack-2.0.5/test/rackup/config.ru +31 -0
- data/vendor/ruby/gems/rack-2.0.5/test/registering_handler/rack/handler/registering_myself.rb +8 -0
- data/vendor/ruby/gems/rack-2.0.5/test/spec_auth_basic.rb +89 -0
- data/vendor/ruby/gems/rack-2.0.5/test/spec_auth_digest.rb +260 -0
- data/vendor/ruby/gems/rack-2.0.5/test/spec_body_proxy.rb +85 -0
- data/vendor/ruby/gems/rack-2.0.5/test/spec_builder.rb +233 -0
- data/vendor/ruby/gems/rack-2.0.5/test/spec_cascade.rb +63 -0
- data/vendor/ruby/gems/rack-2.0.5/test/spec_cgi.rb +84 -0
- data/vendor/ruby/gems/rack-2.0.5/test/spec_chunked.rb +103 -0
- data/vendor/ruby/gems/rack-2.0.5/test/spec_common_logger.rb +95 -0
- data/vendor/ruby/gems/rack-2.0.5/test/spec_conditional_get.rb +103 -0
- data/vendor/ruby/gems/rack-2.0.5/test/spec_config.rb +23 -0
- data/vendor/ruby/gems/rack-2.0.5/test/spec_content_length.rb +86 -0
- data/vendor/ruby/gems/rack-2.0.5/test/spec_content_type.rb +46 -0
- data/vendor/ruby/gems/rack-2.0.5/test/spec_deflater.rb +375 -0
- data/vendor/ruby/gems/rack-2.0.5/test/spec_directory.rb +148 -0
- data/vendor/ruby/gems/rack-2.0.5/test/spec_etag.rb +108 -0
- data/vendor/ruby/gems/rack-2.0.5/test/spec_events.rb +133 -0
- data/vendor/ruby/gems/rack-2.0.5/test/spec_fastcgi.rb +85 -0
- data/vendor/ruby/gems/rack-2.0.5/test/spec_file.rb +264 -0
- data/vendor/ruby/gems/rack-2.0.5/test/spec_handler.rb +57 -0
- data/vendor/ruby/gems/rack-2.0.5/test/spec_head.rb +46 -0
- data/vendor/ruby/gems/rack-2.0.5/test/spec_lint.rb +515 -0
- data/vendor/ruby/gems/rack-2.0.5/test/spec_lobster.rb +59 -0
- data/vendor/ruby/gems/rack-2.0.5/test/spec_lock.rb +204 -0
- data/vendor/ruby/gems/rack-2.0.5/test/spec_logger.rb +24 -0
- data/vendor/ruby/gems/rack-2.0.5/test/spec_media_type.rb +42 -0
- data/vendor/ruby/gems/rack-2.0.5/test/spec_method_override.rb +110 -0
- data/vendor/ruby/gems/rack-2.0.5/test/spec_mime.rb +51 -0
- data/vendor/ruby/gems/rack-2.0.5/test/spec_mock.rb +359 -0
- data/vendor/ruby/gems/rack-2.0.5/test/spec_multipart.rb +722 -0
- data/vendor/ruby/gems/rack-2.0.5/test/spec_null_logger.rb +21 -0
- data/vendor/ruby/gems/rack-2.0.5/test/spec_recursive.rb +75 -0
- data/vendor/ruby/gems/rack-2.0.5/test/spec_request.rb +1393 -0
- data/vendor/ruby/gems/rack-2.0.5/test/spec_response.rb +510 -0
- data/vendor/ruby/gems/rack-2.0.5/test/spec_rewindable_input.rb +128 -0
- data/vendor/ruby/gems/rack-2.0.5/test/spec_runtime.rb +50 -0
- data/vendor/ruby/gems/rack-2.0.5/test/spec_sendfile.rb +125 -0
- data/vendor/ruby/gems/rack-2.0.5/test/spec_server.rb +193 -0
- data/vendor/ruby/gems/rack-2.0.5/test/spec_session_abstract_id.rb +31 -0
- data/vendor/ruby/gems/rack-2.0.5/test/spec_session_abstract_session_hash.rb +45 -0
- data/vendor/ruby/gems/rack-2.0.5/test/spec_session_cookie.rb +442 -0
- data/vendor/ruby/gems/rack-2.0.5/test/spec_session_memcache.rb +320 -0
- data/vendor/ruby/gems/rack-2.0.5/test/spec_session_pool.rb +210 -0
- data/vendor/ruby/gems/rack-2.0.5/test/spec_show_exceptions.rb +80 -0
- data/vendor/ruby/gems/rack-2.0.5/test/spec_show_status.rb +104 -0
- data/vendor/ruby/gems/rack-2.0.5/test/spec_static.rb +184 -0
- data/vendor/ruby/gems/rack-2.0.5/test/spec_tempfile_reaper.rb +64 -0
- data/vendor/ruby/gems/rack-2.0.5/test/spec_thin.rb +96 -0
- data/vendor/ruby/gems/rack-2.0.5/test/spec_urlmap.rb +237 -0
- data/vendor/ruby/gems/rack-2.0.5/test/spec_utils.rb +742 -0
- data/vendor/ruby/gems/rack-2.0.5/test/spec_version.rb +11 -0
- data/vendor/ruby/gems/rack-2.0.5/test/spec_webrick.rb +206 -0
- data/vendor/ruby/gems/rack-2.0.5/test/static/another/index.html +1 -0
- data/vendor/ruby/gems/rack-2.0.5/test/static/foo.html +1 -0
- data/vendor/ruby/gems/rack-2.0.5/test/static/index.html +1 -0
- data/vendor/ruby/gems/rack-2.0.5/test/testrequest.rb +78 -0
- data/vendor/ruby/gems/rack-2.0.5/test/unregistered_handler/rack/handler/unregistered.rb +7 -0
- data/vendor/ruby/gems/rack-2.0.5/test/unregistered_handler/rack/handler/unregistered_long_one.rb +7 -0
- data/vendor/ruby/gems/rake-10.5.0/.autotest +7 -0
- data/vendor/ruby/gems/rake-10.5.0/.rubocop.yml +27 -0
- data/vendor/ruby/gems/rake-10.5.0/.togglerc +7 -0
- data/vendor/ruby/gems/rake-10.5.0/CONTRIBUTING.rdoc +38 -0
- data/vendor/ruby/gems/rake-10.5.0/History.rdoc +659 -0
- data/vendor/ruby/gems/rake-10.5.0/MIT-LICENSE +21 -0
- data/vendor/ruby/gems/rake-10.5.0/Manifest.txt +166 -0
- data/vendor/ruby/gems/rake-10.5.0/README.rdoc +139 -0
- data/vendor/ruby/gems/rake-10.5.0/Rakefile +81 -0
- data/vendor/ruby/gems/rake-10.5.0/bin/rake +33 -0
- data/vendor/ruby/gems/rake-10.5.0/doc/command_line_usage.rdoc +158 -0
- data/vendor/ruby/gems/rake-10.5.0/doc/example/Rakefile1 +38 -0
- data/vendor/ruby/gems/rake-10.5.0/doc/example/Rakefile2 +35 -0
- data/vendor/ruby/gems/rake-10.5.0/doc/example/a.c +6 -0
- data/vendor/ruby/gems/rake-10.5.0/doc/example/b.c +6 -0
- data/vendor/ruby/gems/rake-10.5.0/doc/example/main.c +11 -0
- data/vendor/ruby/gems/rake-10.5.0/doc/glossary.rdoc +42 -0
- data/vendor/ruby/gems/rake-10.5.0/doc/jamis.rb +591 -0
- data/vendor/ruby/gems/rake-10.5.0/doc/proto_rake.rdoc +127 -0
- data/vendor/ruby/gems/rake-10.5.0/doc/rake.1 +141 -0
- data/vendor/ruby/gems/rake-10.5.0/doc/rakefile.rdoc +624 -0
- data/vendor/ruby/gems/rake-10.5.0/doc/rational.rdoc +151 -0
- data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-0.4.14.rdoc +23 -0
- data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-0.4.15.rdoc +35 -0
- data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-0.5.0.rdoc +53 -0
- data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-0.5.3.rdoc +78 -0
- data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-0.5.4.rdoc +46 -0
- data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-0.6.0.rdoc +141 -0
- data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-0.7.0.rdoc +119 -0
- data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-0.7.1.rdoc +59 -0
- data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-0.7.2.rdoc +121 -0
- data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-0.7.3.rdoc +47 -0
- data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-0.8.0.rdoc +114 -0
- data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-0.8.2.rdoc +165 -0
- data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-0.8.3.rdoc +112 -0
- data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-0.8.4.rdoc +147 -0
- data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-0.8.5.rdoc +53 -0
- data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-0.8.6.rdoc +37 -0
- data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-0.8.7.rdoc +55 -0
- data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-0.9.0.rdoc +112 -0
- data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-0.9.1.rdoc +52 -0
- data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-0.9.2.2.rdoc +55 -0
- data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-0.9.2.rdoc +49 -0
- data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-0.9.3.rdoc +102 -0
- data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-0.9.4.rdoc +60 -0
- data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-0.9.5.rdoc +55 -0
- data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-0.9.6.rdoc +64 -0
- data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-10.0.0.rdoc +178 -0
- data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-10.0.1.rdoc +58 -0
- data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-10.0.2.rdoc +53 -0
- data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-10.0.3.rdoc +191 -0
- data/vendor/ruby/gems/rake-10.5.0/doc/release_notes/rake-10.1.0.rdoc +61 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/alt_system.rb +110 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/application.rb +790 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/backtrace.rb +23 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/clean.rb +76 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/cloneable.rb +16 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/contrib/.document +1 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/contrib/compositepublisher.rb +21 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/contrib/ftptools.rb +137 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/contrib/publisher.rb +81 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/contrib/rubyforgepublisher.rb +18 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/contrib/sshpublisher.rb +61 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/contrib/sys.rb +4 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/cpu_counter.rb +125 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/default_loader.rb +14 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/dsl_definition.rb +201 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/early_time.rb +21 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/ext/core.rb +25 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/ext/module.rb +2 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/ext/pathname.rb +25 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/ext/string.rb +175 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/ext/time.rb +18 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/file_creation_task.rb +24 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/file_list.rb +428 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/file_task.rb +46 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/file_utils.rb +128 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/file_utils_ext.rb +144 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/gempackagetask.rb +4 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/invocation_chain.rb +56 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/invocation_exception_mixin.rb +16 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/late_time.rb +17 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/linked_list.rb +103 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/loaders/makefile.rb +53 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/multi_task.rb +13 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/name_space.rb +38 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/packagetask.rb +199 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/pathmap.rb +3 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/phony.rb +15 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/private_reader.rb +20 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/promise.rb +99 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/pseudo_status.rb +29 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/rake_module.rb +38 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/rake_test_loader.rb +22 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/rdoctask.rb +4 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/ruby182_test_unit_fix.rb +29 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/rule_recursion_overflow_error.rb +20 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/runtest.rb +27 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/scope.rb +42 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/task.rb +383 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/task_argument_error.rb +7 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/task_arguments.rb +98 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/task_manager.rb +307 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/tasklib.rb +24 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/testtask.rb +213 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/thread_history_display.rb +48 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/thread_pool.rb +164 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/trace_output.rb +22 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/version.rb +7 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake/win32.rb +56 -0
- data/vendor/ruby/gems/rake-10.5.0/lib/rake.rb +79 -0
- data/vendor/ruby/gems/rake-10.5.0/rakelib/publish.rake +20 -0
- data/vendor/ruby/gems/rake-10.5.0/rakelib/test_times.rake +25 -0
- data/vendor/ruby/gems/rake-10.5.0/test/file_creation.rb +34 -0
- data/vendor/ruby/gems/rake-10.5.0/test/helper.rb +129 -0
- data/vendor/ruby/gems/rake-10.5.0/test/support/rakefile_definitions.rb +478 -0
- data/vendor/ruby/gems/rake-10.5.0/test/support/ruby_runner.rb +34 -0
- data/vendor/ruby/gems/rake-10.5.0/test/test_private_reader.rb +42 -0
- data/vendor/ruby/gems/rake-10.5.0/test/test_rake.rb +40 -0
- data/vendor/ruby/gems/rake-10.5.0/test/test_rake_application.rb +643 -0
- data/vendor/ruby/gems/rake-10.5.0/test/test_rake_application_options.rb +468 -0
- data/vendor/ruby/gems/rake-10.5.0/test/test_rake_backtrace.rb +119 -0
- data/vendor/ruby/gems/rake-10.5.0/test/test_rake_clean.rb +61 -0
- data/vendor/ruby/gems/rake-10.5.0/test/test_rake_cpu_counter.rb +68 -0
- data/vendor/ruby/gems/rake-10.5.0/test/test_rake_definitions.rb +84 -0
- data/vendor/ruby/gems/rake-10.5.0/test/test_rake_directory_task.rb +76 -0
- data/vendor/ruby/gems/rake-10.5.0/test/test_rake_dsl.rb +40 -0
- data/vendor/ruby/gems/rake-10.5.0/test/test_rake_early_time.rb +31 -0
- data/vendor/ruby/gems/rake-10.5.0/test/test_rake_extension.rb +59 -0
- data/vendor/ruby/gems/rake-10.5.0/test/test_rake_file_creation_task.rb +56 -0
- data/vendor/ruby/gems/rake-10.5.0/test/test_rake_file_list.rb +670 -0
- data/vendor/ruby/gems/rake-10.5.0/test/test_rake_file_list_path_map.rb +8 -0
- data/vendor/ruby/gems/rake-10.5.0/test/test_rake_file_task.rb +197 -0
- data/vendor/ruby/gems/rake-10.5.0/test/test_rake_file_utils.rb +314 -0
- data/vendor/ruby/gems/rake-10.5.0/test/test_rake_ftp_file.rb +74 -0
- data/vendor/ruby/gems/rake-10.5.0/test/test_rake_functional.rb +482 -0
- data/vendor/ruby/gems/rake-10.5.0/test/test_rake_invocation_chain.rb +64 -0
- data/vendor/ruby/gems/rake-10.5.0/test/test_rake_late_time.rb +18 -0
- data/vendor/ruby/gems/rake-10.5.0/test/test_rake_linked_list.rb +84 -0
- data/vendor/ruby/gems/rake-10.5.0/test/test_rake_makefile_loader.rb +46 -0
- data/vendor/ruby/gems/rake-10.5.0/test/test_rake_multi_task.rb +64 -0
- data/vendor/ruby/gems/rake-10.5.0/test/test_rake_name_space.rb +57 -0
- data/vendor/ruby/gems/rake-10.5.0/test/test_rake_package_task.rb +79 -0
- data/vendor/ruby/gems/rake-10.5.0/test/test_rake_path_map.rb +168 -0
- data/vendor/ruby/gems/rake-10.5.0/test/test_rake_path_map_explode.rb +34 -0
- data/vendor/ruby/gems/rake-10.5.0/test/test_rake_path_map_partial.rb +18 -0
- data/vendor/ruby/gems/rake-10.5.0/test/test_rake_pathname_extensions.rb +15 -0
- data/vendor/ruby/gems/rake-10.5.0/test/test_rake_pseudo_status.rb +21 -0
- data/vendor/ruby/gems/rake-10.5.0/test/test_rake_rake_test_loader.rb +20 -0
- data/vendor/ruby/gems/rake-10.5.0/test/test_rake_reduce_compat.rb +26 -0
- data/vendor/ruby/gems/rake-10.5.0/test/test_rake_require.rb +40 -0
- data/vendor/ruby/gems/rake-10.5.0/test/test_rake_rules.rb +388 -0
- data/vendor/ruby/gems/rake-10.5.0/test/test_rake_scope.rb +44 -0
- data/vendor/ruby/gems/rake-10.5.0/test/test_rake_task.rb +393 -0
- data/vendor/ruby/gems/rake-10.5.0/test/test_rake_task_argument_parsing.rb +119 -0
- data/vendor/ruby/gems/rake-10.5.0/test/test_rake_task_arguments.rb +127 -0
- data/vendor/ruby/gems/rake-10.5.0/test/test_rake_task_lib.rb +9 -0
- data/vendor/ruby/gems/rake-10.5.0/test/test_rake_task_manager.rb +178 -0
- data/vendor/ruby/gems/rake-10.5.0/test/test_rake_task_manager_argument_resolution.rb +19 -0
- data/vendor/ruby/gems/rake-10.5.0/test/test_rake_task_with_arguments.rb +172 -0
- data/vendor/ruby/gems/rake-10.5.0/test/test_rake_test_task.rb +146 -0
- data/vendor/ruby/gems/rake-10.5.0/test/test_rake_thread_pool.rb +145 -0
- data/vendor/ruby/gems/rake-10.5.0/test/test_rake_top_level_functions.rb +71 -0
- data/vendor/ruby/gems/rake-10.5.0/test/test_rake_win32.rb +72 -0
- data/vendor/ruby/gems/rake-10.5.0/test/test_thread_history_display.rb +101 -0
- data/vendor/ruby/gems/rake-10.5.0/test/test_trace_output.rb +52 -0
- data/vendor/ruby/gems/sprockets-3.7.1/CHANGELOG.md +292 -0
- data/vendor/ruby/gems/sprockets-3.7.1/LICENSE +21 -0
- data/vendor/ruby/gems/sprockets-3.7.1/README.md +509 -0
- data/vendor/ruby/gems/sprockets-3.7.1/bin/sprockets +89 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/rake/sprocketstask.rb +152 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/asset.rb +200 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/autoload/closure.rb +7 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/autoload/coffee_script.rb +7 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/autoload/eco.rb +7 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/autoload/ejs.rb +7 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/autoload/sass.rb +7 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/autoload/uglifier.rb +7 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/autoload/yui.rb +7 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/autoload.rb +11 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/base.rb +110 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/bower.rb +58 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/bundle.rb +69 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/cache/file_store.rb +186 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/cache/memory_store.rb +66 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/cache/null_store.rb +46 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/cache.rb +236 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/cached_environment.rb +69 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/closure_compressor.rb +47 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/coffee_script_processor.rb +25 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/coffee_script_template.rb +17 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/compressing.rb +94 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/configuration.rb +83 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/context.rb +231 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/dependencies.rb +73 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/deprecation.rb +90 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/digest_utils.rb +180 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/directive_processor.rb +404 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/eco_processor.rb +32 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/eco_template.rb +17 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/ejs_processor.rb +31 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/ejs_template.rb +17 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/encoding_utils.rb +261 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/engines.rb +92 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/environment.rb +41 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/erb_processor.rb +30 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/erb_template.rb +11 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/errors.rb +11 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/file_reader.rb +15 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/http_utils.rb +117 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/jst_processor.rb +49 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/legacy.rb +330 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/legacy_proc_processor.rb +35 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/legacy_tilt_processor.rb +29 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/loader.rb +325 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/manifest.rb +335 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/manifest_utils.rb +45 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/mime.rb +130 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/path_dependency_utils.rb +85 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/path_digest_utils.rb +47 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb +287 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/paths.rb +81 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/processing.rb +258 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb +180 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/resolve.rb +211 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/sass_cache_store.rb +34 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/sass_compressor.rb +51 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/sass_functions.rb +2 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/sass_importer.rb +2 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/sass_processor.rb +292 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/sass_template.rb +19 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/server.rb +292 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/transformers.rb +145 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/uglifier_compressor.rb +56 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/unloaded_asset.rb +137 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/uri_tar.rb +98 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/uri_utils.rb +188 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/utils/gzip.rb +67 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/utils.rb +235 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/version.rb +3 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets/yui_compressor.rb +55 -0
- data/vendor/ruby/gems/sprockets-3.7.1/lib/sprockets.rb +169 -0
- data/vendor/ruby/specifications/concurrent-ruby-1.0.5.gemspec +23 -0
- data/vendor/ruby/specifications/rack-2.0.5.gemspec +42 -0
- data/vendor/ruby/specifications/rake-10.5.0.gemspec +43 -0
- data/vendor/ruby/specifications/sprockets-3.7.1.gemspec +78 -0
- metadata +660 -0
@@ -0,0 +1,196 @@
|
|
1
|
+
require 'uri'
|
2
|
+
require 'stringio'
|
3
|
+
require 'rack'
|
4
|
+
require 'rack/lint'
|
5
|
+
require 'rack/utils'
|
6
|
+
require 'rack/response'
|
7
|
+
|
8
|
+
module Rack
|
9
|
+
# Rack::MockRequest helps testing your Rack application without
|
10
|
+
# actually using HTTP.
|
11
|
+
#
|
12
|
+
# After performing a request on a URL with get/post/put/patch/delete, it
|
13
|
+
# returns a MockResponse with useful helper methods for effective
|
14
|
+
# testing.
|
15
|
+
#
|
16
|
+
# You can pass a hash with additional configuration to the
|
17
|
+
# get/post/put/patch/delete.
|
18
|
+
# <tt>:input</tt>:: A String or IO-like to be used as rack.input.
|
19
|
+
# <tt>:fatal</tt>:: Raise a FatalWarning if the app writes to rack.errors.
|
20
|
+
# <tt>:lint</tt>:: If true, wrap the application in a Rack::Lint.
|
21
|
+
|
22
|
+
class MockRequest
|
23
|
+
class FatalWarning < RuntimeError
|
24
|
+
end
|
25
|
+
|
26
|
+
class FatalWarner
|
27
|
+
def puts(warning)
|
28
|
+
raise FatalWarning, warning
|
29
|
+
end
|
30
|
+
|
31
|
+
def write(warning)
|
32
|
+
raise FatalWarning, warning
|
33
|
+
end
|
34
|
+
|
35
|
+
def flush
|
36
|
+
end
|
37
|
+
|
38
|
+
def string
|
39
|
+
""
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
DEFAULT_ENV = {
|
44
|
+
RACK_VERSION => Rack::VERSION,
|
45
|
+
RACK_INPUT => StringIO.new,
|
46
|
+
RACK_ERRORS => StringIO.new,
|
47
|
+
RACK_MULTITHREAD => true,
|
48
|
+
RACK_MULTIPROCESS => true,
|
49
|
+
RACK_RUNONCE => false,
|
50
|
+
}.freeze
|
51
|
+
|
52
|
+
def initialize(app)
|
53
|
+
@app = app
|
54
|
+
end
|
55
|
+
|
56
|
+
def get(uri, opts={}) request(GET, uri, opts) end
|
57
|
+
def post(uri, opts={}) request(POST, uri, opts) end
|
58
|
+
def put(uri, opts={}) request(PUT, uri, opts) end
|
59
|
+
def patch(uri, opts={}) request(PATCH, uri, opts) end
|
60
|
+
def delete(uri, opts={}) request(DELETE, uri, opts) end
|
61
|
+
def head(uri, opts={}) request(HEAD, uri, opts) end
|
62
|
+
def options(uri, opts={}) request(OPTIONS, uri, opts) end
|
63
|
+
|
64
|
+
def request(method=GET, uri="", opts={})
|
65
|
+
env = self.class.env_for(uri, opts.merge(:method => method))
|
66
|
+
|
67
|
+
if opts[:lint]
|
68
|
+
app = Rack::Lint.new(@app)
|
69
|
+
else
|
70
|
+
app = @app
|
71
|
+
end
|
72
|
+
|
73
|
+
errors = env[RACK_ERRORS]
|
74
|
+
status, headers, body = app.call(env)
|
75
|
+
MockResponse.new(status, headers, body, errors)
|
76
|
+
ensure
|
77
|
+
body.close if body.respond_to?(:close)
|
78
|
+
end
|
79
|
+
|
80
|
+
# For historical reasons, we're pinning to RFC 2396.
|
81
|
+
# URI::Parser = URI::RFC2396_Parser
|
82
|
+
def self.parse_uri_rfc2396(uri)
|
83
|
+
@parser ||= URI::Parser.new
|
84
|
+
@parser.parse(uri)
|
85
|
+
end
|
86
|
+
|
87
|
+
# Return the Rack environment used for a request to +uri+.
|
88
|
+
def self.env_for(uri="", opts={})
|
89
|
+
uri = parse_uri_rfc2396(uri)
|
90
|
+
uri.path = "/#{uri.path}" unless uri.path[0] == ?/
|
91
|
+
|
92
|
+
env = DEFAULT_ENV.dup
|
93
|
+
|
94
|
+
env[REQUEST_METHOD] = (opts[:method] ? opts[:method].to_s.upcase : GET).b
|
95
|
+
env[SERVER_NAME] = (uri.host || "example.org").b
|
96
|
+
env[SERVER_PORT] = (uri.port ? uri.port.to_s : "80").b
|
97
|
+
env[QUERY_STRING] = (uri.query.to_s).b
|
98
|
+
env[PATH_INFO] = ((!uri.path || uri.path.empty?) ? "/" : uri.path).b
|
99
|
+
env[RACK_URL_SCHEME] = (uri.scheme || "http").b
|
100
|
+
env[HTTPS] = (env[RACK_URL_SCHEME] == "https" ? "on" : "off").b
|
101
|
+
|
102
|
+
env[SCRIPT_NAME] = opts[:script_name] || ""
|
103
|
+
|
104
|
+
if opts[:fatal]
|
105
|
+
env[RACK_ERRORS] = FatalWarner.new
|
106
|
+
else
|
107
|
+
env[RACK_ERRORS] = StringIO.new
|
108
|
+
end
|
109
|
+
|
110
|
+
if params = opts[:params]
|
111
|
+
if env[REQUEST_METHOD] == GET
|
112
|
+
params = Utils.parse_nested_query(params) if params.is_a?(String)
|
113
|
+
params.update(Utils.parse_nested_query(env[QUERY_STRING]))
|
114
|
+
env[QUERY_STRING] = Utils.build_nested_query(params)
|
115
|
+
elsif !opts.has_key?(:input)
|
116
|
+
opts["CONTENT_TYPE"] = "application/x-www-form-urlencoded"
|
117
|
+
if params.is_a?(Hash)
|
118
|
+
if data = Rack::Multipart.build_multipart(params)
|
119
|
+
opts[:input] = data
|
120
|
+
opts["CONTENT_LENGTH"] ||= data.length.to_s
|
121
|
+
opts["CONTENT_TYPE"] = "multipart/form-data; boundary=#{Rack::Multipart::MULTIPART_BOUNDARY}"
|
122
|
+
else
|
123
|
+
opts[:input] = Utils.build_nested_query(params)
|
124
|
+
end
|
125
|
+
else
|
126
|
+
opts[:input] = params
|
127
|
+
end
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
131
|
+
empty_str = String.new
|
132
|
+
opts[:input] ||= empty_str
|
133
|
+
if String === opts[:input]
|
134
|
+
rack_input = StringIO.new(opts[:input])
|
135
|
+
else
|
136
|
+
rack_input = opts[:input]
|
137
|
+
end
|
138
|
+
|
139
|
+
rack_input.set_encoding(Encoding::BINARY)
|
140
|
+
env[RACK_INPUT] = rack_input
|
141
|
+
|
142
|
+
env["CONTENT_LENGTH"] ||= env[RACK_INPUT].length.to_s
|
143
|
+
|
144
|
+
opts.each { |field, value|
|
145
|
+
env[field] = value if String === field
|
146
|
+
}
|
147
|
+
|
148
|
+
env
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
152
|
+
# Rack::MockResponse provides useful helpers for testing your apps.
|
153
|
+
# Usually, you don't create the MockResponse on your own, but use
|
154
|
+
# MockRequest.
|
155
|
+
|
156
|
+
class MockResponse < Rack::Response
|
157
|
+
# Headers
|
158
|
+
attr_reader :original_headers
|
159
|
+
|
160
|
+
# Errors
|
161
|
+
attr_accessor :errors
|
162
|
+
|
163
|
+
def initialize(status, headers, body, errors=StringIO.new(""))
|
164
|
+
@original_headers = headers
|
165
|
+
@errors = errors.string if errors.respond_to?(:string)
|
166
|
+
|
167
|
+
super(body, status, headers)
|
168
|
+
end
|
169
|
+
|
170
|
+
def =~(other)
|
171
|
+
body =~ other
|
172
|
+
end
|
173
|
+
|
174
|
+
def match(other)
|
175
|
+
body.match other
|
176
|
+
end
|
177
|
+
|
178
|
+
def body
|
179
|
+
# FIXME: apparently users of MockResponse expect the return value of
|
180
|
+
# MockResponse#body to be a string. However, the real response object
|
181
|
+
# returns the body as a list.
|
182
|
+
#
|
183
|
+
# See spec_showstatus.rb:
|
184
|
+
#
|
185
|
+
# should "not replace existing messages" do
|
186
|
+
# ...
|
187
|
+
# res.body.should == "foo!"
|
188
|
+
# end
|
189
|
+
super.join
|
190
|
+
end
|
191
|
+
|
192
|
+
def empty?
|
193
|
+
[201, 204, 304].include? status
|
194
|
+
end
|
195
|
+
end
|
196
|
+
end
|
@@ -0,0 +1,93 @@
|
|
1
|
+
module Rack
|
2
|
+
module Multipart
|
3
|
+
class Generator
|
4
|
+
def initialize(params, first = true)
|
5
|
+
@params, @first = params, first
|
6
|
+
|
7
|
+
if @first && !@params.is_a?(Hash)
|
8
|
+
raise ArgumentError, "value must be a Hash"
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
def dump
|
13
|
+
return nil if @first && !multipart?
|
14
|
+
return flattened_params unless @first
|
15
|
+
|
16
|
+
flattened_params.map do |name, file|
|
17
|
+
if file.respond_to?(:original_filename)
|
18
|
+
::File.open(file.path, 'rb') do |f|
|
19
|
+
f.set_encoding(Encoding::BINARY)
|
20
|
+
content_for_tempfile(f, file, name)
|
21
|
+
end
|
22
|
+
else
|
23
|
+
content_for_other(file, name)
|
24
|
+
end
|
25
|
+
end.join << "--#{MULTIPART_BOUNDARY}--\r"
|
26
|
+
end
|
27
|
+
|
28
|
+
private
|
29
|
+
def multipart?
|
30
|
+
multipart = false
|
31
|
+
|
32
|
+
query = lambda { |value|
|
33
|
+
case value
|
34
|
+
when Array
|
35
|
+
value.each(&query)
|
36
|
+
when Hash
|
37
|
+
value.values.each(&query)
|
38
|
+
when Rack::Multipart::UploadedFile
|
39
|
+
multipart = true
|
40
|
+
end
|
41
|
+
}
|
42
|
+
@params.values.each(&query)
|
43
|
+
|
44
|
+
multipart
|
45
|
+
end
|
46
|
+
|
47
|
+
def flattened_params
|
48
|
+
@flattened_params ||= begin
|
49
|
+
h = Hash.new
|
50
|
+
@params.each do |key, value|
|
51
|
+
k = @first ? key.to_s : "[#{key}]"
|
52
|
+
|
53
|
+
case value
|
54
|
+
when Array
|
55
|
+
value.map { |v|
|
56
|
+
Multipart.build_multipart(v, false).each { |subkey, subvalue|
|
57
|
+
h["#{k}[]#{subkey}"] = subvalue
|
58
|
+
}
|
59
|
+
}
|
60
|
+
when Hash
|
61
|
+
Multipart.build_multipart(value, false).each { |subkey, subvalue|
|
62
|
+
h[k + subkey] = subvalue
|
63
|
+
}
|
64
|
+
else
|
65
|
+
h[k] = value
|
66
|
+
end
|
67
|
+
end
|
68
|
+
h
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
def content_for_tempfile(io, file, name)
|
73
|
+
<<-EOF
|
74
|
+
--#{MULTIPART_BOUNDARY}\r
|
75
|
+
Content-Disposition: form-data; name="#{name}"; filename="#{Utils.escape(file.original_filename)}"\r
|
76
|
+
Content-Type: #{file.content_type}\r
|
77
|
+
Content-Length: #{::File.stat(file.path).size}\r
|
78
|
+
\r
|
79
|
+
#{io.read}\r
|
80
|
+
EOF
|
81
|
+
end
|
82
|
+
|
83
|
+
def content_for_other(file, name)
|
84
|
+
<<-EOF
|
85
|
+
--#{MULTIPART_BOUNDARY}\r
|
86
|
+
Content-Disposition: form-data; name="#{name}"\r
|
87
|
+
\r
|
88
|
+
#{file}\r
|
89
|
+
EOF
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
@@ -0,0 +1,369 @@
|
|
1
|
+
require 'rack/utils'
|
2
|
+
|
3
|
+
module Rack
|
4
|
+
module Multipart
|
5
|
+
class MultipartPartLimitError < Errno::EMFILE; end
|
6
|
+
|
7
|
+
class Parser
|
8
|
+
BUFSIZE = 1_048_576
|
9
|
+
TEXT_PLAIN = "text/plain"
|
10
|
+
TEMPFILE_FACTORY = lambda { |filename, content_type|
|
11
|
+
Tempfile.new(["RackMultipart", ::File.extname(filename.gsub("\0".freeze, '%00'.freeze))])
|
12
|
+
}
|
13
|
+
|
14
|
+
class BoundedIO # :nodoc:
|
15
|
+
def initialize(io, content_length)
|
16
|
+
@io = io
|
17
|
+
@content_length = content_length
|
18
|
+
@cursor = 0
|
19
|
+
end
|
20
|
+
|
21
|
+
def read(size)
|
22
|
+
return if @cursor >= @content_length
|
23
|
+
|
24
|
+
left = @content_length - @cursor
|
25
|
+
|
26
|
+
str = if left < size
|
27
|
+
@io.read left
|
28
|
+
else
|
29
|
+
@io.read size
|
30
|
+
end
|
31
|
+
|
32
|
+
if str
|
33
|
+
@cursor += str.bytesize
|
34
|
+
else
|
35
|
+
# Raise an error for mismatching Content-Length and actual contents
|
36
|
+
raise EOFError, "bad content body"
|
37
|
+
end
|
38
|
+
|
39
|
+
str
|
40
|
+
end
|
41
|
+
|
42
|
+
def eof?; @content_length == @cursor; end
|
43
|
+
|
44
|
+
def rewind
|
45
|
+
@io.rewind
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
MultipartInfo = Struct.new :params, :tmp_files
|
50
|
+
EMPTY = MultipartInfo.new(nil, [])
|
51
|
+
|
52
|
+
def self.parse_boundary(content_type)
|
53
|
+
return unless content_type
|
54
|
+
data = content_type.match(MULTIPART)
|
55
|
+
return unless data
|
56
|
+
data[1]
|
57
|
+
end
|
58
|
+
|
59
|
+
def self.parse(io, content_length, content_type, tmpfile, bufsize, qp)
|
60
|
+
return EMPTY if 0 == content_length
|
61
|
+
|
62
|
+
boundary = parse_boundary content_type
|
63
|
+
return EMPTY unless boundary
|
64
|
+
|
65
|
+
io = BoundedIO.new(io, content_length) if content_length
|
66
|
+
|
67
|
+
parser = new(boundary, tmpfile, bufsize, qp)
|
68
|
+
parser.on_read io.read(bufsize), io.eof?
|
69
|
+
|
70
|
+
loop do
|
71
|
+
break if parser.state == :DONE
|
72
|
+
parser.on_read io.read(bufsize), io.eof?
|
73
|
+
end
|
74
|
+
|
75
|
+
io.rewind
|
76
|
+
parser.result
|
77
|
+
end
|
78
|
+
|
79
|
+
class Collector
|
80
|
+
class MimePart < Struct.new(:body, :head, :filename, :content_type, :name)
|
81
|
+
def get_data
|
82
|
+
data = body
|
83
|
+
if filename == ""
|
84
|
+
# filename is blank which means no file has been selected
|
85
|
+
return
|
86
|
+
elsif filename
|
87
|
+
body.rewind if body.respond_to?(:rewind)
|
88
|
+
|
89
|
+
# Take the basename of the upload's original filename.
|
90
|
+
# This handles the full Windows paths given by Internet Explorer
|
91
|
+
# (and perhaps other broken user agents) without affecting
|
92
|
+
# those which give the lone filename.
|
93
|
+
fn = filename.split(/[\/\\]/).last
|
94
|
+
|
95
|
+
data = {:filename => fn, :type => content_type,
|
96
|
+
:name => name, :tempfile => body, :head => head}
|
97
|
+
elsif !filename && content_type && body.is_a?(IO)
|
98
|
+
body.rewind
|
99
|
+
|
100
|
+
# Generic multipart cases, not coming from a form
|
101
|
+
data = {:type => content_type,
|
102
|
+
:name => name, :tempfile => body, :head => head}
|
103
|
+
end
|
104
|
+
|
105
|
+
yield data
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
class BufferPart < MimePart
|
110
|
+
def file?; false; end
|
111
|
+
def close; end
|
112
|
+
end
|
113
|
+
|
114
|
+
class TempfilePart < MimePart
|
115
|
+
def file?; true; end
|
116
|
+
def close; body.close; end
|
117
|
+
end
|
118
|
+
|
119
|
+
include Enumerable
|
120
|
+
|
121
|
+
def initialize tempfile
|
122
|
+
@tempfile = tempfile
|
123
|
+
@mime_parts = []
|
124
|
+
@open_files = 0
|
125
|
+
end
|
126
|
+
|
127
|
+
def each
|
128
|
+
@mime_parts.each { |part| yield part }
|
129
|
+
end
|
130
|
+
|
131
|
+
def on_mime_head mime_index, head, filename, content_type, name
|
132
|
+
if filename
|
133
|
+
body = @tempfile.call(filename, content_type)
|
134
|
+
body.binmode if body.respond_to?(:binmode)
|
135
|
+
klass = TempfilePart
|
136
|
+
@open_files += 1
|
137
|
+
else
|
138
|
+
body = String.new
|
139
|
+
klass = BufferPart
|
140
|
+
end
|
141
|
+
|
142
|
+
@mime_parts[mime_index] = klass.new(body, head, filename, content_type, name)
|
143
|
+
check_open_files
|
144
|
+
end
|
145
|
+
|
146
|
+
def on_mime_body mime_index, content
|
147
|
+
@mime_parts[mime_index].body << content
|
148
|
+
end
|
149
|
+
|
150
|
+
def on_mime_finish mime_index
|
151
|
+
end
|
152
|
+
|
153
|
+
private
|
154
|
+
|
155
|
+
def check_open_files
|
156
|
+
if Utils.multipart_part_limit > 0
|
157
|
+
if @open_files >= Utils.multipart_part_limit
|
158
|
+
@mime_parts.each(&:close)
|
159
|
+
raise MultipartPartLimitError, 'Maximum file multiparts in content reached'
|
160
|
+
end
|
161
|
+
end
|
162
|
+
end
|
163
|
+
end
|
164
|
+
|
165
|
+
attr_reader :state
|
166
|
+
|
167
|
+
def initialize(boundary, tempfile, bufsize, query_parser)
|
168
|
+
@buf = String.new
|
169
|
+
|
170
|
+
@query_parser = query_parser
|
171
|
+
@params = query_parser.make_params
|
172
|
+
@boundary = "--#{boundary}"
|
173
|
+
@bufsize = bufsize
|
174
|
+
|
175
|
+
@rx = /(?:#{EOL})?#{Regexp.quote(@boundary)}(#{EOL}|--)/n
|
176
|
+
@rx_max_size = EOL.size + @boundary.bytesize + [EOL.size, '--'.size].max
|
177
|
+
@full_boundary = @boundary
|
178
|
+
@end_boundary = @boundary + '--'
|
179
|
+
@state = :FAST_FORWARD
|
180
|
+
@mime_index = 0
|
181
|
+
@collector = Collector.new tempfile
|
182
|
+
end
|
183
|
+
|
184
|
+
def on_read content, eof
|
185
|
+
handle_empty_content!(content, eof)
|
186
|
+
@buf << content
|
187
|
+
run_parser
|
188
|
+
end
|
189
|
+
|
190
|
+
def result
|
191
|
+
@collector.each do |part|
|
192
|
+
part.get_data do |data|
|
193
|
+
tag_multipart_encoding(part.filename, part.content_type, part.name, data)
|
194
|
+
@query_parser.normalize_params(@params, part.name, data, @query_parser.param_depth_limit)
|
195
|
+
end
|
196
|
+
end
|
197
|
+
|
198
|
+
MultipartInfo.new @params.to_params_hash, @collector.find_all(&:file?).map(&:body)
|
199
|
+
end
|
200
|
+
|
201
|
+
private
|
202
|
+
|
203
|
+
def run_parser
|
204
|
+
loop do
|
205
|
+
case @state
|
206
|
+
when :FAST_FORWARD
|
207
|
+
break if handle_fast_forward == :want_read
|
208
|
+
when :CONSUME_TOKEN
|
209
|
+
break if handle_consume_token == :want_read
|
210
|
+
when :MIME_HEAD
|
211
|
+
break if handle_mime_head == :want_read
|
212
|
+
when :MIME_BODY
|
213
|
+
break if handle_mime_body == :want_read
|
214
|
+
when :DONE
|
215
|
+
break
|
216
|
+
end
|
217
|
+
end
|
218
|
+
end
|
219
|
+
|
220
|
+
def handle_fast_forward
|
221
|
+
if consume_boundary
|
222
|
+
@state = :MIME_HEAD
|
223
|
+
else
|
224
|
+
raise EOFError, "bad content body" if @buf.bytesize >= @bufsize
|
225
|
+
:want_read
|
226
|
+
end
|
227
|
+
end
|
228
|
+
|
229
|
+
def handle_consume_token
|
230
|
+
tok = consume_boundary
|
231
|
+
# break if we're at the end of a buffer, but not if it is the end of a field
|
232
|
+
if tok == :END_BOUNDARY || (@buf.empty? && tok != :BOUNDARY)
|
233
|
+
@state = :DONE
|
234
|
+
else
|
235
|
+
@state = :MIME_HEAD
|
236
|
+
end
|
237
|
+
end
|
238
|
+
|
239
|
+
def handle_mime_head
|
240
|
+
if @buf.index(EOL + EOL)
|
241
|
+
i = @buf.index(EOL+EOL)
|
242
|
+
head = @buf.slice!(0, i+2) # First \r\n
|
243
|
+
@buf.slice!(0, 2) # Second \r\n
|
244
|
+
|
245
|
+
content_type = head[MULTIPART_CONTENT_TYPE, 1]
|
246
|
+
if name = head[MULTIPART_CONTENT_DISPOSITION, 1]
|
247
|
+
name = Rack::Auth::Digest::Params::dequote(name)
|
248
|
+
else
|
249
|
+
name = head[MULTIPART_CONTENT_ID, 1]
|
250
|
+
end
|
251
|
+
|
252
|
+
filename = get_filename(head)
|
253
|
+
|
254
|
+
if name.nil? || name.empty?
|
255
|
+
name = filename || "#{content_type || TEXT_PLAIN}[]"
|
256
|
+
end
|
257
|
+
|
258
|
+
@collector.on_mime_head @mime_index, head, filename, content_type, name
|
259
|
+
@state = :MIME_BODY
|
260
|
+
else
|
261
|
+
:want_read
|
262
|
+
end
|
263
|
+
end
|
264
|
+
|
265
|
+
def handle_mime_body
|
266
|
+
if i = @buf.index(rx)
|
267
|
+
# Save the rest.
|
268
|
+
@collector.on_mime_body @mime_index, @buf.slice!(0, i)
|
269
|
+
@buf.slice!(0, 2) # Remove \r\n after the content
|
270
|
+
@state = :CONSUME_TOKEN
|
271
|
+
@mime_index += 1
|
272
|
+
else
|
273
|
+
# Save the read body part.
|
274
|
+
if @rx_max_size < @buf.size
|
275
|
+
@collector.on_mime_body @mime_index, @buf.slice!(0, @buf.size - @rx_max_size)
|
276
|
+
end
|
277
|
+
:want_read
|
278
|
+
end
|
279
|
+
end
|
280
|
+
|
281
|
+
def full_boundary; @full_boundary; end
|
282
|
+
|
283
|
+
def rx; @rx; end
|
284
|
+
|
285
|
+
def consume_boundary
|
286
|
+
while @buf.gsub!(/\A([^\n]*(?:\n|\Z))/, '')
|
287
|
+
read_buffer = $1
|
288
|
+
case read_buffer.strip
|
289
|
+
when full_boundary then return :BOUNDARY
|
290
|
+
when @end_boundary then return :END_BOUNDARY
|
291
|
+
end
|
292
|
+
return if @buf.empty?
|
293
|
+
end
|
294
|
+
end
|
295
|
+
|
296
|
+
def get_filename(head)
|
297
|
+
filename = nil
|
298
|
+
case head
|
299
|
+
when RFC2183
|
300
|
+
params = Hash[*head.scan(DISPPARM).flat_map(&:compact)]
|
301
|
+
|
302
|
+
if filename = params['filename']
|
303
|
+
filename = $1 if filename =~ /^"(.*)"$/
|
304
|
+
elsif filename = params['filename*']
|
305
|
+
encoding, _, filename = filename.split("'", 3)
|
306
|
+
end
|
307
|
+
when BROKEN_QUOTED, BROKEN_UNQUOTED
|
308
|
+
filename = $1
|
309
|
+
end
|
310
|
+
|
311
|
+
return unless filename
|
312
|
+
|
313
|
+
if filename.scan(/%.?.?/).all? { |s| s =~ /%[0-9a-fA-F]{2}/ }
|
314
|
+
filename = Utils.unescape(filename)
|
315
|
+
end
|
316
|
+
|
317
|
+
filename.scrub!
|
318
|
+
|
319
|
+
if filename !~ /\\[^\\"]/
|
320
|
+
filename = filename.gsub(/\\(.)/, '\1')
|
321
|
+
end
|
322
|
+
|
323
|
+
if encoding
|
324
|
+
filename.force_encoding ::Encoding.find(encoding)
|
325
|
+
end
|
326
|
+
|
327
|
+
filename
|
328
|
+
end
|
329
|
+
|
330
|
+
CHARSET = "charset"
|
331
|
+
|
332
|
+
def tag_multipart_encoding(filename, content_type, name, body)
|
333
|
+
name = name.to_s
|
334
|
+
encoding = Encoding::UTF_8
|
335
|
+
|
336
|
+
name.force_encoding(encoding)
|
337
|
+
|
338
|
+
return if filename
|
339
|
+
|
340
|
+
if content_type
|
341
|
+
list = content_type.split(';')
|
342
|
+
type_subtype = list.first
|
343
|
+
type_subtype.strip!
|
344
|
+
if TEXT_PLAIN == type_subtype
|
345
|
+
rest = list.drop 1
|
346
|
+
rest.each do |param|
|
347
|
+
k,v = param.split('=', 2)
|
348
|
+
k.strip!
|
349
|
+
v.strip!
|
350
|
+
v = v[1..-2] if v[0] == '"' && v[-1] == '"'
|
351
|
+
encoding = Encoding.find v if k == CHARSET
|
352
|
+
end
|
353
|
+
end
|
354
|
+
end
|
355
|
+
|
356
|
+
name.force_encoding(encoding)
|
357
|
+
body.force_encoding(encoding)
|
358
|
+
end
|
359
|
+
|
360
|
+
|
361
|
+
def handle_empty_content!(content, eof)
|
362
|
+
if content.nil? || content.empty?
|
363
|
+
raise EOFError if eof
|
364
|
+
return true
|
365
|
+
end
|
366
|
+
end
|
367
|
+
end
|
368
|
+
end
|
369
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module Rack
|
2
|
+
module Multipart
|
3
|
+
class UploadedFile
|
4
|
+
# The filename, *not* including the path, of the "uploaded" file
|
5
|
+
attr_reader :original_filename
|
6
|
+
|
7
|
+
# The content type of the "uploaded" file
|
8
|
+
attr_accessor :content_type
|
9
|
+
|
10
|
+
def initialize(path, content_type = "text/plain", binary = false)
|
11
|
+
raise "#{path} file does not exist" unless ::File.exist?(path)
|
12
|
+
@content_type = content_type
|
13
|
+
@original_filename = ::File.basename(path)
|
14
|
+
@tempfile = Tempfile.new([@original_filename, ::File.extname(path)], encoding: Encoding::BINARY)
|
15
|
+
@tempfile.binmode if binary
|
16
|
+
FileUtils.copy_file(path, @tempfile.path)
|
17
|
+
end
|
18
|
+
|
19
|
+
def path
|
20
|
+
@tempfile.path
|
21
|
+
end
|
22
|
+
alias_method :local_path, :path
|
23
|
+
|
24
|
+
def respond_to?(*args)
|
25
|
+
super or @tempfile.respond_to?(*args)
|
26
|
+
end
|
27
|
+
|
28
|
+
def method_missing(method_name, *args, &block) #:nodoc:
|
29
|
+
@tempfile.__send__(method_name, *args, &block)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|