Prior to this, functions in sprockets-sass conflicted with ours and caused an infinite loop and StackError. This fixesthomas-mcdonald/bootstrap-sass#257
Note that Sprockets' asset_path requires configuration if it's not already configured by your framework. For example, in a simple Rack app, add the following to your config.ru:
environment.context_class.class_eval do
def asset_path(path, options = {})
"/assets/#{path}"
end
end
::Sprockets is the wrong check, since we reference the ::Rails constant directly in the loaded file. This was outright failing when used with an empty compass-sprockets-sass install (without Rails)
No one should really use the two together, but in case they do, or in case any other library defines a Bootstrap::Sass module, we should be clear that we mean the global core Sass module here. Fixesthomas-mcdonald/bootstrap-sass#293
This allows for test compilation (which doesn't use sass-rails *or* compass) and could be a lead-in to a fully generic version for non-compass/rails use of bootstrap-sass.
We need a new compass function to handle image-path, since image-url (rightfully) includes the url() wrapper. We don't want the url() wrapper around our path variable, since bootstrap already includes it. This way we only have to patch the _variables.scss file, and not _sprites.scss too.
This reverts commit 0cea6384c8.
I had not considered the side effect of loading all the compass setup,
since this will mean that Rails' asset-url is overridden, or some side
effect will come about as a result.