haml 2.2.11 → 2.2.12

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of haml might be problematic. Click here for more details.

data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.2.11
1
+ 2.2.12
@@ -49,6 +49,17 @@ module Sass
49
49
  opts
50
50
  end
51
51
 
52
+ # Same as \{#update\_stylesheets}, but respects \{#checked\_for\_updates}
53
+ # and the {file:SASS_REFERENCE.md#always_update-option `:always_update`}
54
+ # and {file:SASS_REFERENCE.md#always_check-option `:always_check`} options.
55
+ #
56
+ # @see #update_stylesheets
57
+ def check_for_updates
58
+ return unless !Sass::Plugin.checked_for_updates ||
59
+ Sass::Plugin.options[:always_update] || Sass::Plugin.options[:always_check]
60
+ update_stylesheets
61
+ end
62
+
52
63
  # Updates out-of-date stylesheets.
53
64
  #
54
65
  # Checks each Sass file in {file:SASS_REFERENCE.md#template_location-option `:template_location`}
@@ -7,22 +7,15 @@ unless defined?(Sass::RAILS_LOADED)
7
7
  :always_check => RAILS_ENV != "production",
8
8
  :full_exception => RAILS_ENV != "production")
9
9
 
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
16
-
17
10
  if defined?(ActionDispatch::Callbacks.to_prepare)
18
11
  # Rails >= 3.0.0
19
- ActionDispatch::Callbacks.to_prepare(&check)
12
+ ActionDispatch::Callbacks.to_prepare {Sass::Plugin.check_for_updates}
20
13
  else
21
14
  module ActionController
22
15
  class Base
23
16
  alias_method :sass_old_process, :process
24
17
  def process(*args)
25
- check.call
18
+ Sass::Plugin.check_for_updates
26
19
  sass_old_process(*args)
27
20
  end
28
21
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: haml
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.11
4
+ version: 2.2.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Weizenbaum