GitXplorerGitXplorer
c

sprockets-urlrewriter

public
19 stars
3 forks
2 issues

Commits

List of commits on branch master.
Unverified
8031e364f3c869d7705b95960aab0f2d530e6177

Look around the first capture

ccarlhoerberg committed 13 years ago
Unverified
af238785ff866c697ec5a1c65e860888210ebb4f

version bump

ccarlhoerberg committed 13 years ago
Unverified
f791bdbb758d5797c65b0b25aea664bd6212b304

improved regex, requires colon or whitespace before url

ccarlhoerberg committed 13 years ago
Unverified
957048406ab3bbcdb916ad012fe88d4b5e2c9696

version bump for new regex

ccarlhoerberg committed 13 years ago
Unverified
fdc6c4a4c7ad6a058165f436d6e501d6292e3a7e

Improved regex

ccarlhoerberg committed 13 years ago
Unverified
6999b54af18b1c97d2334be523b37f5ab65e0be9

Merge pull request #4 from brewster1134/master

ccarlhoerberg committed 13 years ago

README

The README file for this repository.

Sprockets Url Rewriter

Rewrites relative CSS urls to absolute ones, which means that you can include, for example jQuery UI, without any modifications into the asset pipeline.

Example usage

gem install sprockets-urlrewriter

In rails, within your own initializer:

Rails.application.assets.register_preprocessor 'text/css', Sprockets::UrlRewriter

In config.ru (if you're using Sinatra)

map '/assets' do
  s = Sprockets::Environment.new
  s.append_path 'assets/css'
  s.append_path 'assets/js'
  s.append_path 'vendor/js'
  s.register_preprocessor 'text/css', Sprockets::UrlRewriter
  s.cache = Sprockets::Cache::FileStore.new("tmp/sprockets")
  run s
end

License terms

Copyright (C) 2011 by Carl Hörberg

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.