haml-edge 2.3.72 → 2.3.73

Sign up to get free protection for your applications and to get access to all the features.
data/EDGE_GEM_VERSION CHANGED
@@ -1 +1 @@
1
- 2.3.72
1
+ 2.3.73
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.3.72
1
+ 2.3.73
data/lib/haml/util.rb CHANGED
@@ -141,8 +141,8 @@ module Haml
141
141
  #
142
142
  # @return [String, nil]
143
143
  def rails_root
144
- return Rails.root if defined?(Rails.root)
145
- return RAILS_ROOT if defined?(RAILS_ROOT)
144
+ return Rails.root.to_s if defined?(Rails.root)
145
+ return RAILS_ROOT.to_s if defined?(RAILS_ROOT)
146
146
  return nil
147
147
  end
148
148
 
@@ -7,16 +7,24 @@ unless defined?(Sass::RAILS_LOADED)
7
7
  :always_check => RAILS_ENV != "production",
8
8
  :full_exception => RAILS_ENV != "production")
9
9
 
10
- module ActionController
11
- class Base
12
- alias_method :sass_old_process, :process
13
- def process(*args)
14
- if !Sass::Plugin.checked_for_updates ||
15
- Sass::Plugin.options[:always_update] || Sass::Plugin.options[:always_check]
16
- Sass::Plugin.update_stylesheets
17
- end
10
+ check = lambda do
11
+ if !Sass::Plugin.checked_for_updates ||
12
+ Sass::Plugin.options[:always_update] || Sass::Plugin.options[:always_check]
13
+ Sass::Plugin.update_stylesheets
14
+ end
15
+ end
18
16
 
19
- sass_old_process(*args)
17
+ if defined?(ActionDispatch::Callbacks.to_prepare)
18
+ # Rails >= 3.0.0
19
+ ActionDispatch::Callbacks.to_prepare(&check)
20
+ else
21
+ module ActionController
22
+ class Base
23
+ alias_method :sass_old_process, :process
24
+ def process(*args)
25
+ check.call
26
+ sass_old_process(*args)
27
+ end
20
28
  end
21
29
  end
22
30
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: haml-edge
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.72
4
+ version: 2.3.73
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Weizenbaum