diff --git a/lib/compass/installers/base.rb b/lib/compass/installers/base.rb index bf2e328c..245e82f4 100644 --- a/lib/compass/installers/base.rb +++ b/lib/compass/installers/base.rb @@ -58,7 +58,7 @@ module Compass # The default install method. Calls install_ methods in the order specified by the manifest. def install manifest.each do |entry| - send("install_#{entry.type}", entry.from, entry.options) + send("install_#{entry.type}", entry.from, entry.to, entry.options) end end @@ -68,23 +68,19 @@ module Compass end - def install_stylesheet(from, options) - to = options[:to] || from + def install_stylesheet(from, to, options) copy from, "#{sass_dir}/#{to}" end - def install_image(from, options) - to = options[:to] || from + def install_image(from, to, options) copy from, "#{images_dir}/#{to}" end - def install_script(from, options) - to = options[:to] || from + def install_script(from, to, options) copy from, "#{javascripts_dir}/#{to}" end - def install_file(from, options) - to = options[:to] || from + def install_file(from, to, options) copy from, to end diff --git a/lib/compass/installers/manifest.rb b/lib/compass/installers/manifest.rb index 6924730c..39a3a9fe 100644 --- a/lib/compass/installers/manifest.rb +++ b/lib/compass/installers/manifest.rb @@ -4,7 +4,11 @@ module Compass class Manifest # A Manifest entry - Entry = Struct.new(:type, :from, :options) + class Entry < Struct.new(:type, :from, :options) + def to + options[:to] || from + end + end def initialize(manifest_file = nil) @entries = []