mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
[Haml] Don't kill rake gems:install if only the plugin skeleton is installed.
Closes gh-55
This commit is contained in:
parent
18db0f6338
commit
add68bb641
3 changed files with 15 additions and 3 deletions
|
@ -27,6 +27,8 @@
|
||||||
This is consistent with the behavior of multiple ids
|
This is consistent with the behavior of multiple ids
|
||||||
when one is specified as a standard attribute.
|
when one is specified as a standard attribute.
|
||||||
|
|
||||||
|
* Don't crash if the plugin skeleton is installed and `rake gems:install` is run.
|
||||||
|
|
||||||
## [2.2.10](http://github.com/nex3/haml/commit/2.2.10)
|
## [2.2.10](http://github.com/nex3/haml/commit/2.2.10)
|
||||||
|
|
||||||
* Fixed a bug where elements with dynamic attributes and no content
|
* Fixed a bug where elements with dynamic attributes and no content
|
||||||
|
|
|
@ -14,6 +14,8 @@
|
||||||
|
|
||||||
* Fixed `css2sass`'s generation of pseudo-classes so that they're backslash-escaped.
|
* Fixed `css2sass`'s generation of pseudo-classes so that they're backslash-escaped.
|
||||||
|
|
||||||
|
* Don't crash if the Haml plugin skeleton is installed and `rake gems:install` is run.
|
||||||
|
|
||||||
## [2.2.10](http://github.com/nex3/haml/commit/2.2.10)
|
## [2.2.10](http://github.com/nex3/haml/commit/2.2.10)
|
||||||
|
|
||||||
* Add support for attribute selectors with spaces around the `=`.
|
* Add support for attribute selectors with spaces around the `=`.
|
||||||
|
|
14
init.rb
14
init.rb
|
@ -1,8 +1,16 @@
|
||||||
begin
|
begin
|
||||||
require File.join(File.dirname(__FILE__), 'lib', 'haml') # From here
|
require File.join(File.dirname(__FILE__), 'lib', 'haml') # From here
|
||||||
rescue LoadError
|
rescue LoadError
|
||||||
require 'haml' # From gem
|
begin
|
||||||
|
require 'haml' # From gem
|
||||||
|
rescue LoadError => e
|
||||||
|
# gems:install may be run to install Haml with the skeleton plugin
|
||||||
|
# but not the gem itself installed.
|
||||||
|
# Don't die if this is the case.
|
||||||
|
raise e unless defined?(Rake) && Rake.application.top_level_tasks.include?('gems:install')
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Load Haml and Sass
|
# Load Haml and Sass.
|
||||||
Haml.init_rails(binding)
|
# Haml may be undefined if we're running gems:install.
|
||||||
|
Haml.init_rails(binding) if defined?(Haml)
|
||||||
|
|
Loading…
Reference in a new issue