sass-rails 3.1.5 → 3.1.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -41,6 +41,11 @@ module Sass::Rails
41
41
  end
42
42
  end
43
43
 
44
+ # Remove the sass middleware if it gets inadvertently enabled by applications.
45
+ config.after_initialize do |app|
46
+ app.config.middleware.delete(Sass::Plugin::Rack) if defined?(Sass::Plugin::Rack)
47
+ end
48
+
44
49
  initializer :setup_sass, :group => :all do |app|
45
50
  # Only emit one kind of syntax because though we have registered two kinds of generators
46
51
  syntax = app.config.sass.preferred_syntax.to_sym
@@ -19,7 +19,7 @@ module Sass::Rails
19
19
  nil
20
20
  end
21
21
 
22
- def public_path(path, scope)
22
+ def public_path(path, scope = nil)
23
23
  context.asset_paths.compute_public_path(path, ::Rails.application.config.assets.prefix)
24
24
  end
25
25
 
@@ -72,14 +72,17 @@ module Sass::Rails
72
72
  options = sass_options_from_rails(scope)
73
73
  load_paths = (options[:load_paths] || []).dup
74
74
  load_paths.unshift(importer)
75
+ resolver = Resolver.new(scope)
76
+ css_filename = File.join(::Rails.public_path, resolver.public_path(scope.logical_path)) + ".css"
75
77
  options.merge(
76
78
  :filename => eval_file,
79
+ :css_filename => css_filename,
77
80
  :line => line,
78
81
  :syntax => syntax,
79
82
  :importer => importer,
80
83
  :load_paths => load_paths,
81
84
  :custom => {
82
- :resolver => Resolver.new(scope)
85
+ :resolver => resolver
83
86
  }
84
87
  )
85
88
  end
@@ -1,5 +1,5 @@
1
1
  module Sass
2
2
  module Rails
3
- VERSION = "3.1.5"
3
+ VERSION = "3.1.6"
4
4
  end
5
5
  end
@@ -14,7 +14,7 @@ Gem::Specification.new do |s|
14
14
 
15
15
  s.rubyforge_project = "sass-rails"
16
16
 
17
- s.add_runtime_dependency 'sass', '~> 3.1.10'
17
+ s.add_runtime_dependency 'sass', '>= 3.1.10'
18
18
  s.add_runtime_dependency 'railties', '~> 3.1.0'
19
19
  s.add_runtime_dependency 'actionpack', '~> 3.1.0'
20
20
  s.add_runtime_dependency 'tilt', '~> 1.3.2'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sass-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.5
4
+ version: 3.1.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,22 +10,22 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2011-11-17 00:00:00.000000000 Z
13
+ date: 2012-03-19 00:00:00.000000000Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: sass
17
- requirement: &18487800 !ruby/object:Gem::Requirement
17
+ requirement: &70317020519500 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
- - - ~>
20
+ - - ! '>='
21
21
  - !ruby/object:Gem::Version
22
22
  version: 3.1.10
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *18487800
25
+ version_requirements: *70317020519500
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: railties
28
- requirement: &18487300 !ruby/object:Gem::Requirement
28
+ requirement: &70317020516840 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ~>
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: 3.1.0
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *18487300
36
+ version_requirements: *70317020516840
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: actionpack
39
- requirement: &18486840 !ruby/object:Gem::Requirement
39
+ requirement: &70317020504560 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ~>
@@ -44,10 +44,10 @@ dependencies:
44
44
  version: 3.1.0
45
45
  type: :runtime
46
46
  prerelease: false
47
- version_requirements: *18486840
47
+ version_requirements: *70317020504560
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: tilt
50
- requirement: &18486380 !ruby/object:Gem::Requirement
50
+ requirement: &70317020485440 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ~>
@@ -55,7 +55,7 @@ dependencies:
55
55
  version: 1.3.2
56
56
  type: :runtime
57
57
  prerelease: false
58
- version_requirements: *18486380
58
+ version_requirements: *70317020485440
59
59
  description: Sass adapter for the Rails asset pipeline.
60
60
  email:
61
61
  - wycats@gmail.com