mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
Merge branch 'stable'
Conflicts: VERSION doc-src/HAML_CHANGELOG.md doc-src/SASS_CHANGELOG.md
This commit is contained in:
commit
45062c18fe
4 changed files with 21 additions and 9 deletions
|
@ -122,6 +122,10 @@ including the line number and the offending character.
|
|||
* Multi-line ERB statements are now properly indented,
|
||||
and those without any content are removed.
|
||||
|
||||
## [2.2.12](http://github.com/nex3/haml/commit/2.2.12)
|
||||
|
||||
There were no changes made to Sass between versions 2.2.11 and 2.2.12.
|
||||
|
||||
## [2.2.11](http://github.com/nex3/haml/commit/2.2.11)
|
||||
|
||||
* Fixed a bug with XSS protection where HTML escaping would raise an error
|
||||
|
|
|
@ -51,6 +51,10 @@ Several bug fixes and minor improvements have been made, including:
|
|||
* Displaying the expected strings as strings rather than regular expressions
|
||||
whenever possible.
|
||||
|
||||
## [2.2.12](http://github.com/nex3/haml/commit/2.2.12)
|
||||
|
||||
* Fix a stupid bug introduced in 2.2.11 that broke the Sass Rails plugin.
|
||||
|
||||
## [2.2.11](http://github.com/nex3/haml/commit/2.2.11)
|
||||
|
||||
* Added a note to errors on properties that could be pseudo-classes (e.g. `:focus`)
|
||||
|
|
|
@ -50,6 +50,17 @@ module Sass
|
|||
opts
|
||||
end
|
||||
|
||||
# Same as \{#update\_stylesheets}, but respects \{#checked\_for\_updates}
|
||||
# and the {file:SASS_REFERENCE.md#always_update-option `:always_update`}
|
||||
# and {file:SASS_REFERENCE.md#always_check-option `:always_check`} options.
|
||||
#
|
||||
# @see #update_stylesheets
|
||||
def check_for_updates
|
||||
return unless !Sass::Plugin.checked_for_updates ||
|
||||
Sass::Plugin.options[:always_update] || Sass::Plugin.options[:always_check]
|
||||
update_stylesheets
|
||||
end
|
||||
|
||||
# Updates out-of-date stylesheets.
|
||||
#
|
||||
# Checks each Sass file in {file:SASS_REFERENCE.md#template_location-option `:template_location`}
|
||||
|
|
|
@ -7,22 +7,15 @@ unless defined?(Sass::RAILS_LOADED)
|
|||
:always_check => RAILS_ENV != "production",
|
||||
:full_exception => RAILS_ENV != "production")
|
||||
|
||||
check = lambda do
|
||||
if !Sass::Plugin.checked_for_updates ||
|
||||
Sass::Plugin.options[:always_update] || Sass::Plugin.options[:always_check]
|
||||
Sass::Plugin.update_stylesheets
|
||||
end
|
||||
end
|
||||
|
||||
if defined?(ActionDispatch::Callbacks.to_prepare)
|
||||
# Rails >= 3.0.0
|
||||
ActionDispatch::Callbacks.to_prepare(&check)
|
||||
ActionDispatch::Callbacks.to_prepare {Sass::Plugin.check_for_updates}
|
||||
else
|
||||
module ActionController
|
||||
class Base
|
||||
alias_method :sass_old_process, :process
|
||||
def process(*args)
|
||||
check.call
|
||||
Sass::Plugin.check_for_updates
|
||||
sass_old_process(*args)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue