Skip to content

Commit

Permalink
[Sass] Actually, we don't need to manually set that default option.
Browse files Browse the repository at this point in the history
The options are already merged into DEFAULT_OPTIONS,
and no one should be setting it to nil explicitly.
  • Loading branch information
nex3 committed Dec 24, 2009
1 parent e3a1aa4 commit 4614603
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 19 deletions.
3 changes: 0 additions & 3 deletions doc-src/SASS_CHANGELOG.md
Expand Up @@ -20,9 +20,6 @@
{Sass::Script::Functions::EvaluationContext Functions::EvaluationContext}).
Now the module simply needs to be included in {Sass::Script::Functions}.

* Fixed a bug where {Sass::Plugin} would die if caching was enabled
but the cache location wasn't explicitly set.

## [2.2.15](http://github.com/nex3/haml/commit/2.2.15)

* Added {Sass::Script::Color#with} for a way of setting color channels
Expand Down
2 changes: 1 addition & 1 deletion lib/sass/files.rb
Expand Up @@ -84,7 +84,7 @@ def find_file_to_import(filename, load_paths)
private

def sassc_filename(filename, options)
File.join(options[:cache_location] || Sass::Engine::DEFAULT_OPTIONS[:cache_location],
File.join(options[:cache_location],
Digest::SHA1.hexdigest(File.dirname(File.expand_path(filename))),
File.basename(filename) + 'c')
end
Expand Down
15 changes: 0 additions & 15 deletions test/sass/plugin_test.rb
Expand Up @@ -138,21 +138,6 @@ def test_cached_dependencies_update
FileUtils.mv(template_loc("basic", "more_"), template_loc("basic"))
end

def test_update_with_cache_but_without_cache_location
old_cache = Sass::Plugin.options[:cache]
old_cache_location = Sass::Plugin.options[:cache_location]
Sass::Plugin.options[:cache] = true
Sass::Plugin.options[:cache_location] = nil

# We just want to make sure this doesn't raise an exception
FileUtils.touch(template_loc('basic'))
Sass::Plugin.update_stylesheets
assert_stylesheet_updated 'basic'
ensure
Sass::Plugin.options[:cache] = old_cache
Sass::Plugin.options[:cache_location] = old_cache_location
end

private

def assert_renders_correctly(*arguments)
Expand Down

0 comments on commit 4614603

Please sign in to comment.