Sprockets 3.0 has changed the way assets can be accessed if the fallback
asset pipeline is disabled (Rails config option config.assets.compile
is set to false).
In such case scenario, extracting asset information based on
Sprockets environment doesn't work, since Rails.application.assets
returns nil.
Fortunately, similar information about assets can be obtained from asset
manifest, accessible from Rails.application.assets_manifest.
This change makes teaspoon fall back to using the assets manifest if
regular asset environment is not available. It seems to work for all the
use cases that I tested.
Sprockets 3.0 has changed the way assets can be accessed if the fallback asset pipeline is disabled (Rails config option
config.assets.compile
is set to false).In such case scenario, extracting asset information based on Sprockets environment doesn't work, since
Rails.application.assets
returns nil.Fortunately, similar information about assets can be obtained from asset manifest, accessible from
Rails.application.assets_manifest
.This change makes teaspoon fall back to using the assets manifest if regular asset environment is not available. It seems to work for all the use cases that I tested.