Skip to content

Instantly share code, notes, and snippets.

@chriseppstein
Created January 18, 2011 05:56
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save chriseppstein/784033 to your computer and use it in GitHub Desktop.
Save chriseppstein/784033 to your computer and use it in GitHub Desktop.
The compass configuration file at caring.com
if ENV['RAILS_ENV'] && !defined?(RAILS_ENV)
Object.const_set("RAILS_ENV", ENV['RAILS_ENV'])
end
# Require any additional compass plugins here.
require 'grid-coordinates'
require 'compass-fancybox-plugin'
require 'susy'
project_type = :rails
project_path = RAILS_ROOT if defined?(RAILS_ROOT)
css_dir = "public/stylesheets/compiled"
sass_dir = "app/stylesheets"
cache_dir = "tmp/sass-cache"
http_path = "/"
relative_assets = true if defined?(RAILS_ENV) && RAILS_ENV == "development"
# disable asset cache buster
asset_cache_buster do |http_path, real_path|
nil
end
line_comments = true
environment = :development
output_style = :expanded
if defined?(RAILS_ENV) && ["production", "staging", "integration", "edge"].include?(RAILS_ENV)
line_comments = false
environment = :production
output_style = :compressed
asset_host do |path|
path=path.split('?')[0] if path.is_a?(String) # ignore url parameters when calculating asset host: google labs performance likes consistency
if RAILS_ENV == "staging"
"//d3ib7c8kxtj10x.cloudfront.net"
elsif RAILS_ENV == "integration"
"//d3n8wz4vki95n1.cloudfront.net"
elsif RAILS_ENV == "edge"
"//www.edge.caring.com"
else
"//d1i6umwpordaqg.cloudfront.net"
end
end
end
Dir.glob("vendor/plugins/*/app/stylesheets").each do |dir|
add_import_path dir
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment