haml 2.2.11 → 2.2.12
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.
Potentially problematic release.
This version of haml might be problematic. Click here for more details.
- data/VERSION +1 -1
- data/lib/sass/plugin.rb +11 -0
- data/lib/sass/plugin/rails.rb +2 -9
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.2.
|
1
|
+
2.2.12
|
data/lib/sass/plugin.rb
CHANGED
@@ -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`}
|
data/lib/sass/plugin/rails.rb
CHANGED
@@ -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
|
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
|
-
|
18
|
+
Sass::Plugin.check_for_updates
|
26
19
|
sass_old_process(*args)
|
27
20
|
end
|
28
21
|
end
|