sass-rails 3.2.2 → 3.2.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -15,7 +15,7 @@ module Sass
15
15
  Sass::Script::String.new(%Q{url(#{public_path(asset.value, kind.value)})})
16
16
  end
17
17
 
18
- [:image, :video, :audio, :javascript, :stylesheet].each do |asset_class|
18
+ [:image, :video, :audio, :javascript, :stylesheet, :font].each do |asset_class|
19
19
  class_eval %Q{
20
20
  def #{asset_class}_path(asset)
21
21
  Sass::Script::String.new(resolver.#{asset_class}_path(asset.value), true)
@@ -26,14 +26,6 @@ module Sass
26
26
  }, __FILE__, __LINE__ - 6
27
27
  end
28
28
 
29
- def font_path(asset)
30
- asset_path(asset, Sass::Script::String.new("font"))
31
- end
32
-
33
- def font_url(asset)
34
- asset_url(asset, Sass::Script::String.new("font"))
35
- end
36
-
37
29
  protected
38
30
 
39
31
  def resolver
@@ -19,8 +19,12 @@ module Sass::Rails
19
19
  nil
20
20
  end
21
21
 
22
- def public_path(path, scope = nil)
23
- context.asset_paths.compute_public_path(path, ::Rails.application.config.assets.prefix)
22
+ def source_path(path, ext)
23
+ context.asset_paths.compute_source_path(path, ::Rails.application.config.assets.prefix, ext)
24
+ end
25
+
26
+ def public_path(path, scope = nil, options = {})
27
+ context.asset_paths.compute_public_path(path, ::Rails.application.config.assets.prefix, options)
24
28
  end
25
29
 
26
30
  def process(path)
@@ -46,6 +50,10 @@ module Sass::Rails
46
50
  def stylesheet_path(stylesheet)
47
51
  context.stylesheet_path(stylesheet)
48
52
  end
53
+
54
+ def font_path(font)
55
+ context.font_path(font)
56
+ end
49
57
  end
50
58
 
51
59
  class SassTemplate < Tilt::SassTemplate
@@ -73,7 +81,7 @@ module Sass::Rails
73
81
  load_paths = (options[:load_paths] || []).dup
74
82
  load_paths.unshift(importer)
75
83
  resolver = Resolver.new(scope)
76
- css_filename = File.join(::Rails.public_path, resolver.public_path(scope.logical_path)) + ".css"
84
+ css_filename = resolver.source_path(scope.logical_path, 'css')
77
85
  options.merge(
78
86
  :filename => eval_file,
79
87
  :css_filename => css_filename,
@@ -1,5 +1,5 @@
1
1
  module Sass
2
2
  module Rails
3
- VERSION = "3.2.2"
3
+ VERSION = "3.2.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sass-rails
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
4
+ hash: 9
5
5
  prerelease: false
6
6
  segments:
7
7
  - 3
8
8
  - 2
9
- - 2
10
- version: 3.2.2
9
+ - 3
10
+ version: 3.2.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - wycats
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-12-22 00:00:00 -02:00
19
+ date: 2012-01-04 00:00:00 -02:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency