crush 0.3.2 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -23,12 +23,11 @@ module Crush
23
23
  end
24
24
 
25
25
  def prepare
26
- @engine = ::Sass::Engine.new DEFAULT_OPTIONS.dup.merge(options)
27
26
  @output = nil
28
27
  end
29
28
 
30
29
  def evaluate(scope, locals, &block)
31
- @output ||= @engine.render(data)
30
+ @output ||= ::Sass::Engine.new(data, DEFAULT_OPTIONS.dup.merge(options)).render
32
31
  end
33
32
  end
34
33
  end
@@ -1,3 +1,3 @@
1
1
  module Crush
2
- VERSION = "0.3.2"
2
+ VERSION = "0.3.3"
3
3
  end
@@ -5,22 +5,22 @@ describe Crush::Sass::Engine do
5
5
 
6
6
  it "compresses using Sass::Engine" do
7
7
  compressor = mock(:compressor)
8
- ::Sass::Engine.should_receive(:new).with(:style => :compressed, :syntax => :scss).and_return(compressor)
9
- compressor.should_receive(:render).with("hello").and_return("world")
8
+ ::Sass::Engine.should_receive(:new).with("hello", :style => :compressed, :syntax => :scss).and_return(compressor)
9
+ compressor.should_receive(:render).and_return("world")
10
10
  Crush::Sass::Engine.compress("hello").should == "world"
11
11
  end
12
12
 
13
13
  it "sends options to Sass::Engine" do
14
14
  compressor = mock(:compressor)
15
- ::Sass::Engine.should_receive(:new).with(:style => :compressed, :syntax => :scss, :foo => "bar").and_return(compressor)
16
- compressor.should_receive(:render).with("hello").and_return("world")
15
+ ::Sass::Engine.should_receive(:new).with("hello", :style => :compressed, :syntax => :scss, :foo => "bar").and_return(compressor)
16
+ compressor.should_receive(:render).and_return("world")
17
17
  Crush::Sass::Engine.new(:foo => "bar").compress("hello")
18
18
  end
19
19
 
20
20
  it "is registered with Tilt" do
21
21
  compressor = mock(:compressor)
22
- ::Sass::Engine.should_receive(:new).with(:style => :compressed, :syntax => :scss).and_return(compressor)
23
- compressor.should_receive(:render).with("hello").and_return("world")
22
+ ::Sass::Engine.should_receive(:new).with("hello", :style => :compressed, :syntax => :scss).and_return(compressor)
23
+ compressor.should_receive(:render).and_return("world")
24
24
  Tilt.register Crush::Sass::Engine, "css"
25
25
  Tilt.new("application.css").compress("hello").should == "world"
26
26
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: crush
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.3.2
5
+ version: 0.3.3
6
6
  platform: ruby
7
7
  authors:
8
8
  - Pete Browne