pax_global_header 0000666 0000000 0000000 00000000064 14652516665 0014532 g ustar 00root root 0000000 0000000 52 comment=2c04236faaacd021b7810289cbac93e962ff14da
sprockets-rails-3.5.2/ 0000775 0000000 0000000 00000000000 14652516665 0014666 5 ustar 00root root 0000000 0000000 sprockets-rails-3.5.2/.devcontainer/ 0000775 0000000 0000000 00000000000 14652516665 0017425 5 ustar 00root root 0000000 0000000 sprockets-rails-3.5.2/.devcontainer/devcontainer.json 0000664 0000000 0000000 00000001673 14652516665 0023010 0 ustar 00root root 0000000 0000000 // For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/ruby
{
"name": "sprockets-rails",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "ghcr.io/rails/devcontainer/images/ruby:3.2.5",
// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {
"version": "latest"
}
}
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "ruby --version",
// Configure tool-specific properties.
// "customizations": {},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
sprockets-rails-3.5.2/.github/ 0000775 0000000 0000000 00000000000 14652516665 0016226 5 ustar 00root root 0000000 0000000 sprockets-rails-3.5.2/.github/workflows/ 0000775 0000000 0000000 00000000000 14652516665 0020263 5 ustar 00root root 0000000 0000000 sprockets-rails-3.5.2/.github/workflows/ci.yml 0000664 0000000 0000000 00000002553 14652516665 0021406 0 ustar 00root root 0000000 0000000 name: CI
on: [push, pull_request]
jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- ruby: 2.5
gemfile: "gemfiles/Gemfile.rails-6.1-sprockets-3"
- ruby: 2.5
gemfile: "gemfiles/Gemfile.rails-6.1-sprockets-4"
- ruby: 2.7
gemfile: "gemfiles/Gemfile.rails-7.0-sprockets-3"
- ruby: 2.7
gemfile: "gemfiles/Gemfile.rails-7.0-sprockets-4"
- ruby: 2.7
gemfile: "gemfiles/Gemfile.rails-7.1-sprockets-3"
- ruby: 2.7
gemfile: "gemfiles/Gemfile.rails-7.1-sprockets-4"
- ruby: 3.1
gemfile: "gemfiles/Gemfile.rails-7.2-sprockets-3"
- ruby: 3.1
gemfile: "gemfiles/Gemfile.rails-7.2-sprockets-4"
- ruby: 3.1
gemfile: Gemfile
- ruby: 3.2
gemfile: Gemfile
- ruby: 3.3
gemfile: Gemfile
- ruby: head
gemfile: Gemfile
env:
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run tests
run: bundle exec rake
continue-on-error: ${{ matrix.gemfile == 'Gemfile' }}
sprockets-rails-3.5.2/.gitignore 0000664 0000000 0000000 00000000031 14652516665 0016650 0 ustar 00root root 0000000 0000000 Gemfile*.lock
tmp/
*.gem
sprockets-rails-3.5.2/CONTRIBUTING.md 0000664 0000000 0000000 00000005263 14652516665 0017125 0 ustar 00root root 0000000 0000000 Contributing to Sprockets Rails
=====================
Sprockets Rails is work of [many contributors](https://github.com/rails/sprockets-rails/graphs/contributors). You're encouraged to submit [pull requests](https://github.com/rails/sprockets-rails/pulls), [propose features and discuss issues](https://github.com/rails/sprockets-rails/issues).
#### Fork the Project
Fork the [project on GitHub](https://github.com/rails/sprockets-rails) and clone your fork.
Use your GitHub username instead of `YOUR-USERNAME`.
```
git clone https://github.com/YOUR-USERNAME/sprockets-rails.git
cd sprockets-rails
git remote add upstream https://github.com/rails/sprockets-rails.git
```
#### Create a Topic Branch
Make sure your fork is up-to-date and create a topic branch for your feature or bug fix.
```
git checkout master
git pull upstream master
git checkout -b my-feature-branch
```
#### Bundle Install and Test
Ensure that you can build the project and run tests.
```
bundle install
bundle exec rake test
```
#### Write Tests
Try to write a test that reproduces the problem you're trying to fix or describes a feature that you want to build. Add to [test](test).
We definitely appreciate pull requests that highlight or reproduce a problem, even without a fix.
#### Write Code
Implement your feature or bug fix.
Make sure that `bundle exec rake test` completes without errors.
#### Write Documentation
Document any external behavior in the [README](README.md).
#### Commit Changes
Make sure git knows your name and email address:
```
git config --global user.name "Your Name"
git config --global user.email "contributor@example.com"
```
Writing good commit logs is important. A commit log should describe what changed and why.
```
git add ...
git commit
```
#### Push
```
git push origin my-feature-branch
```
#### Make a Pull Request
Go to https://github.com/contributor/sprockets-rails and select your feature branch. Click the 'Pull Request' button and fill out the form. Pull requests are usually reviewed within a few days.
#### Rebase
If you've been working on a change for a while, rebase with upstream/master.
```
git fetch upstream
git rebase upstream/master
git push origin my-feature-branch -f
```
#### Check on Your Pull Request
Go back to your pull request after a few minutes and see whether it passed muster with Travis-CI. Everything should look green, otherwise fix issues and amend your commit as described above.
#### Be Patient
It's likely that your change will not be merged and that the nitpicky maintainers will ask you to do more, or fix seemingly benign problems. Hang on there!
#### Thank You
Please do know that we really appreciate and value your time and work. We love you, really.
sprockets-rails-3.5.2/Gemfile 0000664 0000000 0000000 00000000344 14652516665 0016162 0 ustar 00root root 0000000 0000000 source 'https://rubygems.org'
gemspec
gem 'actionpack', github: 'rails/rails', branch: 'main'
gem 'railties', github: 'rails/rails', branch: 'main'
gem 'rack', '~> 2.2'
gem 'sprockets', github: 'rails/sprockets', branch: '3.x'
sprockets-rails-3.5.2/MIT-LICENSE 0000664 0000000 0000000 00000002044 14652516665 0016322 0 ustar 00root root 0000000 0000000 Copyright (c) 2014-2016 Joshua Peek
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
sprockets-rails-3.5.2/README.md 0000664 0000000 0000000 00000021030 14652516665 0016141 0 ustar 00root root 0000000 0000000 # Sprockets Rails
Provides [Sprockets](https://github.com/rails/sprockets) implementation for Rails 4.x (and beyond) Asset Pipeline.
## Installation
``` ruby
gem 'sprockets-rails', :require => 'sprockets/railtie'
```
Or alternatively `require 'sprockets/railtie'` in your `config/application.rb` if you have Bundler auto-require disabled.
## Usage
### Rake task
**`rake assets:precompile`**
Deployment task that compiles any assets listed in `config.assets.precompile` to `public/assets`.
**`rake assets:clean`**
Only removes old assets (keeps the most recent 3 copies) from `public/assets`. Useful when doing rolling deploys that may still be serving old assets while the new ones are being compiled.
**`rake assets:clobber`**
Nuke `public/assets`.
#### Customize
If the basic tasks don't do all that you need, it's straight forward to redefine them and replace them with something more specific to your app.
You can also redefine the task with the built in task generator.
``` ruby
require 'sprockets/rails/task'
Sprockets::Rails::Task.new(Rails.application) do |t|
t.environment = lambda { Rails.application.assets }
t.assets = %w( application.js application.css )
t.keep = 5
end
```
Each asset task will invoke `assets:environment` first. By default this loads the Rails environment. You can override this task to add or remove dependencies for your specific compilation environment.
Also see [Sprockets::Rails::Task](https://github.com/rails/sprockets-rails/blob/master/lib/sprockets/rails/task.rb) and [Rake::SprocketsTask](https://github.com/rails/sprockets/blob/master/lib/rake/sprocketstask.rb).
### Initializer options
**`config.assets.unknown_asset_fallback`**
When set to a truthy value, a result will be returned even if the requested asset is not found in the asset pipeline. When set to a falsey value it will raise an error when no asset is found in the pipeline. Defaults to `true`.
**`config.assets.precompile`**
Add additional assets to compile on deploy. Defaults to `application.js`, `application.css` and any other non-js/css file under `app/assets`.
**`config.assets.paths`**
Add additional load paths to this Array. Rails includes `app/assets`, `lib/assets` and `vendor/assets` for you already. Plugins might want to add their custom paths to this.
**`config.assets.quiet`**
Suppresses logger output for asset requests. Uses the `config.assets.prefix` path to match asset requests. Defaults to `false`.
**`config.assets.version`**
Set a custom cache buster string. Changing it will cause all assets to recompile on the next build.
``` ruby
config.assets.version = 'v1'
# after installing a new plugin, change loads paths
config.assets.version = 'v2'
```
**`config.assets.prefix`**
Defaults to `/assets`. Changes the directory to compile assets to.
**`config.assets.digest`**
When enabled, fingerprints will be added to asset filenames.
**`config.assets.debug`**
Enable asset debugging mode. A source map will be included with each asset when this is true.
**`config.assets.compile`**
Enables Sprockets compile environment. If disabled, `Rails.application.assets` will be `nil` to prevent inadvertent compilation calls. View helpers will depend on assets being precompiled to `public/assets` in order to link to them. Initializers expecting `Rails.application.assets` during boot should be accessing the environment in a `config.assets.configure` block. See below.
**`config.assets.configure`**
Invokes block with environment when the environment is initialized. Allows direct access to the environment instance and lets you lazily load libraries only needed for asset compiling.
``` ruby
config.assets.configure do |env|
env.js_compressor = :uglifier # or :closure, :yui
env.css_compressor = :sass # or :yui
require 'my_processor'
env.register_preprocessor 'application/javascript', MyProcessor
env.logger = Rails.logger
end
```
**`config.assets.resolve_assets_in_css_urls`**
When this option is enabled, sprockets-rails will register a CSS postprocessor to resolve assets referenced in [`url()`](https://developer.mozilla.org/en-US/docs/Web/CSS/url()) function calls and replace them with the digested paths. Defaults to `true`.
**`config.assets.resolve_with`**
A list of `:environment` and `:manifest` symbols that defines the order that
we try to find assets: manifest first, environment second? Manifest only?
By default, we check the manifest first if asset digests are enabled and debug
is not enabled, then we check the environment if compiling is enabled:
```
# Dev where debug is true, or digests are disabled
%i[ environment ]
# Dev default, or production with compile enabled.
%i[ manifest environment ]
# Production default.
%i[ manifest ]
```
If the resolver list is empty (e.g. if debug is true and compile is false), the standard rails public path resolution will be used.
**`config.assets.check_precompiled_asset`**
When enabled, an exception is raised for missing assets. This option is enabled by default.
## Complementary plugins
The following plugins provide some extras for the Sprockets Asset Pipeline.
* [coffee-rails](https://github.com/rails/coffee-rails)
* [sass-rails](https://github.com/rails/sass-rails)
**NOTE** That these plugins are optional. The core coffee-script, sass, less, uglify, (and many more) features are built into Sprockets itself. Many of these plugins only provide generators and extra helpers. You can probably get by without them.
## Changes from Rails 3.x
* Only compiles digest filenames. Static non-digest assets should simply live in public/.
* Unmanaged asset paths and urls fallback to linking to public/. This should make it easier to work with both compiled assets and simple static assets. As a side effect, there will never be any "asset not precompiled errors" when linking to missing assets. They will just link to a public file which may or may not exist.
* JS and CSS compressors must be explicitly set. Magic detection has been removed to avoid loading compressors in environments where you want to avoid loading any of the asset libraries. Assign `config.assets.js_compressor = :uglifier` or `config.assets.css_compressor = :sass` for the standard compressors.
* The manifest file is now in a JSON format. Since it lives in public/ by default, the initial filename is also randomized to obfuscate public access to the resource.
* `config.assets.manifest` (if used) must now include the manifest filename, e.g. `Rails.root.join('config/manifest.json')`. It cannot be a directory.
* Two cleanup tasks: `rake assets:clean` is now a safe cleanup that only removes older assets that are no longer used, while `rake assets:clobber` nukes the entire `public/assets` directory. The clean task allows for rolling deploys that may still be linking to an old asset while the new assets are being built.
### But what if I want sprockets to generate non-digest assets?
You have several options:
* Use the [non-digest-assets gem](https://github.com/mvz/non-digest-assets).
* Use the [sprockets-redirect gem](https://github.com/sikachu/sprockets-redirect).
* Use the [smart_assets gem](https://github.com/zarqman/smart_assets).
* Create [a rake task](https://github.com/rails/sprockets-rails/issues/49#issuecomment-20535134) to pre-generate a non-digest version in `public/`.
## Experimental
### [SRI](http://www.w3.org/TR/SRI/) support
Sprockets 3.x adds experimental support for subresource integrity checks. The spec is still evolving and the API may change in backwards incompatible ways.
``` ruby
javascript_include_tag :application, integrity: true
# => ""
```
Note that sprockets-rails only adds integrity hashes to assets when served in a secure context (over an HTTPS connection or localhost).
## Contributing to Sprockets Rails
Sprockets Rails is work of many contributors. You're encouraged to submit pull requests, propose
features and discuss issues.
See [CONTRIBUTING](CONTRIBUTING.md).
## Releases
sprockets-rails 3.x will primarily target sprockets 3.x. And future versions will target the corresponding sprockets release line.
The minor and patch version will be updated according to [semver](http://semver.org/).
* Any new APIs or config options that don't break compatibility will be in a minor release
* Any time the sprockets dependency is bumped, there will be a new minor release
* Simple bug fixes will be patch releases
## License
Sprockets Rails is released under the [MIT License](MIT-LICENSE).
## Code Status
* [](http://badge.fury.io/rb/sprockets-rails)
sprockets-rails-3.5.2/Rakefile 0000664 0000000 0000000 00000000311 14652516665 0016326 0 ustar 00root root 0000000 0000000 require 'rake/testtask'
require 'bundler/gem_tasks'
task :default => :test
Rake::TestTask.new(:test) do |t|
t.libs << 'lib'
t.pattern = 'test/test_*.rb'
t.warning = true
t.verbose = true
end
sprockets-rails-3.5.2/gemfiles/ 0000775 0000000 0000000 00000000000 14652516665 0016461 5 ustar 00root root 0000000 0000000 sprockets-rails-3.5.2/gemfiles/Gemfile.rails-6.1-sprockets-3 0000664 0000000 0000000 00000000204 14652516665 0023536 0 ustar 00root root 0000000 0000000 source 'https://rubygems.org'
gemspec path: '..'
gem 'actionpack', '~> 6.1.0'
gem 'railties', '~> 6.1.0'
gem 'sprockets', '~> 3.0'
sprockets-rails-3.5.2/gemfiles/Gemfile.rails-6.1-sprockets-4 0000664 0000000 0000000 00000000204 14652516665 0023537 0 ustar 00root root 0000000 0000000 source 'https://rubygems.org'
gemspec path: '..'
gem 'actionpack', '~> 6.1.0'
gem 'railties', '~> 6.1.0'
gem 'sprockets', '~> 4.0'
sprockets-rails-3.5.2/gemfiles/Gemfile.rails-7.0-sprockets-3 0000664 0000000 0000000 00000000204 14652516665 0023536 0 ustar 00root root 0000000 0000000 source 'https://rubygems.org'
gemspec path: '..'
gem 'actionpack', '~> 7.0.0'
gem 'railties', '~> 7.0.0'
gem 'sprockets', '~> 3.0'
sprockets-rails-3.5.2/gemfiles/Gemfile.rails-7.0-sprockets-4 0000664 0000000 0000000 00000000204 14652516665 0023537 0 ustar 00root root 0000000 0000000 source 'https://rubygems.org'
gemspec path: '..'
gem 'actionpack', '~> 7.0.0'
gem 'railties', '~> 7.0.0'
gem 'sprockets', '~> 4.0'
sprockets-rails-3.5.2/gemfiles/Gemfile.rails-7.1-sprockets-3 0000664 0000000 0000000 00000000204 14652516665 0023537 0 ustar 00root root 0000000 0000000 source 'https://rubygems.org'
gemspec path: '..'
gem 'actionpack', '~> 7.1.0'
gem 'railties', '~> 7.1.0'
gem 'sprockets', '~> 3.0'
sprockets-rails-3.5.2/gemfiles/Gemfile.rails-7.1-sprockets-4 0000664 0000000 0000000 00000000204 14652516665 0023540 0 ustar 00root root 0000000 0000000 source 'https://rubygems.org'
gemspec path: '..'
gem 'actionpack', '~> 7.1.0'
gem 'railties', '~> 7.1.0'
gem 'sprockets', '~> 4.0'
sprockets-rails-3.5.2/gemfiles/Gemfile.rails-7.2-sprockets-3 0000664 0000000 0000000 00000000220 14652516665 0023536 0 ustar 00root root 0000000 0000000 source 'https://rubygems.org'
gemspec path: '..'
gem 'actionpack', '~> 7.2.0.beta2'
gem 'railties', '~> 7.2.0.beta2'
gem 'sprockets', '~> 3.0'
sprockets-rails-3.5.2/gemfiles/Gemfile.rails-7.2-sprockets-4 0000664 0000000 0000000 00000000220 14652516665 0023537 0 ustar 00root root 0000000 0000000 source 'https://rubygems.org'
gemspec path: '..'
gem 'actionpack', '~> 7.2.0.beta2'
gem 'railties', '~> 7.2.0.beta2'
gem 'sprockets', '~> 4.0'
sprockets-rails-3.5.2/lib/ 0000775 0000000 0000000 00000000000 14652516665 0015434 5 ustar 00root root 0000000 0000000 sprockets-rails-3.5.2/lib/sprockets/ 0000775 0000000 0000000 00000000000 14652516665 0017451 5 ustar 00root root 0000000 0000000 sprockets-rails-3.5.2/lib/sprockets/rails.rb 0000664 0000000 0000000 00000000204 14652516665 0021104 0 ustar 00root root 0000000 0000000 require 'sprockets/rails/version'
if defined? Rails::Railtie
require 'sprockets/railtie'
end
require 'sprockets/rails/deprecator'
sprockets-rails-3.5.2/lib/sprockets/rails/ 0000775 0000000 0000000 00000000000 14652516665 0020563 5 ustar 00root root 0000000 0000000 sprockets-rails-3.5.2/lib/sprockets/rails/asset_url_processor.rb 0000664 0000000 0000000 00000001102 14652516665 0025202 0 ustar 00root root 0000000 0000000 module Sprockets
module Rails
# Resolve assets referenced in CSS `url()` calls and replace them with the digested paths
class AssetUrlProcessor
REGEX = /url\(\s*["']?(?!(?:\#|data|http))(?\.\/)?(?[^"'\s)]+)\s*["']?\)/
def self.call(input)
context = input[:environment].context_class.new(input)
data = input[:data].gsub(REGEX) do |_match|
path = Regexp.last_match[:path]
"url(#{context.asset_path(path)})"
end
context.metadata.merge(data: data)
end
end
end
end
sprockets-rails-3.5.2/lib/sprockets/rails/context.rb 0000664 0000000 0000000 00000002465 14652516665 0022603 0 ustar 00root root 0000000 0000000 require 'action_view/helpers'
require 'sprockets'
module Sprockets
module Rails
module Context
include ActionView::Helpers::AssetUrlHelper
include ActionView::Helpers::AssetTagHelper
def self.included(klass)
klass.class_eval do
class_attribute :config, :assets_prefix, :digest_assets
end
end
def compute_asset_path(path, options = {})
@dependencies << 'actioncontroller-asset-url-config'
begin
asset_uri = resolve(path)
rescue FileNotFound
# TODO: eh, we should be able to use a form of locate that returns
# nil instead of raising an exception.
end
if asset_uri
asset = link_asset(path)
digest_path = asset.digest_path
path = digest_path if digest_assets
File.join(assets_prefix || "/", path)
else
super
end
end
end
end
register_dependency_resolver 'actioncontroller-asset-url-config' do |env|
config = env.context_class.config
[config.relative_url_root,
(config.asset_host unless config.asset_host.respond_to?(:call))]
end
# fallback to the default pipeline when using Sprockets 3.x
unless config[:pipelines].include? :debug
register_pipeline :debug, config[:pipelines][:default]
end
end
sprockets-rails-3.5.2/lib/sprockets/rails/deprecator.rb 0000664 0000000 0000000 00000000323 14652516665 0023236 0 ustar 00root root 0000000 0000000 # frozen_string_literal: true
require "active_support"
module Sprockets
module Rails
def self.deprecator
@deprecator ||= ActiveSupport::Deprecation.new("4.0", "Sprockets::Rails")
end
end
end
sprockets-rails-3.5.2/lib/sprockets/rails/helper.rb 0000664 0000000 0000000 00000030761 14652516665 0022376 0 ustar 00root root 0000000 0000000 require 'action_view'
require 'sprockets'
require 'active_support/core_ext/class/attribute'
require 'sprockets/rails/utils'
module Sprockets
module Rails
module Helper
class AssetNotFound < StandardError; end
class AssetNotPrecompiled < StandardError; end
class AssetNotPrecompiledError < AssetNotPrecompiled
include Sprockets::Rails::Utils
def initialize(source)
msg =
if using_sprockets4?
"Asset `#{ source }` was not declared to be precompiled in production.\n" +
"Declare links to your assets in `app/assets/config/manifest.js`.\n\n" +
" //= link #{ source }\n\n" +
"and restart your server"
else
"Asset was not declared to be precompiled in production.\n" +
"Add `Rails.application.config.assets.precompile += " +
"%w( #{source} )` to `config/initializers/assets.rb` and " +
"restart your server"
end
super(msg)
end
end
include ActionView::Helpers::AssetUrlHelper
include ActionView::Helpers::AssetTagHelper
include Sprockets::Rails::Utils
VIEW_ACCESSORS = [
:assets_environment, :assets_manifest,
:assets_precompile, :precompiled_asset_checker,
:assets_prefix, :digest_assets, :debug_assets,
:resolve_assets_with, :check_precompiled_asset,
:unknown_asset_fallback
]
def self.included(klass)
klass.class_attribute(*VIEW_ACCESSORS)
klass.class_eval do
remove_method :assets_environment
def assets_environment
if instance_variable_defined?(:@assets_environment)
@assets_environment = @assets_environment.cached
elsif env = self.class.assets_environment
@assets_environment = env.cached
else
nil
end
end
end
end
def self.extended(obj)
obj.singleton_class.class_eval do
attr_accessor(*VIEW_ACCESSORS)
remove_method :assets_environment
def assets_environment
if env = @assets_environment
@assets_environment = env.cached
else
nil
end
end
end
end
# Writes over the built in ActionView::Helpers::AssetUrlHelper#compute_asset_path
# to use the asset pipeline.
def compute_asset_path(path, options = {})
debug = options[:debug]
if asset_path = resolve_asset_path(path, debug)
File.join(assets_prefix || "/", legacy_debug_path(asset_path, debug))
else
message = "The asset #{ path.inspect } is not present in the asset pipeline.\n"
raise AssetNotFound, message unless unknown_asset_fallback
if respond_to?(:public_compute_asset_path)
message << "Falling back to an asset that may be in the public folder.\n"
message << "This behavior is deprecated and will be removed.\n"
message << "To bypass the asset pipeline and preserve this behavior,\n"
message << "use the `skip_pipeline: true` option.\n"
Sprockets::Rails.deprecator.warn(message, caller_locations)
end
super
end
end
# Resolve the asset path against the Sprockets manifest or environment.
# Returns nil if it's an asset we don't know about.
def resolve_asset_path(path, allow_non_precompiled = false) #:nodoc:
resolve_asset do |resolver|
resolver.asset_path path, digest_assets, allow_non_precompiled
end
end
# Expand asset path to digested form.
#
# path - String path
# options - Hash options
#
# Returns String path or nil if no asset was found.
def asset_digest_path(path, options = {})
resolve_asset do |resolver|
resolver.digest_path path, options[:debug]
end
end
# Experimental: Get integrity for asset path.
#
# path - String path
# options - Hash options
#
# Returns String integrity attribute or nil if no asset was found.
def asset_integrity(path, options = {})
path = path_with_extname(path, options)
resolve_asset do |resolver|
resolver.integrity path
end
end
# Override javascript tag helper to provide debugging support.
#
# Eventually will be deprecated and replaced by source maps.
def javascript_include_tag(*sources)
options = sources.extract_options!.stringify_keys
integrity = compute_integrity?(options)
if options["debug"] != false && request_debug_assets?
sources.map { |source|
if asset = lookup_debug_asset(source, type: :javascript)
if asset.respond_to?(:to_a)
asset.to_a.map do |a|
super(path_to_javascript(a.logical_path, debug: true), options)
end
else
super(path_to_javascript(asset.logical_path, debug: true), options)
end
else
super(source, options)
end
}.flatten.uniq.join("\n").html_safe
else
sources.map { |source|
options = options.merge('integrity' => asset_integrity(source, type: :javascript)) if integrity
super source, options
}.join("\n").html_safe
end
end
# Override stylesheet tag helper to provide debugging support.
#
# Eventually will be deprecated and replaced by source maps.
def stylesheet_link_tag(*sources)
options = sources.extract_options!.stringify_keys
integrity = compute_integrity?(options)
if options["debug"] != false && request_debug_assets?
sources.map { |source|
if asset = lookup_debug_asset(source, type: :stylesheet)
if asset.respond_to?(:to_a)
asset.to_a.map do |a|
super(path_to_stylesheet(a.logical_path, debug: true), options)
end
else
super(path_to_stylesheet(asset.logical_path, debug: true), options)
end
else
super(source, options)
end
}.flatten.uniq.join("\n").html_safe
else
sources.map { |source|
options = options.merge('integrity' => asset_integrity(source, type: :stylesheet)) if integrity
super source, options
}.join("\n").html_safe
end
end
protected
# This is awkward: `integrity` is a boolean option indicating whether
# we want to include or omit the subresource integrity hash, but the
# options hash is also passed through as literal tag attributes.
# That means we have to delete the shortcut boolean option so it
# doesn't bleed into the tag attributes, but also check its value if
# it's boolean-ish.
def compute_integrity?(options)
if secure_subresource_integrity_context?
case options['integrity']
when nil, false, true
options.delete('integrity') == true
end
else
options.delete 'integrity'
false
end
end
# Only serve integrity metadata for HTTPS requests:
# http://www.w3.org/TR/SRI/#non-secure-contexts-remain-non-secure
def secure_subresource_integrity_context?
respond_to?(:request) && self.request && (self.request.local? || self.request.ssl?)
end
# Enable split asset debugging. Eventually will be deprecated
# and replaced by source maps in Sprockets 3.x.
def request_debug_assets?
debug_assets || (defined?(controller) && controller && params[:debug_assets])
rescue # FIXME: what exactly are we rescuing?
false
end
# Internal method to support multifile debugging. Will
# eventually be removed w/ Sprockets 3.x.
def lookup_debug_asset(path, options = {})
path = path_with_extname(path, options)
resolve_asset do |resolver|
resolver.find_debug_asset path
end
end
# compute_asset_extname is in AV::Helpers::AssetUrlHelper
def path_with_extname(path, options)
path = path.to_s
"#{path}#{compute_asset_extname(path, options)}"
end
# Try each asset resolver and return the first non-nil result.
def resolve_asset
asset_resolver_strategies.detect do |resolver|
if result = yield(resolver)
break result
end
end
end
# List of resolvers in `config.assets.resolve_with` order.
def asset_resolver_strategies
@asset_resolver_strategies ||=
Array(resolve_assets_with).map do |name|
HelperAssetResolvers[name].new(self)
end
end
# Append ?body=1 if debug is on and we're on old Sprockets.
def legacy_debug_path(path, debug)
if debug && !using_sprockets4?
"#{path}?body=1"
else
path
end
end
end
# Use a separate module since Helper is mixed in and we needn't pollute
# the class namespace with our internals.
module HelperAssetResolvers #:nodoc:
def self.[](name)
case name
when :manifest
Manifest
when :environment
Environment
else
raise ArgumentError, "Unrecognized asset resolver: #{name.inspect}. Expected :manifest or :environment"
end
end
class Manifest #:nodoc:
def initialize(view)
@manifest = view.assets_manifest
raise ArgumentError, 'config.assets.resolve_with includes :manifest, but app.assets_manifest is nil' unless @manifest
end
def asset_path(path, digest, allow_non_precompiled = false)
if digest
digest_path path, allow_non_precompiled
end
end
def digest_path(path, allow_non_precompiled = false)
@manifest.assets[path]
end
def integrity(path)
if meta = metadata(path)
meta["integrity"]
end
end
def find_debug_asset(path)
nil
end
private
def metadata(path)
if digest_path = digest_path(path)
@manifest.files[digest_path]
end
end
end
class Environment #:nodoc:
def initialize(view)
raise ArgumentError, 'config.assets.resolve_with includes :environment, but app.assets is nil' unless view.assets_environment
@env = view.assets_environment
@precompiled_asset_checker = view.precompiled_asset_checker
@check_precompiled_asset = view.check_precompiled_asset
end
def asset_path(path, digest, allow_non_precompiled = false)
# Digests enabled? Do the work to calculate the full asset path.
if digest
digest_path path, allow_non_precompiled
# Otherwise, ask the Sprockets environment whether the asset exists
# and check whether it's also precompiled for production deploys.
elsif asset = find_asset(path)
raise_unless_precompiled_asset asset.logical_path unless allow_non_precompiled
path
end
end
def digest_path(path, allow_non_precompiled = false)
if asset = find_asset(path)
raise_unless_precompiled_asset asset.logical_path unless allow_non_precompiled
asset.digest_path
end
end
def integrity(path)
find_asset(path).try :integrity
end
def find_debug_asset(path)
if asset = find_asset(path, pipeline: :debug)
raise_unless_precompiled_asset asset.logical_path.sub('.debug', '')
asset
end
end
private
if RUBY_VERSION >= "2.7"
class_eval <<-RUBY, __FILE__, __LINE__ + 1
def find_asset(path, options = {})
@env[path, **options]
end
RUBY
else
def find_asset(path, options = {})
@env[path, options]
end
end
def precompiled?(path)
@precompiled_asset_checker.call path
end
def raise_unless_precompiled_asset(path)
raise Helper::AssetNotPrecompiledError.new(path) if @check_precompiled_asset && !precompiled?(path)
end
end
end
end
end
sprockets-rails-3.5.2/lib/sprockets/rails/quiet_assets.rb 0000664 0000000 0000000 00000001644 14652516665 0023626 0 ustar 00root root 0000000 0000000 module Sprockets
module Rails
class LoggerSilenceError < StandardError; end
class QuietAssets
def initialize(app)
@app = app
@assets_regex = %r(\A/{0,2}#{::Rails.application.config.assets.prefix})
end
def call(env)
if env['PATH_INFO'] =~ @assets_regex
raise_logger_silence_error unless ::Rails.logger.respond_to?(:silence)
::Rails.logger.silence { @app.call(env) }
else
@app.call(env)
end
end
private
def raise_logger_silence_error
error = "You have enabled `config.assets.quiet`, but your `Rails.logger`\n"
error << "does not use the `LoggerSilence` module.\n\n"
error << "Please use a compatible logger such as `ActiveSupport::Logger`\n"
error << "to take advantage of quiet asset logging.\n\n"
raise LoggerSilenceError, error
end
end
end
end
sprockets-rails-3.5.2/lib/sprockets/rails/route_wrapper.rb 0000664 0000000 0000000 00000000356 14652516665 0024012 0 ustar 00root root 0000000 0000000 module Sprockets
module Rails
module RouteWrapper
def internal_assets_path?
path =~ %r{\A#{self.class.assets_prefix}\z}
end
def internal?
super || internal_assets_path?
end
end
end
end
sprockets-rails-3.5.2/lib/sprockets/rails/sourcemapping_url_processor.rb 0000664 0000000 0000000 00000004174 14652516665 0026753 0 ustar 00root root 0000000 0000000 module Sprockets
module Rails
# Rewrites source mapping urls with the digested paths and protect against semicolon appending with a dummy comment line
class SourcemappingUrlProcessor
REGEX = /\/\/# sourceMappingURL=(.*\.map)/
class << self
def call(input)
env = input[:environment]
context = env.context_class.new(input)
data = input[:data].gsub(REGEX) do |_match|
sourcemap_logical_path = combine_sourcemap_logical_path(sourcefile: input[:name], sourcemap: $1)
begin
resolved_sourcemap_comment(sourcemap_logical_path, context: context)
rescue Sprockets::FileNotFound
removed_sourcemap_comment(sourcemap_logical_path, filename: input[:filename], env: env)
end
end
{ data: data }
end
private
def combine_sourcemap_logical_path(sourcefile:, sourcemap:)
if (parts = sourcefile.split("/")).many?
parts[0..-2].append(sourcemap).join("/")
else
sourcemap
end
end
def resolved_sourcemap_comment(sourcemap_logical_path, context:)
"//# sourceMappingURL=#{sourcemap_asset_path(sourcemap_logical_path, context: context)}\n//!\n"
end
def sourcemap_asset_path(sourcemap_logical_path, context:)
# FIXME: Work-around for bug where if the sourcemap is nested two levels deep, it'll resolve as the source file
# that's being mapped, rather than the map itself. So context.resolve("a/b/c.js.map") will return "c.js?"
if context.resolve(sourcemap_logical_path) =~ /\.map/
context.asset_path(sourcemap_logical_path)
else
raise Sprockets::FileNotFound, "Failed to resolve source map asset due to nesting depth"
end
end
def removed_sourcemap_comment(sourcemap_logical_path, filename:, env:)
env.logger.warn "Removed sourceMappingURL comment for missing asset '#{sourcemap_logical_path}' from #{filename}"
nil
end
end
end
end
end
sprockets-rails-3.5.2/lib/sprockets/rails/task.rb 0000664 0000000 0000000 00000004101 14652516665 0022046 0 ustar 00root root 0000000 0000000 require 'rake'
require 'rake/sprocketstask'
require 'sprockets'
require 'action_view'
module Sprockets
module Rails
class Task < Rake::SprocketsTask
attr_accessor :app
def initialize(app = nil)
self.app = app
super()
end
def environment
if app
# Use initialized app.assets or force build an environment if
# config.assets.compile is disabled
app.assets || Sprockets::Railtie.build_environment(app)
else
super
end
end
def output
if app
config = app.config
File.join(config.paths['public'].first, config.assets.prefix)
else
super
end
end
def assets
if app
app.config.assets.precompile
else
super
end
end
def manifest
if app
Sprockets::Manifest.new(index, output, app.config.assets.manifest)
else
super
end
end
def define
namespace :assets do
%w( environment precompile clean clobber ).each do |task|
Rake::Task[task].clear if Rake::Task.task_defined?(task)
end
# Override this task change the loaded dependencies
desc "Load asset compile environment"
task :environment do
# Load full Rails environment by default
Rake::Task['environment'].invoke
end
desc "Compile all the assets named in config.assets.precompile"
task :precompile => :environment do
with_logger do
manifest.compile(assets)
end
end
desc "Remove old compiled assets"
task :clean, [:keep] => :environment do |t, args|
with_logger do
manifest.clean(Integer(args.keep || self.keep))
end
end
desc "Remove compiled assets"
task :clobber => :environment do
with_logger do
manifest.clobber
end
end
end
end
end
end
end
sprockets-rails-3.5.2/lib/sprockets/rails/utils.rb 0000664 0000000 0000000 00000000306 14652516665 0022247 0 ustar 00root root 0000000 0000000 require 'sprockets'
module Sprockets
module Rails
module Utils
def using_sprockets4?
Gem::Version.new(Sprockets::VERSION) >= Gem::Version.new('4.x')
end
end
end
end
sprockets-rails-3.5.2/lib/sprockets/rails/version.rb 0000664 0000000 0000000 00000000100 14652516665 0022564 0 ustar 00root root 0000000 0000000 module Sprockets
module Rails
VERSION = "3.5.2"
end
end
sprockets-rails-3.5.2/lib/sprockets/railtie.rb 0000664 0000000 0000000 00000021606 14652516665 0021434 0 ustar 00root root 0000000 0000000 require 'rails'
require 'rails/railtie'
require 'action_controller/railtie'
require 'active_support/core_ext/module/remove_method'
require 'active_support/core_ext/numeric/bytes'
require 'sprockets'
require 'sprockets/rails/asset_url_processor'
require 'sprockets/rails/deprecator'
require 'sprockets/rails/sourcemapping_url_processor'
require 'sprockets/rails/context'
require 'sprockets/rails/helper'
require 'sprockets/rails/quiet_assets'
require 'sprockets/rails/route_wrapper'
require 'sprockets/rails/version'
require 'set'
module Rails
class Application
# Hack: We need to remove Rails' built in config.assets so we can
# do our own thing.
class Configuration
remove_possible_method :assets
end
# Undefine Rails' assets method before redefining it, to avoid warnings.
remove_possible_method :assets
remove_possible_method :assets=
# Returns Sprockets::Environment for app config.
attr_accessor :assets
# Returns Sprockets::Manifest for app config.
attr_accessor :assets_manifest
# Called from asset helpers to alert you if you reference an asset URL that
# isn't precompiled and hence won't be available in production.
def asset_precompiled?(logical_path)
if precompiled_assets.include?(logical_path)
true
elsif !config.cache_classes
# Check to see if precompile list has been updated
precompiled_assets(true).include?(logical_path)
else
false
end
end
# Lazy-load the precompile list so we don't cause asset compilation at app
# boot time, but ensure we cache the list so we don't recompute it for each
# request or test case.
def precompiled_assets(clear_cache = false)
@precompiled_assets = nil if clear_cache
@precompiled_assets ||= assets_manifest.find(config.assets.precompile).map(&:logical_path).to_set
end
end
end
module Sprockets
class Railtie < ::Rails::Railtie
include Sprockets::Rails::Utils
class ManifestNeededError < StandardError
def initialize
msg = "Expected to find a manifest file in `app/assets/config/manifest.js`\n" +
"But did not, please create this file and use it to link any assets that need\n" +
"to be rendered by your app:\n\n" +
"Example:\n" +
" //= link_tree ../images\n" +
" //= link_directory ../javascripts .js\n" +
" //= link_directory ../stylesheets .css\n" +
"and restart your server\n\n" +
"For more information see: https://github.com/rails/sprockets/blob/070fc01947c111d35bb4c836e9bb71962a8e0595/UPGRADING.md#manifestjs"
super msg
end
end
LOOSE_APP_ASSETS = lambda do |logical_path, filename|
filename.start_with?(::Rails.root.join("app/assets").to_s) &&
!['.js', '.css', ''].include?(File.extname(logical_path))
end
class OrderedOptions < ActiveSupport::OrderedOptions
def configure(&block)
self._blocks << block
end
end
::Rails::Engine.initializer :append_assets_path, :group => :all do |app|
app.config.assets.paths.unshift(*paths["vendor/assets"].existent_directories)
app.config.assets.paths.unshift(*paths["lib/assets"].existent_directories)
app.config.assets.paths.unshift(*paths["app/assets"].existent_directories)
end
config.assets = OrderedOptions.new
config.assets._blocks = []
config.assets.paths = []
config.assets.precompile = []
config.assets.prefix = "/assets"
config.assets.manifest = nil
config.assets.quiet = false
config.assets.resolve_assets_in_css_urls = true
initializer :set_default_precompile do |app|
if using_sprockets4?
raise ManifestNeededError unless ::Rails.root.join("app/assets/config/manifest.js").exist?
app.config.assets.precompile += %w( manifest.js )
else
app.config.assets.precompile += [LOOSE_APP_ASSETS, /(?:\/|\\|\A)application\.(css|js)$/]
end
end
initializer :quiet_assets do |app|
if app.config.assets.quiet
app.middleware.insert_before ::Rails::Rack::Logger, ::Sprockets::Rails::QuietAssets
end
end
initializer :asset_url_processor do |app|
if app.config.assets.resolve_assets_in_css_urls
Sprockets.register_postprocessor "text/css", ::Sprockets::Rails::AssetUrlProcessor
end
end
initializer :asset_sourcemap_url_processor do |app|
Sprockets.register_postprocessor "application/javascript", ::Sprockets::Rails::SourcemappingUrlProcessor
end
initializer "sprockets-rails.deprecator" do |app|
app.deprecators[:sprockets_rails] = Sprockets::Rails.deprecator if app.respond_to?(:deprecators)
end
config.assets.version = ""
config.assets.debug = false
config.assets.compile = true
config.assets.digest = true
config.assets.cache_limit = 50.megabytes
config.assets.gzip = true
config.assets.check_precompiled_asset = true
config.assets.unknown_asset_fallback = true
config.assets.configure do |env|
config.assets.paths.each { |path| env.append_path(path) }
end
config.assets.configure do |env|
env.context_class.send :include, ::Sprockets::Rails::Context
env.context_class.assets_prefix = config.assets.prefix
env.context_class.digest_assets = config.assets.digest
env.context_class.config = config.action_controller
end
config.assets.configure do |env|
env.cache = Sprockets::Cache::FileStore.new(
"#{env.root}/tmp/cache/assets",
config.assets.cache_limit,
env.logger
)
end
Sprockets.register_dependency_resolver 'rails-env' do
::Rails.env.to_s
end
config.assets.configure do |env|
env.depend_on 'rails-env'
end
config.assets.configure do |env|
env.version = config.assets.version
end
config.assets.configure do |env|
env.gzip = config.assets.gzip if env.respond_to?(:gzip=)
end
rake_tasks do |app|
require 'sprockets/rails/task'
Sprockets::Rails::Task.new(app)
end
def build_environment(app, initialized = nil)
initialized = app.initialized? if initialized.nil?
unless initialized
::Rails.logger.warn "Application uninitialized: Try calling YourApp::Application.initialize!"
end
env = Sprockets::Environment.new(app.root.to_s)
config = app.config
# Run app.assets.configure blocks
config.assets._blocks.each do |block|
block.call(env)
end
# Set compressors after the configure blocks since they can
# define new compressors and we only accept existent compressors.
env.js_compressor = config.assets.js_compressor
env.css_compressor = config.assets.css_compressor
# No more configuration changes at this point.
# With cache classes on, Sprockets won't check the FS when files
# change. Preferable in production when the FS only changes on
# deploys when the app restarts.
if config.cache_classes
env = env.cached
end
env
end
def self.build_manifest(app)
config = app.config
path = File.join(config.paths['public'].first, config.assets.prefix)
Sprockets::Manifest.new(app.assets, path, config.assets.manifest)
end
config.after_initialize do |app|
config = app.config
if config.assets.compile
app.assets = self.build_environment(app, true)
app.routes.prepend do
mount app.assets, at: config.assets.prefix
end
end
app.assets_manifest = build_manifest(app)
if config.assets.resolve_with.nil?
config.assets.resolve_with = []
config.assets.resolve_with << :manifest if config.assets.digest && !config.assets.debug
config.assets.resolve_with << :environment if config.assets.compile
end
ActionDispatch::Routing::RouteWrapper.class_eval do
class_attribute :assets_prefix
prepend Sprockets::Rails::RouteWrapper
self.assets_prefix = config.assets.prefix
end
ActiveSupport.on_load(:action_view) do
include Sprockets::Rails::Helper
# Copy relevant config to AV context
self.debug_assets = config.assets.debug
self.digest_assets = config.assets.digest
self.assets_prefix = config.assets.prefix
self.assets_precompile = config.assets.precompile
self.assets_environment = app.assets
self.assets_manifest = app.assets_manifest
self.resolve_assets_with = config.assets.resolve_with
self.check_precompiled_asset = config.assets.check_precompiled_asset
self.unknown_asset_fallback = config.assets.unknown_asset_fallback
# Expose the app precompiled asset check to the view
self.precompiled_asset_checker = -> logical_path { app.asset_precompiled? logical_path }
end
end
end
end
sprockets-rails-3.5.2/sprockets-rails.gemspec 0000664 0000000 0000000 00000001533 14652516665 0021362 0 ustar 00root root 0000000 0000000 $:.unshift File.expand_path("../lib", __FILE__)
require "sprockets/rails/version"
Gem::Specification.new do |s|
s.name = "sprockets-rails"
s.version = Sprockets::Rails::VERSION
s.homepage = "https://github.com/rails/sprockets-rails"
s.summary = "Sprockets Rails integration"
s.license = "MIT"
s.metadata = {
"changelog_uri" => "#{s.homepage}/releases/tag/v#{s.version}"
}
s.files = Dir["README.md", "lib/**/*.rb", "MIT-LICENSE"]
s.required_ruby_version = '>= 2.5'
s.add_dependency "sprockets", ">= 3.0.0"
s.add_dependency "actionpack", ">= 6.1"
s.add_dependency "activesupport", ">= 6.1"
s.add_development_dependency "railties", ">= 6.1"
s.add_development_dependency "rake"
s.add_development_dependency "sass"
s.add_development_dependency "uglifier"
s.author = "Joshua Peek"
s.email = "josh@joshpeek.com"
end
sprockets-rails-3.5.2/test/ 0000775 0000000 0000000 00000000000 14652516665 0015645 5 ustar 00root root 0000000 0000000 sprockets-rails-3.5.2/test/fixtures/ 0000775 0000000 0000000 00000000000 14652516665 0017516 5 ustar 00root root 0000000 0000000 sprockets-rails-3.5.2/test/fixtures/bar.css 0000664 0000000 0000000 00000000023 14652516665 0020767 0 ustar 00root root 0000000 0000000 /*= require foo */
sprockets-rails-3.5.2/test/fixtures/bar.js 0000664 0000000 0000000 00000000031 14652516665 0020612 0 ustar 00root root 0000000 0000000 //= require foo
var Bar;
sprockets-rails-3.5.2/test/fixtures/bundle/ 0000775 0000000 0000000 00000000000 14652516665 0020767 5 ustar 00root root 0000000 0000000 sprockets-rails-3.5.2/test/fixtures/bundle/index.js 0000664 0000000 0000000 00000000014 14652516665 0022427 0 ustar 00root root 0000000 0000000 var jQuery;
sprockets-rails-3.5.2/test/fixtures/dependency.css 0000664 0000000 0000000 00000000021 14652516665 0022337 0 ustar 00root root 0000000 0000000 /* dependency */
sprockets-rails-3.5.2/test/fixtures/dependency.js 0000664 0000000 0000000 00000000016 14652516665 0022167 0 ustar 00root root 0000000 0000000 // dependency
sprockets-rails-3.5.2/test/fixtures/error/ 0000775 0000000 0000000 00000000000 14652516665 0020647 5 ustar 00root root 0000000 0000000 sprockets-rails-3.5.2/test/fixtures/error/dependency.js.erb 0000664 0000000 0000000 00000000034 14652516665 0024067 0 ustar 00root root 0000000 0000000 <%= asset_path("bar.js") %>
sprockets-rails-3.5.2/test/fixtures/error/missing.css.erb 0000664 0000000 0000000 00000000077 14652516665 0023605 0 ustar 00root root 0000000 0000000 p { background: url(<%= image_path "does_not_exist.png" %>); }
sprockets-rails-3.5.2/test/fixtures/file1.css 0000664 0000000 0000000 00000000033 14652516665 0021224 0 ustar 00root root 0000000 0000000 /*= require dependency
*/
sprockets-rails-3.5.2/test/fixtures/file1.js 0000664 0000000 0000000 00000000027 14652516665 0021053 0 ustar 00root root 0000000 0000000 //= require dependency
sprockets-rails-3.5.2/test/fixtures/file2.css 0000664 0000000 0000000 00000000033 14652516665 0021225 0 ustar 00root root 0000000 0000000 /*= require dependency
*/
sprockets-rails-3.5.2/test/fixtures/file2.js 0000664 0000000 0000000 00000000027 14652516665 0021054 0 ustar 00root root 0000000 0000000 //= require dependency
sprockets-rails-3.5.2/test/fixtures/foo.css 0000664 0000000 0000000 00000000010 14652516665 0021002 0 ustar 00root root 0000000 0000000 .foo {}
sprockets-rails-3.5.2/test/fixtures/foo.js 0000664 0000000 0000000 00000000010 14652516665 0020626 0 ustar 00root root 0000000 0000000 var Foo; sprockets-rails-3.5.2/test/fixtures/jquery/ 0000775 0000000 0000000 00000000000 14652516665 0021035 5 ustar 00root root 0000000 0000000 sprockets-rails-3.5.2/test/fixtures/jquery/bower.json 0000664 0000000 0000000 00000000060 14652516665 0023042 0 ustar 00root root 0000000 0000000 {
"name": "jquery",
"main": "./jquery.js"
}
sprockets-rails-3.5.2/test/fixtures/jquery/jquery.js 0000664 0000000 0000000 00000000014 14652516665 0022705 0 ustar 00root root 0000000 0000000 var jQuery;
sprockets-rails-3.5.2/test/fixtures/logo.png 0000664 0000000 0000000 00000245631 14652516665 0021177 0 ustar 00root root 0000000 0000000 ‰PNG
IHDR <