lib/massimo/config.rb in massimo-0.10.0 vs lib/massimo/config.rb in massimo-0.10.1

- old
+ new

@@ -28,11 +28,12 @@ } CSS_COMPRESSORS = { :cssmin => Crush::CSSMin, :rainpress => Crush::Rainpress, - :yui => Crush::YUI::CssCompressor + :yui => Crush::YUI::CssCompressor, + :sass => Crush::Sass::Engine } # Creates a new configuration. Takes either a hash of options # or a file path to a .yaml file. def initialize(options = nil) @@ -92,11 +93,11 @@ # Sets the options used by the JavaScript compressor. # # @param [Hash] options The hash of options to use. def js_compressor_options=(options) - self.js = options + self.js_options = options end # Sets up Massimo to compress CSS files. By default, # whichever CSS compression library is available, is used. # To set the one you want to use see #css_compressor=. @@ -120,11 +121,11 @@ # Sets the options used by the CSS compressor. # # @param [Hash] options The hash of options to use. def css_compressor_options=(options) - self.css = options + self.css_options = options end # Get a full, expanded path for the given resource name. This is either set # in the configuration or determined dynamically based on the name. def path_for(resource_name) @@ -148,9 +149,9 @@ # Convience method for getting options for a given library name. For instance, # this is how we get the options set for Haml or Sass during processing. def options_for(lib_name) return options_for("sass") if lib_name == "scss" - send(lib_name) || {} + send("#{lib_name}_options") || send(lib_name) || {} end end end \ No newline at end of file