Don't use the Base64 library. It's not found in ruby 1.9.
This commit is contained in:
parent
6cfba24232
commit
c78e097841
@ -1,4 +1,3 @@
|
|||||||
require 'base64'
|
|
||||||
module Compass::SassExtensions::Functions::InlineImage
|
module Compass::SassExtensions::Functions::InlineImage
|
||||||
|
|
||||||
def inline_image(path, mime_type = nil)
|
def inline_image(path, mime_type = nil)
|
||||||
@ -47,7 +46,7 @@ private
|
|||||||
|
|
||||||
def data(real_path)
|
def data(real_path)
|
||||||
if File.readable?(real_path)
|
if File.readable?(real_path)
|
||||||
Base64.encode64(File.read(real_path)).gsub("\n","")
|
[File.read(real_path)].pack('m').gsub("\n","")
|
||||||
else
|
else
|
||||||
raise Compass::Error, "File not found or cannot be read: #{real_path}"
|
raise Compass::Error, "File not found or cannot be read: #{real_path}"
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user