sass 3.1.0.alpha.39 → 3.1.0.alpha.40

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.
@@ -1 +1 @@
1
- 3.1.0.alpha.39
1
+ 3.1.0.alpha.40
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.1.0.alpha.39
1
+ 3.1.0.alpha.40
@@ -37,7 +37,7 @@ module Sass
37
37
  return unless template =
38
38
  find_template(uri, nil, !:partial) ||
39
39
  find_template(uri, nil, :partial)
40
- template.updated_at.to_i
40
+ template.updated_at
41
41
  end
42
42
 
43
43
  # @see Base#to_s
@@ -49,20 +49,9 @@ unless defined?(Sass::RAILS_LOADED)
49
49
  :importer => rails_importer,
50
50
  :load_paths => [rails_importer] + Sass::Plugin.engine_options[:load_paths]))
51
51
 
52
- # We need to serialize/deserialize the importers to make sure
53
- # that each dependency is matched up to its proper importer
54
- # for when importer#mtime is called.
55
- dependencies = engine.dependencies
56
- importers = Sass::Util.to_hash(
57
- Sass::Util.enum_with_index(dependencies).map do |e, i|
58
- importer = e.options[:importer]
59
- [importer, {
60
- :variable => "importer_#{i}",
61
- :expression => (importer == rails_importer ?
62
- "Sass::Importers::Rails.new(lookup_context)" :
63
- "Sass::Util.load(#{Sass::Util.dump(importer)})")
64
- }]
65
- end)
52
+ template.data[:sass_importers] = engine.dependencies.map do |e|
53
+ [e.options[:filename], e.options[:importer]]
54
+ end
66
55
 
67
56
  stylesheet =
68
57
  begin
@@ -74,10 +63,8 @@ unless defined?(Sass::RAILS_LOADED)
74
63
 
75
64
  <<RUBY
76
65
  begin
77
- #{importers.map {|_, val| "#{val[:variable]} = #{val[:expression]}"}.join("\n")}
78
66
  if Sass::Plugin::TemplateHandler.dependencies_changed?(
79
- [#{dependencies.map {|e| "[#{e.options[:filename].inspect}, #{importers[e.options[:importer]][:variable]}]"}.join(',')}],
80
- #{Time.now.to_i})
67
+ @_template.data[:sass_importers], #{Time.now.to_i})
81
68
  @_template.expire!
82
69
  @_template.rerender(self)
83
70
  else
@@ -92,7 +79,10 @@ RUBY
92
79
 
93
80
  def self.dependencies_changed?(deps, since)
94
81
  opts = Sass::Plugin.engine_options.merge(:cache => false)
95
- deps.any? {|d, i| i.mtime(d, opts) > since}
82
+ deps.any? do |d, i|
83
+ return true unless time = i.mtime(d, opts)
84
+ time.to_i > since
85
+ end
96
86
  end
97
87
 
98
88
  def self.munge_exception(e, lookup_context)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sass
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0.alpha.39
4
+ version: 3.1.0.alpha.40
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Weizenbaum
@@ -11,7 +11,7 @@ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
13
 
14
- date: 2010-11-23 00:00:00 -05:00
14
+ date: 2010-11-26 00:00:00 -05:00
15
15
  default_executable:
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
@@ -61,8 +61,8 @@ files:
61
61
  - lib/sass/plugin/configuration.rb
62
62
  - lib/sass/plugin/merb.rb
63
63
  - lib/sass/plugin/generic.rb
64
- - lib/sass/plugin/rails.rb
65
64
  - lib/sass/plugin/rack.rb
65
+ - lib/sass/plugin/rails.rb
66
66
  - lib/sass/plugin/staleness_checker.rb
67
67
  - lib/sass/plugin/compiler.rb
68
68
  - lib/sass/importers.rb