Skip to content

Commit

Permalink
No longer need to check for LoadErrors
Browse files Browse the repository at this point in the history
  • Loading branch information
petebrowne committed Feb 23, 2012
1 parent e916a8d commit ccf145d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
8 changes: 2 additions & 6 deletions lib/sprockets/sass/functions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ module Functions
# background: url(asset-path("image.jpg", $digest: true)); // background: url("/assets/image-27a8f1f96afd8d4c67a59eb9447f45bd.jpg");
#
def asset_path(source, options = {})
# Check for the Sass::Rails' #asset_path API,
# and work with it. We want to make Rails assets work
# just fine with Machined.
# Work with the Sass::Rails #asset_path API
if options.respond_to? :value
kind = options.value
options = {}
Expand Down Expand Up @@ -64,9 +62,7 @@ def image_path(source, options = {})
# background: asset-url("image.jpg", $digest: true); // background: url("/assets/image-27a8f1f96afd8d4c67a59eb9447f45bd.jpg");
#
def image_url(source, options = {}, cache_buster = nil)
# Check for the Compass #image_url API,
# and work with it. We don't want to break
# the Compass mixins that expect it.
# Work with the Compass #image_url API
if options.respond_to? :value
case options.value
when true
Expand Down
8 changes: 1 addition & 7 deletions lib/sprockets/sass/sass_template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,7 @@ def initialize_engine
super

if Sass.add_sass_functions
begin
require "sprockets/sass/functions"
rescue LoadError
# Safely ignore load issues, because
# sprockets-helpers may not be available.
@@sass_functions_added = false
end
require "sprockets/sass/functions"
@@sass_functions_added = true
else
@@sass_functions_added = false
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
require "sprockets"
require "sprockets-sass"
require "sprockets-helpers"
require "compass"
require "construct"
require "sprockets-helpers"

Compass.configuration do |compass|
compass.line_comments = false
Expand Down

0 comments on commit ccf145d

Please sign in to comment.