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,180 @@
|
|
1
|
+
require 'digest/md5'
|
2
|
+
require 'digest/sha1'
|
3
|
+
require 'digest/sha2'
|
4
|
+
require 'set'
|
5
|
+
|
6
|
+
module Sprockets
|
7
|
+
# Internal: Hash functions and digest related utilities. Mixed into
|
8
|
+
# Environment.
|
9
|
+
module DigestUtils
|
10
|
+
extend self
|
11
|
+
|
12
|
+
# Internal: Default digest class.
|
13
|
+
#
|
14
|
+
# Returns a Digest::Base subclass.
|
15
|
+
def digest_class
|
16
|
+
Digest::SHA256
|
17
|
+
end
|
18
|
+
|
19
|
+
# Internal: Maps digest bytesize to the digest class.
|
20
|
+
DIGEST_SIZES = {
|
21
|
+
16 => Digest::MD5,
|
22
|
+
20 => Digest::SHA1,
|
23
|
+
32 => Digest::SHA256,
|
24
|
+
48 => Digest::SHA384,
|
25
|
+
64 => Digest::SHA512
|
26
|
+
}
|
27
|
+
|
28
|
+
# Internal: Detect digest class hash algorithm for digest bytes.
|
29
|
+
#
|
30
|
+
# While not elegant, all the supported digests have a unique bytesize.
|
31
|
+
#
|
32
|
+
# Returns Digest::Base or nil.
|
33
|
+
def detect_digest_class(bytes)
|
34
|
+
DIGEST_SIZES[bytes.bytesize]
|
35
|
+
end
|
36
|
+
|
37
|
+
ADD_VALUE_TO_DIGEST = {
|
38
|
+
String => ->(val, digest) { digest << val },
|
39
|
+
FalseClass => ->(val, digest) { digest << 'FalseClass'.freeze },
|
40
|
+
TrueClass => ->(val, digest) { digest << 'TrueClass'.freeze },
|
41
|
+
NilClass => ->(val, digest) { digest << 'NilClass'.freeze },
|
42
|
+
|
43
|
+
Symbol => ->(val, digest) {
|
44
|
+
digest << 'Symbol'.freeze
|
45
|
+
digest << val.to_s
|
46
|
+
},
|
47
|
+
Integer => ->(val, digest) {
|
48
|
+
digest << 'Integer'.freeze
|
49
|
+
digest << val.to_s
|
50
|
+
},
|
51
|
+
Array => ->(val, digest) {
|
52
|
+
digest << 'Array'.freeze
|
53
|
+
val.each do |element|
|
54
|
+
ADD_VALUE_TO_DIGEST[element.class].call(element, digest)
|
55
|
+
end
|
56
|
+
},
|
57
|
+
Hash => ->(val, digest) {
|
58
|
+
digest << 'Hash'.freeze
|
59
|
+
val.sort.each do |array|
|
60
|
+
ADD_VALUE_TO_DIGEST[Array].call(array, digest)
|
61
|
+
end
|
62
|
+
},
|
63
|
+
Set => ->(val, digest) {
|
64
|
+
digest << 'Set'.freeze
|
65
|
+
ADD_VALUE_TO_DIGEST[Array].call(val.to_a, digest)
|
66
|
+
},
|
67
|
+
Encoding => ->(val, digest) {
|
68
|
+
digest << 'Encoding'.freeze
|
69
|
+
digest << val.name
|
70
|
+
},
|
71
|
+
}
|
72
|
+
if 0.class != Integer # Ruby < 2.4
|
73
|
+
ADD_VALUE_TO_DIGEST[Fixnum] = ->(val, digest) {
|
74
|
+
digest << 'Integer'.freeze
|
75
|
+
digest << val.to_s
|
76
|
+
}
|
77
|
+
ADD_VALUE_TO_DIGEST[Bignum] = ->(val, digest) {
|
78
|
+
digest << 'Integer'.freeze
|
79
|
+
digest << val.to_s
|
80
|
+
}
|
81
|
+
end
|
82
|
+
ADD_VALUE_TO_DIGEST.default_proc = ->(_, val) {
|
83
|
+
raise TypeError, "couldn't digest #{ val }"
|
84
|
+
}
|
85
|
+
private_constant :ADD_VALUE_TO_DIGEST
|
86
|
+
|
87
|
+
# Internal: Generate a hexdigest for a nested JSON serializable object.
|
88
|
+
#
|
89
|
+
# This is used for generating cache keys, so its pretty important its
|
90
|
+
# wicked fast. Microbenchmarks away!
|
91
|
+
#
|
92
|
+
# obj - A JSON serializable object.
|
93
|
+
#
|
94
|
+
# Returns a String digest of the object.
|
95
|
+
def digest(obj)
|
96
|
+
digest = digest_class.new
|
97
|
+
|
98
|
+
ADD_VALUE_TO_DIGEST[obj.class].call(obj, digest)
|
99
|
+
digest.digest
|
100
|
+
end
|
101
|
+
|
102
|
+
# Internal: Pack a binary digest to a hex encoded string.
|
103
|
+
#
|
104
|
+
# bin - String bytes
|
105
|
+
#
|
106
|
+
# Returns hex String.
|
107
|
+
def pack_hexdigest(bin)
|
108
|
+
bin.unpack('H*').first
|
109
|
+
end
|
110
|
+
|
111
|
+
# Internal: Unpack a hex encoded digest string into binary bytes.
|
112
|
+
#
|
113
|
+
# hex - String hex
|
114
|
+
#
|
115
|
+
# Returns binary String.
|
116
|
+
def unpack_hexdigest(hex)
|
117
|
+
[hex].pack('H*')
|
118
|
+
end
|
119
|
+
|
120
|
+
# Internal: Pack a binary digest to a base64 encoded string.
|
121
|
+
#
|
122
|
+
# bin - String bytes
|
123
|
+
#
|
124
|
+
# Returns base64 String.
|
125
|
+
def pack_base64digest(bin)
|
126
|
+
[bin].pack('m0')
|
127
|
+
end
|
128
|
+
|
129
|
+
# Internal: Pack a binary digest to a urlsafe base64 encoded string.
|
130
|
+
#
|
131
|
+
# bin - String bytes
|
132
|
+
#
|
133
|
+
# Returns urlsafe base64 String.
|
134
|
+
def pack_urlsafe_base64digest(bin)
|
135
|
+
str = pack_base64digest(bin)
|
136
|
+
str.tr!('+/'.freeze, '-_'.freeze)
|
137
|
+
str.tr!('='.freeze, ''.freeze)
|
138
|
+
str
|
139
|
+
end
|
140
|
+
|
141
|
+
# Internal: Maps digest class to the CSP hash algorithm name.
|
142
|
+
HASH_ALGORITHMS = {
|
143
|
+
Digest::SHA256 => 'sha256'.freeze,
|
144
|
+
Digest::SHA384 => 'sha384'.freeze,
|
145
|
+
Digest::SHA512 => 'sha512'.freeze
|
146
|
+
}
|
147
|
+
|
148
|
+
# Public: Generate hash for use in the `integrity` attribute of an asset tag
|
149
|
+
# as per the subresource integrity specification.
|
150
|
+
#
|
151
|
+
# digest - The String byte digest of the asset content.
|
152
|
+
#
|
153
|
+
# Returns a String or nil if hash algorithm is incompatible.
|
154
|
+
def integrity_uri(digest)
|
155
|
+
case digest
|
156
|
+
when Digest::Base
|
157
|
+
digest_class = digest.class
|
158
|
+
digest = digest.digest
|
159
|
+
when String
|
160
|
+
digest_class = DIGEST_SIZES[digest.bytesize]
|
161
|
+
else
|
162
|
+
raise TypeError, "unknown digest: #{digest.inspect}"
|
163
|
+
end
|
164
|
+
|
165
|
+
if hash_name = HASH_ALGORITHMS[digest_class]
|
166
|
+
"#{hash_name}-#{pack_base64digest(digest)}"
|
167
|
+
end
|
168
|
+
end
|
169
|
+
|
170
|
+
# Public: Generate hash for use in the `integrity` attribute of an asset tag
|
171
|
+
# as per the subresource integrity specification.
|
172
|
+
#
|
173
|
+
# digest - The String hexbyte digest of the asset content.
|
174
|
+
#
|
175
|
+
# Returns a String or nil if hash algorithm is incompatible.
|
176
|
+
def hexdigest_integrity_uri(hexdigest)
|
177
|
+
integrity_uri(unpack_hexdigest(hexdigest))
|
178
|
+
end
|
179
|
+
end
|
180
|
+
end
|
@@ -0,0 +1,404 @@
|
|
1
|
+
require 'set'
|
2
|
+
require 'shellwords'
|
3
|
+
|
4
|
+
module Sprockets
|
5
|
+
# The `DirectiveProcessor` is responsible for parsing and evaluating
|
6
|
+
# directive comments in a source file.
|
7
|
+
#
|
8
|
+
# A directive comment starts with a comment prefix, followed by an "=",
|
9
|
+
# then the directive name, then any arguments.
|
10
|
+
#
|
11
|
+
# // JavaScript
|
12
|
+
# //= require "foo"
|
13
|
+
#
|
14
|
+
# # CoffeeScript
|
15
|
+
# #= require "bar"
|
16
|
+
#
|
17
|
+
# /* CSS
|
18
|
+
# *= require "baz"
|
19
|
+
# */
|
20
|
+
#
|
21
|
+
# This makes it possible to disable or modify the processor to do whatever
|
22
|
+
# you'd like. You could add your own custom directives or invent your own
|
23
|
+
# directive syntax.
|
24
|
+
#
|
25
|
+
# `Environment#processors` includes `DirectiveProcessor` by default.
|
26
|
+
#
|
27
|
+
# To remove the processor entirely:
|
28
|
+
#
|
29
|
+
# env.unregister_processor('text/css', Sprockets::DirectiveProcessor)
|
30
|
+
# env.unregister_processor('application/javascript', Sprockets::DirectiveProcessor)
|
31
|
+
#
|
32
|
+
# Then inject your own preprocessor:
|
33
|
+
#
|
34
|
+
# env.register_processor('text/css', MyProcessor)
|
35
|
+
#
|
36
|
+
class DirectiveProcessor
|
37
|
+
VERSION = '1'
|
38
|
+
|
39
|
+
# Directives are denoted by a `=` followed by the name, then
|
40
|
+
# argument list.
|
41
|
+
#
|
42
|
+
# A few different styles are allowed:
|
43
|
+
#
|
44
|
+
# // =require foo
|
45
|
+
# //= require foo
|
46
|
+
# //= require "foo"
|
47
|
+
#
|
48
|
+
DIRECTIVE_PATTERN = /
|
49
|
+
^ \W* = \s* (\w+.*?) (\*\/)? $
|
50
|
+
/x
|
51
|
+
|
52
|
+
def self.instance
|
53
|
+
@instance ||= new(
|
54
|
+
# Deprecated: Default to C and Ruby comment styles
|
55
|
+
comments: ["//", ["/*", "*/"]] + ["#", ["###", "###"]]
|
56
|
+
)
|
57
|
+
end
|
58
|
+
|
59
|
+
def self.call(input)
|
60
|
+
instance.call(input)
|
61
|
+
end
|
62
|
+
|
63
|
+
def initialize(options = {})
|
64
|
+
@header_pattern = compile_header_pattern(Array(options[:comments]))
|
65
|
+
end
|
66
|
+
|
67
|
+
def call(input)
|
68
|
+
dup._call(input)
|
69
|
+
end
|
70
|
+
|
71
|
+
def _call(input)
|
72
|
+
@environment = input[:environment]
|
73
|
+
@uri = input[:uri]
|
74
|
+
@filename = input[:filename]
|
75
|
+
@dirname = File.dirname(@filename)
|
76
|
+
@content_type = input[:content_type]
|
77
|
+
@required = Set.new(input[:metadata][:required])
|
78
|
+
@stubbed = Set.new(input[:metadata][:stubbed])
|
79
|
+
@links = Set.new(input[:metadata][:links])
|
80
|
+
@dependencies = Set.new(input[:metadata][:dependencies])
|
81
|
+
|
82
|
+
data, directives = process_source(input[:data])
|
83
|
+
process_directives(directives)
|
84
|
+
|
85
|
+
{ data: data,
|
86
|
+
required: @required,
|
87
|
+
stubbed: @stubbed,
|
88
|
+
links: @links,
|
89
|
+
dependencies: @dependencies }
|
90
|
+
end
|
91
|
+
|
92
|
+
protected
|
93
|
+
# Directives will only be picked up if they are in the header
|
94
|
+
# of the source file. C style (/* */), JavaScript (//), and
|
95
|
+
# Ruby (#) comments are supported.
|
96
|
+
#
|
97
|
+
# Directives in comments after the first non-whitespace line
|
98
|
+
# of code will not be processed.
|
99
|
+
def compile_header_pattern(comments)
|
100
|
+
re = comments.map { |c|
|
101
|
+
case c
|
102
|
+
when String
|
103
|
+
"(?:#{Regexp.escape(c)}.*\\n?)+"
|
104
|
+
when Array
|
105
|
+
"(?:#{Regexp.escape(c[0])}(?m:.*?)#{Regexp.escape(c[1])})"
|
106
|
+
else
|
107
|
+
raise TypeError, "unknown comment type: #{c.class}"
|
108
|
+
end
|
109
|
+
}.join("|")
|
110
|
+
Regexp.compile("\\A(?:(?m:\\s*)(?:#{re}))+")
|
111
|
+
end
|
112
|
+
|
113
|
+
def process_source(source)
|
114
|
+
header = source[@header_pattern, 0] || ""
|
115
|
+
body = $' || source
|
116
|
+
|
117
|
+
header, directives = extract_directives(header)
|
118
|
+
|
119
|
+
data = ""
|
120
|
+
data.force_encoding(body.encoding)
|
121
|
+
data << header << "\n" unless header.empty?
|
122
|
+
data << body
|
123
|
+
# Ensure body ends in a new line
|
124
|
+
data << "\n" if data.length > 0 && data[-1] != "\n"
|
125
|
+
|
126
|
+
return data, directives
|
127
|
+
end
|
128
|
+
|
129
|
+
# Returns an Array of directive structures. Each structure
|
130
|
+
# is an Array with the line number as the first element, the
|
131
|
+
# directive name as the second element, followed by any
|
132
|
+
# arguments.
|
133
|
+
#
|
134
|
+
# [[1, "require", "foo"], [2, "require", "bar"]]
|
135
|
+
#
|
136
|
+
def extract_directives(header)
|
137
|
+
processed_header = ""
|
138
|
+
directives = []
|
139
|
+
|
140
|
+
header.lines.each_with_index do |line, index|
|
141
|
+
if directive = line[DIRECTIVE_PATTERN, 1]
|
142
|
+
name, *args = Shellwords.shellwords(directive)
|
143
|
+
if respond_to?("process_#{name}_directive", true)
|
144
|
+
directives << [index + 1, name, *args]
|
145
|
+
# Replace directive line with a clean break
|
146
|
+
line = "\n"
|
147
|
+
end
|
148
|
+
end
|
149
|
+
processed_header << line
|
150
|
+
end
|
151
|
+
|
152
|
+
return processed_header.chomp, directives
|
153
|
+
end
|
154
|
+
|
155
|
+
# Gathers comment directives in the source and processes them.
|
156
|
+
# Any directive method matching `process_*_directive` will
|
157
|
+
# automatically be available. This makes it easy to extend the
|
158
|
+
# processor.
|
159
|
+
#
|
160
|
+
# To implement a custom directive called `require_glob`, subclass
|
161
|
+
# `Sprockets::DirectiveProcessor`, then add a method called
|
162
|
+
# `process_require_glob_directive`.
|
163
|
+
#
|
164
|
+
# class DirectiveProcessor < Sprockets::DirectiveProcessor
|
165
|
+
# def process_require_glob_directive
|
166
|
+
# Dir["#{dirname}/#{glob}"].sort.each do |filename|
|
167
|
+
# require(filename)
|
168
|
+
# end
|
169
|
+
# end
|
170
|
+
# end
|
171
|
+
#
|
172
|
+
# Replace the current processor on the environment with your own:
|
173
|
+
#
|
174
|
+
# env.unregister_processor('text/css', Sprockets::DirectiveProcessor)
|
175
|
+
# env.register_processor('text/css', DirectiveProcessor)
|
176
|
+
#
|
177
|
+
def process_directives(directives)
|
178
|
+
directives.each do |line_number, name, *args|
|
179
|
+
begin
|
180
|
+
send("process_#{name}_directive", *args)
|
181
|
+
rescue Exception => e
|
182
|
+
e.set_backtrace(["#{@filename}:#{line_number}"] + e.backtrace)
|
183
|
+
raise e
|
184
|
+
end
|
185
|
+
end
|
186
|
+
end
|
187
|
+
|
188
|
+
# The `require` directive functions similar to Ruby's own `require`.
|
189
|
+
# It provides a way to declare a dependency on a file in your path
|
190
|
+
# and ensures its only loaded once before the source file.
|
191
|
+
#
|
192
|
+
# `require` works with files in the environment path:
|
193
|
+
#
|
194
|
+
# //= require "foo.js"
|
195
|
+
#
|
196
|
+
# Extensions are optional. If your source file is ".js", it
|
197
|
+
# assumes you are requiring another ".js".
|
198
|
+
#
|
199
|
+
# //= require "foo"
|
200
|
+
#
|
201
|
+
# Relative paths work too. Use a leading `./` to denote a relative
|
202
|
+
# path:
|
203
|
+
#
|
204
|
+
# //= require "./bar"
|
205
|
+
#
|
206
|
+
def process_require_directive(path)
|
207
|
+
@required << resolve(path, accept: @content_type, pipeline: :self)
|
208
|
+
end
|
209
|
+
|
210
|
+
# `require_self` causes the body of the current file to be inserted
|
211
|
+
# before any subsequent `require` directives. Useful in CSS files, where
|
212
|
+
# it's common for the index file to contain global styles that need to
|
213
|
+
# be defined before other dependencies are loaded.
|
214
|
+
#
|
215
|
+
# /*= require "reset"
|
216
|
+
# *= require_self
|
217
|
+
# *= require_tree .
|
218
|
+
# */
|
219
|
+
#
|
220
|
+
def process_require_self_directive
|
221
|
+
if @required.include?(@uri)
|
222
|
+
raise ArgumentError, "require_self can only be called once per source file"
|
223
|
+
end
|
224
|
+
@required << @uri
|
225
|
+
end
|
226
|
+
|
227
|
+
# `require_directory` requires all the files inside a single
|
228
|
+
# directory. It's similar to `path/*` since it does not follow
|
229
|
+
# nested directories.
|
230
|
+
#
|
231
|
+
# //= require_directory "./javascripts"
|
232
|
+
#
|
233
|
+
def process_require_directory_directive(path = ".")
|
234
|
+
path = expand_relative_dirname(:require_directory, path)
|
235
|
+
require_paths(*@environment.stat_directory_with_dependencies(path))
|
236
|
+
end
|
237
|
+
|
238
|
+
# `require_tree` requires all the nested files in a directory.
|
239
|
+
# Its glob equivalent is `path/**/*`.
|
240
|
+
#
|
241
|
+
# //= require_tree "./public"
|
242
|
+
#
|
243
|
+
def process_require_tree_directive(path = ".")
|
244
|
+
path = expand_relative_dirname(:require_tree, path)
|
245
|
+
require_paths(*@environment.stat_sorted_tree_with_dependencies(path))
|
246
|
+
end
|
247
|
+
|
248
|
+
# Allows you to state a dependency on a file without
|
249
|
+
# including it.
|
250
|
+
#
|
251
|
+
# This is used for caching purposes. Any changes made to
|
252
|
+
# the dependency file will invalidate the cache of the
|
253
|
+
# source file.
|
254
|
+
#
|
255
|
+
# This is useful if you are using ERB and File.read to pull
|
256
|
+
# in contents from another file.
|
257
|
+
#
|
258
|
+
# //= depend_on "foo.png"
|
259
|
+
#
|
260
|
+
def process_depend_on_directive(path)
|
261
|
+
resolve(path)
|
262
|
+
end
|
263
|
+
|
264
|
+
# Allows you to state a dependency on an asset without including
|
265
|
+
# it.
|
266
|
+
#
|
267
|
+
# This is used for caching purposes. Any changes that would
|
268
|
+
# invalid the asset dependency will invalidate the cache our the
|
269
|
+
# source file.
|
270
|
+
#
|
271
|
+
# Unlike `depend_on`, the path must be a requirable asset.
|
272
|
+
#
|
273
|
+
# //= depend_on_asset "bar.js"
|
274
|
+
#
|
275
|
+
def process_depend_on_asset_directive(path)
|
276
|
+
load(resolve(path))
|
277
|
+
end
|
278
|
+
|
279
|
+
# Allows dependency to be excluded from the asset bundle.
|
280
|
+
#
|
281
|
+
# The `path` must be a valid asset and may or may not already
|
282
|
+
# be part of the bundle. Once stubbed, it is blacklisted and
|
283
|
+
# can't be brought back by any other `require`.
|
284
|
+
#
|
285
|
+
# //= stub "jquery"
|
286
|
+
#
|
287
|
+
def process_stub_directive(path)
|
288
|
+
@stubbed << resolve(path, accept: @content_type, pipeline: :self)
|
289
|
+
end
|
290
|
+
|
291
|
+
# Declares a linked dependency on the target asset.
|
292
|
+
#
|
293
|
+
# The `path` must be a valid asset and should not already be part of the
|
294
|
+
# bundle. Any linked assets will automatically be compiled along with the
|
295
|
+
# current.
|
296
|
+
#
|
297
|
+
# /*= link "logo.png" */
|
298
|
+
#
|
299
|
+
def process_link_directive(path)
|
300
|
+
@links << load(resolve(path)).uri
|
301
|
+
end
|
302
|
+
|
303
|
+
# `link_directory` links all the files inside a single
|
304
|
+
# directory. It's similar to `path/*` since it does not follow
|
305
|
+
# nested directories.
|
306
|
+
#
|
307
|
+
# //= link_directory "./fonts"
|
308
|
+
#
|
309
|
+
# Use caution when linking against JS or CSS assets. Include an explicit
|
310
|
+
# extension or content type in these cases
|
311
|
+
#
|
312
|
+
# //= link_directory "./scripts" .js
|
313
|
+
#
|
314
|
+
def process_link_directory_directive(path = ".", accept = nil)
|
315
|
+
path = expand_relative_dirname(:link_directory, path)
|
316
|
+
accept = expand_accept_shorthand(accept)
|
317
|
+
link_paths(*@environment.stat_directory_with_dependencies(path), accept)
|
318
|
+
end
|
319
|
+
|
320
|
+
# `link_tree` links all the nested files in a directory.
|
321
|
+
# Its glob equivalent is `path/**/*`.
|
322
|
+
#
|
323
|
+
# //= link_tree "./images"
|
324
|
+
#
|
325
|
+
# Use caution when linking against JS or CSS assets. Include an explicit
|
326
|
+
# extension or content type in these cases
|
327
|
+
#
|
328
|
+
# //= link_tree "./styles" .css
|
329
|
+
#
|
330
|
+
def process_link_tree_directive(path = ".", accept = nil)
|
331
|
+
path = expand_relative_dirname(:link_tree, path)
|
332
|
+
accept = expand_accept_shorthand(accept)
|
333
|
+
link_paths(*@environment.stat_sorted_tree_with_dependencies(path), accept)
|
334
|
+
end
|
335
|
+
|
336
|
+
private
|
337
|
+
def expand_accept_shorthand(accept)
|
338
|
+
if accept.nil?
|
339
|
+
nil
|
340
|
+
elsif accept.include?("/")
|
341
|
+
accept
|
342
|
+
elsif accept.start_with?(".")
|
343
|
+
@environment.mime_exts[accept]
|
344
|
+
else
|
345
|
+
@environment.mime_exts[".#{accept}"]
|
346
|
+
end
|
347
|
+
end
|
348
|
+
|
349
|
+
def require_paths(paths, deps)
|
350
|
+
resolve_paths(paths, deps, accept: @content_type, pipeline: :self) do |uri|
|
351
|
+
@required << uri
|
352
|
+
end
|
353
|
+
end
|
354
|
+
|
355
|
+
def link_paths(paths, deps, accept)
|
356
|
+
resolve_paths(paths, deps, accept: accept) do |uri|
|
357
|
+
@links << load(uri).uri
|
358
|
+
end
|
359
|
+
end
|
360
|
+
|
361
|
+
def resolve_paths(paths, deps, options = {})
|
362
|
+
@dependencies.merge(deps)
|
363
|
+
paths.each do |subpath, stat|
|
364
|
+
next if subpath == @filename || stat.directory?
|
365
|
+
uri, deps = @environment.resolve(subpath, options.merge(compat: false))
|
366
|
+
@dependencies.merge(deps)
|
367
|
+
yield uri if uri
|
368
|
+
end
|
369
|
+
end
|
370
|
+
|
371
|
+
def expand_relative_dirname(directive, path)
|
372
|
+
if @environment.relative_path?(path)
|
373
|
+
path = File.expand_path(path, @dirname)
|
374
|
+
stat = @environment.stat(path)
|
375
|
+
|
376
|
+
if stat && stat.directory?
|
377
|
+
path
|
378
|
+
else
|
379
|
+
raise ArgumentError, "#{directive} argument must be a directory"
|
380
|
+
end
|
381
|
+
else
|
382
|
+
# The path must be relative and start with a `./`.
|
383
|
+
raise ArgumentError, "#{directive} argument must be a relative path"
|
384
|
+
end
|
385
|
+
end
|
386
|
+
|
387
|
+
def load(uri)
|
388
|
+
asset = @environment.load(uri)
|
389
|
+
@dependencies.merge(asset.metadata[:dependencies])
|
390
|
+
asset
|
391
|
+
end
|
392
|
+
|
393
|
+
def resolve(path, options = {})
|
394
|
+
# Prevent absolute paths in directives
|
395
|
+
if @environment.absolute_path?(path)
|
396
|
+
raise FileOutsidePaths, "can't require absolute file: #{path}"
|
397
|
+
end
|
398
|
+
|
399
|
+
uri, deps = @environment.resolve!(path, options.merge(base_path: @dirname))
|
400
|
+
@dependencies.merge(deps)
|
401
|
+
uri
|
402
|
+
end
|
403
|
+
end
|
404
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'sprockets/autoload'
|
2
|
+
|
3
|
+
module Sprockets
|
4
|
+
# Processor engine class for the Eco compiler. Depends on the `eco` gem.
|
5
|
+
#
|
6
|
+
# For more infomation see:
|
7
|
+
#
|
8
|
+
# https://github.com/sstephenson/ruby-eco
|
9
|
+
# https://github.com/sstephenson/eco
|
10
|
+
#
|
11
|
+
module EcoProcessor
|
12
|
+
VERSION = '1'
|
13
|
+
|
14
|
+
def self.cache_key
|
15
|
+
@cache_key ||= "#{name}:#{Autoload::Eco::Source::VERSION}:#{VERSION}".freeze
|
16
|
+
end
|
17
|
+
|
18
|
+
# Compile template data with Eco compiler.
|
19
|
+
#
|
20
|
+
# Returns a JS function definition String. The result should be
|
21
|
+
# assigned to a JS variable.
|
22
|
+
#
|
23
|
+
# # => "function(...) {...}"
|
24
|
+
#
|
25
|
+
def self.call(input)
|
26
|
+
data = input[:data]
|
27
|
+
input[:cache].fetch([cache_key, data]) do
|
28
|
+
Autoload::Eco.compile(data)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'sprockets/eco_processor'
|
2
|
+
|
3
|
+
module Sprockets
|
4
|
+
# Deprecated
|
5
|
+
module EcoTemplate
|
6
|
+
VERSION = EcoProcessor::VERSION
|
7
|
+
|
8
|
+
def self.cache_key
|
9
|
+
EcoProcessor.cache_key
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.call(*args)
|
13
|
+
Deprecation.new.warn "EcoTemplate is deprecated please use EcoProcessor instead"
|
14
|
+
EcoProcessor.call(*args)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require 'sprockets/autoload'
|
2
|
+
|
3
|
+
module Sprockets
|
4
|
+
# Processor engine class for the EJS compiler. Depends on the `ejs` gem.
|
5
|
+
#
|
6
|
+
# For more infomation see:
|
7
|
+
#
|
8
|
+
# https://github.com/sstephenson/ruby-ejs
|
9
|
+
#
|
10
|
+
module EjsProcessor
|
11
|
+
VERSION = '1'
|
12
|
+
|
13
|
+
def self.cache_key
|
14
|
+
@cache_key ||= "#{name}:#{VERSION}".freeze
|
15
|
+
end
|
16
|
+
|
17
|
+
# Compile template data with EJS compiler.
|
18
|
+
#
|
19
|
+
# Returns a JS function definition String. The result should be
|
20
|
+
# assigned to a JS variable.
|
21
|
+
#
|
22
|
+
# # => "function(obj){...}"
|
23
|
+
#
|
24
|
+
def self.call(input)
|
25
|
+
data = input[:data]
|
26
|
+
input[:cache].fetch([cache_key, data]) do
|
27
|
+
Autoload::EJS.compile(data)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'sprockets/ejs_processor'
|
2
|
+
|
3
|
+
module Sprockets
|
4
|
+
# Deprecated
|
5
|
+
module EjsTemplate
|
6
|
+
VERSION = EjsProcessor::VERSION
|
7
|
+
|
8
|
+
def self.cache_key
|
9
|
+
EjsProcessor.cache_key
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.call(*args)
|
13
|
+
Deprecation.new.warn "EjsTemplate is deprecated please use EjsProcessor instead"
|
14
|
+
EjsProcessor.call(*args)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|