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,509 @@
|
|
1
|
+
# Sprockets: Rack-based asset packaging
|
2
|
+
|
3
|
+
Sprockets is a Ruby library for compiling and serving web assets.
|
4
|
+
It features declarative dependency management for JavaScript and CSS
|
5
|
+
assets, as well as a powerful preprocessor pipeline that allows you to
|
6
|
+
write assets in languages like CoffeeScript, Sass and SCSS.
|
7
|
+
|
8
|
+
|
9
|
+
## Installation
|
10
|
+
|
11
|
+
Install Sprockets from RubyGems:
|
12
|
+
|
13
|
+
``` sh
|
14
|
+
$ gem install sprockets
|
15
|
+
```
|
16
|
+
|
17
|
+
Or include it in your project's `Gemfile` with Bundler:
|
18
|
+
|
19
|
+
``` ruby
|
20
|
+
gem 'sprockets', '~> 3.0'
|
21
|
+
```
|
22
|
+
|
23
|
+
## Using sprockets
|
24
|
+
|
25
|
+
For most people interested in using sprockets you will want to see [End User Asset Generation](guides/end_user_asset_generation.md) guide. This contains information about sprocket's directive syntax, and default processing behavior.
|
26
|
+
|
27
|
+
If you are a framework developer that is using sprockets, see [Building an Asset Processing Framework](guides/building_an_asset_processing_framework.md).
|
28
|
+
|
29
|
+
If you are a library developer who is extending the functionality of sprockets, see [Extending Sprockets](guides/extending_sprockets.md).
|
30
|
+
|
31
|
+
Below is a disjointed mix of documentation for all three of these roles. Eventually they will be moved to an appropriate guide, for now the recommended way to consume documentation is to view the appropriate guide first and then supplement with docs from the README.
|
32
|
+
|
33
|
+
## Behavior
|
34
|
+
|
35
|
+
### Index files are proxies for folders
|
36
|
+
|
37
|
+
In sprockets index files such as `index.js` or `index.css` files inside of a folder will generate a file with the folder's name. So if you have a `foo/index.js` file it will compile down to `foo.js`. This is similar to NPM's behavior of using [folders as modules](https://nodejs.org/api/modules.html#modules_folders_as_modules). It is also somewhat similar to the way that a file in `public/my_folder/index.html` can be reached by a request to `/my_folder`. This means that you cannot directly use an index file. For example this would not work:
|
38
|
+
|
39
|
+
```
|
40
|
+
<%= asset_path("foo/index.js") %>
|
41
|
+
```
|
42
|
+
|
43
|
+
Instead you would need to use:
|
44
|
+
|
45
|
+
```
|
46
|
+
<%= asset_path("foo.js") %>
|
47
|
+
```
|
48
|
+
|
49
|
+
Why would you want to use this behavior? It is common behavior where you might want to include an entire directory of files in a top level javascript. You can do this in sprockets using `require_tree .`
|
50
|
+
|
51
|
+
```
|
52
|
+
//= require_tree .
|
53
|
+
```
|
54
|
+
|
55
|
+
This has the problem that files are required alphabetically. If your directory has `jquery-ui.js` and `jquery.min.js` then sprockets will require `jquery-ui.js` before `jquery` is required which won't work (because jquery-ui depends on jquery). Previously the only way to get the correct ordering would be to rename your files, something like `0-jquery-ui.js`. Instead of doing that you can use an index file.
|
56
|
+
|
57
|
+
For example, if you have an `application.js` and want all the files in the `foo/` folder you could do this:
|
58
|
+
|
59
|
+
```
|
60
|
+
//= require foo.js
|
61
|
+
```
|
62
|
+
|
63
|
+
Then create a file `foo/index.js` that requires all the files in that folder in any order you want:
|
64
|
+
|
65
|
+
```
|
66
|
+
//= require foo.min.js
|
67
|
+
//= require foo-ui.js
|
68
|
+
```
|
69
|
+
|
70
|
+
Now in your `application.js` will correctly load the `foo.min.js` before `foo-ui.js`. If you used `require_tree` it would not work correctly.
|
71
|
+
|
72
|
+
## Understanding the Sprockets Environment
|
73
|
+
|
74
|
+
You'll need an instance of the `Sprockets::Environment` class to
|
75
|
+
access and serve assets from your application. Under Rails 4.0 and
|
76
|
+
later, `YourApp::Application.assets` is a preconfigured
|
77
|
+
`Sprockets::Environment` instance. For Rack-based applications, create
|
78
|
+
an instance in `config.ru`.
|
79
|
+
|
80
|
+
The Sprockets `Environment` has methods for retrieving and serving
|
81
|
+
assets, manipulating the load path, and registering processors. It is
|
82
|
+
also a Rack application that can be mounted at a URL to serve assets
|
83
|
+
over HTTP.
|
84
|
+
|
85
|
+
### The Load Path
|
86
|
+
|
87
|
+
The *load path* is an ordered list of directories that Sprockets uses
|
88
|
+
to search for assets.
|
89
|
+
|
90
|
+
In the simplest case, a Sprockets environment's load path will consist
|
91
|
+
of a single directory containing your application's asset source
|
92
|
+
files. When mounted, the environment will serve assets from this
|
93
|
+
directory as if they were static files in your public root.
|
94
|
+
|
95
|
+
The power of the load path is that it lets you organize your source
|
96
|
+
files into multiple directories -- even directories that live outside
|
97
|
+
your application -- and combine those directories into a single
|
98
|
+
virtual filesystem. That means you can easily bundle JavaScript, CSS
|
99
|
+
and images into a Ruby library or [Bower](http://bower.io) package and import them into your application.
|
100
|
+
|
101
|
+
#### Manipulating the Load Path
|
102
|
+
|
103
|
+
To add a directory to your environment's load path, use the
|
104
|
+
`append_path` and `prepend_path` methods. Directories at the beginning
|
105
|
+
of the load path have precedence over subsequent directories.
|
106
|
+
|
107
|
+
``` ruby
|
108
|
+
environment = Sprockets::Environment.new
|
109
|
+
environment.append_path 'app/assets/javascripts'
|
110
|
+
environment.append_path 'lib/assets/javascripts'
|
111
|
+
environment.append_path 'vendor/assets/bower_components'
|
112
|
+
```
|
113
|
+
|
114
|
+
In general, you should append to the path by default and reserve
|
115
|
+
prepending for cases where you need to override existing assets.
|
116
|
+
|
117
|
+
### Accessing Assets
|
118
|
+
|
119
|
+
Once you've set up your environment's load path, you can mount the
|
120
|
+
environment as a Rack server and request assets via HTTP. You can also
|
121
|
+
access assets programmatically from within your application.
|
122
|
+
|
123
|
+
#### Logical Paths
|
124
|
+
|
125
|
+
Assets in Sprockets are always referenced by their *logical path*.
|
126
|
+
|
127
|
+
The logical path is the path of the asset source file relative to its
|
128
|
+
containing directory in the load path. For example, if your load path
|
129
|
+
contains the directory `app/assets/javascripts`:
|
130
|
+
|
131
|
+
<table>
|
132
|
+
<tr>
|
133
|
+
<th>Asset source file</th>
|
134
|
+
<th>Logical path</th>
|
135
|
+
</tr>
|
136
|
+
<tr>
|
137
|
+
<td>app/assets/javascripts/application.js</td>
|
138
|
+
<td>application.js</td>
|
139
|
+
</tr>
|
140
|
+
<tr>
|
141
|
+
<td>app/assets/javascripts/models/project.js</td>
|
142
|
+
<td>models/project.js</td>
|
143
|
+
</tr>
|
144
|
+
</table>
|
145
|
+
|
146
|
+
In this way, all directories in the load path are merged to create a
|
147
|
+
virtual filesystem whose entries are logical paths.
|
148
|
+
|
149
|
+
#### Serving Assets Over HTTP
|
150
|
+
|
151
|
+
When you mount an environment, all of its assets are accessible as
|
152
|
+
logical paths underneath the *mount point*. For example, if you mount
|
153
|
+
your environment at `/assets` and request the URL
|
154
|
+
`/assets/application.js`, Sprockets will search your load path for the
|
155
|
+
file named `application.js` and serve it.
|
156
|
+
|
157
|
+
Under Rails 4.0 and later, your Sprockets environment is automatically
|
158
|
+
mounted at `/assets`. If you are using Sprockets with a Rack
|
159
|
+
application, you will need to mount the environment yourself. A good
|
160
|
+
way to do this is with the `map` method in `config.ru`:
|
161
|
+
|
162
|
+
``` ruby
|
163
|
+
require 'sprockets'
|
164
|
+
map '/assets' do
|
165
|
+
environment = Sprockets::Environment.new
|
166
|
+
environment.append_path 'app/assets/javascripts'
|
167
|
+
environment.append_path 'app/assets/stylesheets'
|
168
|
+
run environment
|
169
|
+
end
|
170
|
+
|
171
|
+
map '/' do
|
172
|
+
run YourRackApp
|
173
|
+
end
|
174
|
+
```
|
175
|
+
|
176
|
+
#### Accessing Assets Programmatically
|
177
|
+
|
178
|
+
You can use the `find_asset` method (aliased as `[]`) to retrieve an
|
179
|
+
asset from a Sprockets environment. Pass it a logical path and you'll
|
180
|
+
get a `Sprockets::Asset` instance back:
|
181
|
+
|
182
|
+
``` ruby
|
183
|
+
environment['application.js']
|
184
|
+
# => #<Sprockets::Asset ...>
|
185
|
+
```
|
186
|
+
|
187
|
+
Call `to_s` on the resulting asset to access its contents, `length` to
|
188
|
+
get its length in bytes, `mtime` to query its last-modified time, and
|
189
|
+
`filename` to get its full path on the filesystem.
|
190
|
+
|
191
|
+
|
192
|
+
## Using Processors
|
193
|
+
|
194
|
+
Asset source files can be written in another format, like SCSS or
|
195
|
+
CoffeeScript, and automatically compiled to CSS or JavaScript by
|
196
|
+
Sprockets. Processors that convert a file from one format to another are called *transformers*.
|
197
|
+
|
198
|
+
### Minifying Assets
|
199
|
+
|
200
|
+
Several JavaScript and CSS minifiers are available through shorthand.
|
201
|
+
|
202
|
+
``` ruby
|
203
|
+
environment.js_compressor = :uglify
|
204
|
+
environment.css_compressor = :scss
|
205
|
+
```
|
206
|
+
|
207
|
+
### Styling with Sass and SCSS
|
208
|
+
|
209
|
+
[Sass](http://sass-lang.com/) is a language that compiles to CSS and
|
210
|
+
adds features like nested rules, variables, mixins and selector
|
211
|
+
inheritance.
|
212
|
+
|
213
|
+
If the `sass` gem is available to your application, you can use Sass
|
214
|
+
to write CSS assets in Sprockets.
|
215
|
+
|
216
|
+
Sprockets supports both Sass syntaxes. For the original
|
217
|
+
whitespace-sensitive syntax, use the extension `.sass`. For the
|
218
|
+
new SCSS syntax, use the extension `.scss`.
|
219
|
+
|
220
|
+
### Scripting with CoffeeScript
|
221
|
+
|
222
|
+
[CoffeeScript](http://jashkenas.github.com/coffee-script/) is a
|
223
|
+
language that compiles to the "good parts" of JavaScript, featuring a
|
224
|
+
cleaner syntax with array comprehensions, classes, and function
|
225
|
+
binding.
|
226
|
+
|
227
|
+
If the `coffee-script` gem is available to your application, you can
|
228
|
+
use CoffeeScript to write JavaScript assets in Sprockets. Note that
|
229
|
+
the CoffeeScript compiler is written in JavaScript, and you will need
|
230
|
+
an [ExecJS](https://github.com/rails/execjs)-supported runtime
|
231
|
+
on your system to invoke it.
|
232
|
+
|
233
|
+
To write JavaScript assets with CoffeeScript, use the extension
|
234
|
+
`.coffee`.
|
235
|
+
|
236
|
+
### JavaScript Templating with EJS and Eco
|
237
|
+
|
238
|
+
Sprockets supports *JavaScript templates* for client-side rendering of
|
239
|
+
strings or markup. JavaScript templates have the special format
|
240
|
+
extension `.jst` and are compiled to JavaScript functions.
|
241
|
+
|
242
|
+
When loaded, a JavaScript template function can be accessed by its
|
243
|
+
logical path as a property on the global `JST` object. Invoke a
|
244
|
+
template function to render the template as a string. The resulting
|
245
|
+
string can then be inserted into the DOM.
|
246
|
+
|
247
|
+
```
|
248
|
+
<!-- templates/hello.jst.ejs -->
|
249
|
+
<div>Hello, <span><%= name %></span>!</div>
|
250
|
+
|
251
|
+
// application.js
|
252
|
+
//= require templates/hello
|
253
|
+
$("#hello").html(JST["templates/hello"]({ name: "Sam" }));
|
254
|
+
```
|
255
|
+
|
256
|
+
Sprockets supports two JavaScript template languages:
|
257
|
+
[EJS](https://github.com/sstephenson/ruby-ejs), for embedded
|
258
|
+
JavaScript, and [Eco](https://github.com/sstephenson/ruby-eco), for
|
259
|
+
embedded CoffeeScript. Both languages use the familiar `<% … %>`
|
260
|
+
syntax for embedding logic in templates.
|
261
|
+
|
262
|
+
If the `ejs` gem is available to your application, you can use EJS
|
263
|
+
templates in Sprockets. EJS templates have the extension `.jst.ejs`.
|
264
|
+
|
265
|
+
If the `eco` gem is available to your application, you can use [Eco
|
266
|
+
templates](https://github.com/sstephenson/eco) in Sprockets. Eco
|
267
|
+
templates have the extension `.jst.eco`. Note that the `eco` gem
|
268
|
+
depends on the CoffeeScript compiler, so the same caveats apply as
|
269
|
+
outlined above for the CoffeeScript engine.
|
270
|
+
|
271
|
+
### Invoking Ruby with ERB
|
272
|
+
|
273
|
+
Sprockets provides an ERB engine for preprocessing assets using
|
274
|
+
embedded Ruby code. Append `.erb` to a CSS or JavaScript asset's
|
275
|
+
filename to enable the ERB engine.
|
276
|
+
|
277
|
+
Ruby code embedded in an asset is evaluated in the context of a
|
278
|
+
`Sprockets::Context` instance for the given asset. Common uses for ERB
|
279
|
+
include:
|
280
|
+
|
281
|
+
- embedding another asset as a Base64-encoded `data:` URI with the
|
282
|
+
`asset_data_uri` helper
|
283
|
+
- inserting the URL to another asset, such as with the `asset_path`
|
284
|
+
helper provided by the Sprockets Rails plugin
|
285
|
+
- embedding other application resources, such as a localized string
|
286
|
+
database, in a JavaScript asset via JSON
|
287
|
+
- embedding version constants loaded from another file
|
288
|
+
|
289
|
+
See the [Helper Methods](lib/sprockets/context.rb) section for more information about
|
290
|
+
interacting with `Sprockets::Context` instances via ERB.
|
291
|
+
|
292
|
+
|
293
|
+
## Managing and Bundling Dependencies
|
294
|
+
|
295
|
+
You can create *asset bundles* -- ordered concatenations of asset
|
296
|
+
source files -- by specifying dependencies in a special comment syntax
|
297
|
+
at the top of each source file.
|
298
|
+
|
299
|
+
Sprockets reads these comments, called *directives*, and processes
|
300
|
+
them to recursively build a dependency graph. When you request an
|
301
|
+
asset with dependencies, the dependencies will be included in order at
|
302
|
+
the top of the file.
|
303
|
+
|
304
|
+
### The Directive Processor
|
305
|
+
|
306
|
+
Sprockets runs the *directive processor* on each CSS and JavaScript
|
307
|
+
source file. The directive processor scans for comment lines beginning
|
308
|
+
with `=` in comment blocks at the top of the file.
|
309
|
+
|
310
|
+
``` js
|
311
|
+
//= require jquery
|
312
|
+
//= require jquery-ui
|
313
|
+
//= require backbone
|
314
|
+
//= require_tree .
|
315
|
+
```
|
316
|
+
|
317
|
+
The first word immediately following `=` specifies the directive
|
318
|
+
name. Any words following the directive name are treated as
|
319
|
+
arguments. Arguments may be placed in single or double quotes if they
|
320
|
+
contain spaces, similar to commands in the Unix shell.
|
321
|
+
|
322
|
+
**Note**: Non-directive comment lines will be preserved in the final
|
323
|
+
asset, but directive comments are stripped after
|
324
|
+
processing. Sprockets will not look for directives in comment blocks
|
325
|
+
that occur after the first line of code.
|
326
|
+
|
327
|
+
#### Supported Comment Types
|
328
|
+
|
329
|
+
The directive processor understands comment blocks in three formats:
|
330
|
+
|
331
|
+
``` css
|
332
|
+
/* Multi-line comment blocks (CSS, SCSS, JavaScript)
|
333
|
+
*= require foo
|
334
|
+
*/
|
335
|
+
```
|
336
|
+
|
337
|
+
``` js
|
338
|
+
// Single-line comment blocks (SCSS, JavaScript)
|
339
|
+
//= require foo
|
340
|
+
```
|
341
|
+
|
342
|
+
``` coffee
|
343
|
+
# Single-line comment blocks (CoffeeScript)
|
344
|
+
#= require foo
|
345
|
+
```
|
346
|
+
|
347
|
+
### Sprockets Directives
|
348
|
+
|
349
|
+
You can use the following directives to declare dependencies in asset
|
350
|
+
source files.
|
351
|
+
|
352
|
+
For directives that take a *path* argument, you may specify either a
|
353
|
+
logical path or a relative path. Relative paths begin with `./` and
|
354
|
+
reference files relative to the location of the current file.
|
355
|
+
|
356
|
+
#### The `require` Directive
|
357
|
+
|
358
|
+
`require` *path* inserts the contents of the asset source file
|
359
|
+
specified by *path*. If the file is required multiple times, it will
|
360
|
+
appear in the bundle only once.
|
361
|
+
|
362
|
+
### The `require_directory` Directive ###
|
363
|
+
|
364
|
+
`require_directory` *path* requires all source files of the same
|
365
|
+
format in the directory specified by *path*. Files are required in
|
366
|
+
alphabetical order.
|
367
|
+
|
368
|
+
#### The `require_tree` Directive
|
369
|
+
|
370
|
+
`require_tree` *path* works like `require_directory`, but operates
|
371
|
+
recursively to require all files in all subdirectories of the
|
372
|
+
directory specified by *path*.
|
373
|
+
|
374
|
+
#### The `require_self` Directive
|
375
|
+
|
376
|
+
`require_self` tells Sprockets to insert the body of the current
|
377
|
+
source file before any subsequent `require` directives.
|
378
|
+
|
379
|
+
#### The `link` Directive
|
380
|
+
|
381
|
+
`link` *path* declares a dependency on the target *path* and adds it to a list
|
382
|
+
of subdependencies to automatically be compiled when the asset is written out to
|
383
|
+
disk.
|
384
|
+
|
385
|
+
For an example, in a CSS file you might reference an external image that always
|
386
|
+
needs to be compiled along with the css file.
|
387
|
+
|
388
|
+
``` css
|
389
|
+
/*= link "logo.png" */
|
390
|
+
.logo {
|
391
|
+
background-image: url(logo.png)
|
392
|
+
}
|
393
|
+
```
|
394
|
+
|
395
|
+
However, if you use a `asset-path` or `asset-url` SCSS helper, these links will
|
396
|
+
automatically be defined for you.
|
397
|
+
|
398
|
+
``` css
|
399
|
+
.logo {
|
400
|
+
background-image: asset-url("logo.png")
|
401
|
+
}
|
402
|
+
```
|
403
|
+
|
404
|
+
#### The `depend_on` Directive
|
405
|
+
|
406
|
+
`depend_on` *path* declares a dependency on the given *path* without
|
407
|
+
including it in the bundle. This is useful when you need to expire an
|
408
|
+
asset's cache in response to a change in another file.
|
409
|
+
|
410
|
+
#### The `depend_on_asset` Directive
|
411
|
+
|
412
|
+
`depend_on_asset` *path* works like `depend_on`, but operates
|
413
|
+
recursively reading the file and following the directives found. This is automatically implied if you use `link`, so consider if it just makes sense using `link` instead of `depend_on_asset`.
|
414
|
+
|
415
|
+
#### The `stub` Directive
|
416
|
+
|
417
|
+
`stub` *path* allows dependency to be excluded from the asset bundle.
|
418
|
+
The *path* must be a valid asset and may or may not already be part
|
419
|
+
of the bundle. `stub` should only be used at the top level bundle, not
|
420
|
+
within any subdependencies.
|
421
|
+
|
422
|
+
|
423
|
+
## Processor Interface
|
424
|
+
|
425
|
+
Sprockets 2.x was originally design around [Tilt](https://github.com/rtomayko/tilt)'s engine interface. However, starting with 3.x, a new interface has been introduced deprecating Tilt.
|
426
|
+
|
427
|
+
Similar to Rack, a processor is a any "callable" (an object that responds to `call`). This maybe a simple Proc or a full class that defines a `def self.call(input)` method. The `call` method accepts an `input` Hash and returns a Hash of metadata.
|
428
|
+
|
429
|
+
Also see [`Sprockets::ProcessorUtils`](https://github.com/rails/sprockets/blob/master/lib/sprockets/processor_utils.rb) for public helper methods.
|
430
|
+
|
431
|
+
### input Hash
|
432
|
+
|
433
|
+
The `input` Hash defines the following public fields.
|
434
|
+
|
435
|
+
* `:data` - String asset contents
|
436
|
+
* `:environment` - Current `Sprockets::Environment` instance.
|
437
|
+
* `:cache` - A `Sprockets::Cache` instance. See [`Sprockets::Cache#fetch`](https://github.com/rails/sprockets/blob/master/lib/sprockets/cache.rb).
|
438
|
+
* `:uri` - String Asset URI.
|
439
|
+
* `:filename` - String full path to original file.
|
440
|
+
* `:load_path` - String current load path for filename.
|
441
|
+
* `:name` - String logical path for filename.
|
442
|
+
* `:content_type` - String content type of the output asset.
|
443
|
+
* `:metadata` - Hash of processor metadata.
|
444
|
+
|
445
|
+
``` ruby
|
446
|
+
def self.call(input)
|
447
|
+
input[:cache].fetch("my:cache:key:v1") do
|
448
|
+
# Remove all semicolons from source
|
449
|
+
input[:data].gsub(";", "")
|
450
|
+
end
|
451
|
+
end
|
452
|
+
```
|
453
|
+
|
454
|
+
### return Hash
|
455
|
+
|
456
|
+
The processor should return metadata `Hash`. With the exception of the `:data` key, the processor can store arbitrary JSON valid values in this Hash. The data will be stored and exposed on `Asset#metadata`.
|
457
|
+
|
458
|
+
The returned `:data` replaces the assets `input[:data]` to the next processor in the chain. Returning a `String` is shorthand for returning `{ data: str }`. And returning `nil` is shorthand for a no-op where the input data is not transformed, `{ data: input[:data] }`.
|
459
|
+
|
460
|
+
### metadata
|
461
|
+
|
462
|
+
The metadata Hash provides an open format for processors to extend the pipeline processor. Internally, built-in processors use it for passing data to each other.
|
463
|
+
|
464
|
+
* `:required` - A `Set` of String Asset URIs that the Bundle processor should concatenate together.
|
465
|
+
* `:stubbed` - A `Set` of String Asset URIs that will be omitted from the `:required` set.
|
466
|
+
* `:links` - A `Set` of String Asset URIs that should be compiled along with this asset.
|
467
|
+
* `:dependencies` - A `Set` of String Cache URIs that should be monitored for caching.
|
468
|
+
|
469
|
+
``` ruby
|
470
|
+
def self.call(input)
|
471
|
+
# Any metadata may start off as nil, so initialize it the value
|
472
|
+
required = Set.new(input[:metadata][:required])
|
473
|
+
|
474
|
+
# Manually add "foo.js" asset uri to our bundle
|
475
|
+
required << input[:environment].resolve("foo.js")
|
476
|
+
|
477
|
+
{ required: required }
|
478
|
+
end
|
479
|
+
```
|
480
|
+
|
481
|
+
|
482
|
+
## Development
|
483
|
+
|
484
|
+
### Contributing
|
485
|
+
|
486
|
+
The Sprockets source code is [hosted on
|
487
|
+
GitHub](https://github.com/rails/sprockets). You can check out a
|
488
|
+
copy of the latest code using Git:
|
489
|
+
|
490
|
+
$ git clone https://github.com/rails/sprockets
|
491
|
+
|
492
|
+
If you've found a bug or have a question, please open an issue on the
|
493
|
+
[Sprockets issue
|
494
|
+
tracker](https://github.com/rails/sprockets/issues). Or, clone
|
495
|
+
the Sprockets repository, write a failing test case, fix the bug and
|
496
|
+
submit a pull request.
|
497
|
+
|
498
|
+
### Version History
|
499
|
+
|
500
|
+
Please see the [CHANGELOG](https://github.com/rails/sprockets/tree/master/CHANGELOG.md)
|
501
|
+
|
502
|
+
## License
|
503
|
+
|
504
|
+
Copyright © 2014 Sam Stephenson <<sstephenson@gmail.com>>
|
505
|
+
|
506
|
+
Copyright © 2014 Joshua Peek <<josh@joshpeek.com>>
|
507
|
+
|
508
|
+
Sprockets is distributed under an MIT-style license. See LICENSE for
|
509
|
+
details.
|
@@ -0,0 +1,89 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
$VERBOSE = nil
|
3
|
+
|
4
|
+
require 'sprockets'
|
5
|
+
require 'optparse'
|
6
|
+
require 'shellwords'
|
7
|
+
|
8
|
+
unless ARGV.delete("--noenv")
|
9
|
+
if File.exist?(path = "./.sprocketsrc")
|
10
|
+
rcflags = Shellwords.split(File.read(path))
|
11
|
+
ARGV.unshift(*rcflags)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
filenames = []
|
16
|
+
environment = Sprockets::Environment.new(Dir.pwd)
|
17
|
+
manifest = nil
|
18
|
+
|
19
|
+
(ENV['SPROCKETS_PATH'] || "").split(File::PATH_SEPARATOR).each do |path|
|
20
|
+
environment.append_path path
|
21
|
+
end
|
22
|
+
|
23
|
+
OptionParser.new do |opts|
|
24
|
+
opts.summary_width = 28
|
25
|
+
opts.banner = "Usage: sprockets [options] filename [filename ...]"
|
26
|
+
|
27
|
+
def opts.show_usage
|
28
|
+
puts self
|
29
|
+
exit 1
|
30
|
+
end
|
31
|
+
|
32
|
+
opts.on("-r", "--require LIBRARY", "Require the LIBRARY before doing anything") do |lib|
|
33
|
+
require lib
|
34
|
+
end
|
35
|
+
|
36
|
+
opts.on("-I DIRECTORY", "--include=DIRECTORY", "Adds the directory to the Sprockets load path") do |directory|
|
37
|
+
environment.append_path directory
|
38
|
+
end
|
39
|
+
|
40
|
+
opts.on("-o DIRECTORY", "--output=DIRECTORY", "Copy provided assets into DIRECTORY") do |directory|
|
41
|
+
manifest = Sprockets::Manifest.new(environment, directory)
|
42
|
+
end
|
43
|
+
|
44
|
+
opts.on("--css-compressor=COMPRESSOR", "Use CSS compressor") do |compressor|
|
45
|
+
environment.css_compressor = compressor.to_sym
|
46
|
+
end
|
47
|
+
|
48
|
+
opts.on("--js-compressor=COMPRESSOR", "Use JavaScript compressor") do |compressor|
|
49
|
+
environment.js_compressor = compressor.to_sym
|
50
|
+
end
|
51
|
+
|
52
|
+
opts.on("--noenv", "Disables .sprocketsrc file") do
|
53
|
+
end
|
54
|
+
|
55
|
+
opts.on_tail("-h", "--help", "Shows this help message") do
|
56
|
+
opts.show_usage
|
57
|
+
end
|
58
|
+
|
59
|
+
opts.on_tail("-v", "--version", "Shows version") do
|
60
|
+
puts Sprockets::VERSION
|
61
|
+
exit
|
62
|
+
end
|
63
|
+
|
64
|
+
opts.show_usage if ARGV.empty?
|
65
|
+
|
66
|
+
begin
|
67
|
+
opts.order(ARGV) do |filename|
|
68
|
+
filenames << File.expand_path(filename)
|
69
|
+
end
|
70
|
+
rescue OptionParser::ParseError => e
|
71
|
+
opts.warn e.message
|
72
|
+
opts.show_usage
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
if environment.paths.empty?
|
77
|
+
warn "No load paths given"
|
78
|
+
warn "Usage: sprockets -Ijavascripts/ filename"
|
79
|
+
exit 1
|
80
|
+
end
|
81
|
+
|
82
|
+
if manifest
|
83
|
+
manifest.compile(filenames)
|
84
|
+
elsif filenames.length == 1
|
85
|
+
puts environment.find_asset(filenames.first).to_s
|
86
|
+
else
|
87
|
+
warn "Only one file can be compiled to stdout at a time"
|
88
|
+
exit 1
|
89
|
+
end
|