merb-haml 1.0.8.1 → 1.0.9
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/merb-haml/template.rb +5 -2
- data/lib/merb-haml.rb +1 -2
- metadata +3 -3
data/lib/merb-haml/template.rb
CHANGED
@@ -11,8 +11,11 @@ module Merb::Template
|
|
11
11
|
# mod<Class, Module>::
|
12
12
|
# The class or module wherein this method should be defined.
|
13
13
|
def self.compile_template(io, name, locals, mod)
|
14
|
-
path
|
15
|
-
config
|
14
|
+
path = File.expand_path(io.path)
|
15
|
+
config = (Merb::Plugins.config[:haml] || {}).inject({}) do |c, (k, v)|
|
16
|
+
c[k.to_sym] = v
|
17
|
+
c
|
18
|
+
end.merge :filename => path
|
16
19
|
template = ::Haml::Engine.new(io.read, config)
|
17
20
|
template.def_method(mod, name, *locals)
|
18
21
|
name
|
data/lib/merb-haml.rb
CHANGED
@@ -3,8 +3,7 @@ if defined?(Merb)
|
|
3
3
|
require "haml"
|
4
4
|
require "merb-haml/template"
|
5
5
|
Merb::Plugins.add_rakefiles(File.join(File.dirname(__FILE__) / "merb-haml" / "merbtasks"))
|
6
|
-
|
7
|
-
Merb::Plugins.config[:haml] ||= {}
|
6
|
+
|
8
7
|
Merb::Plugins.config[:sass] ||= {}
|
9
8
|
|
10
9
|
Merb::BootLoader.after_app_loads do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: merb-haml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yehuda Katz
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-02-12 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -20,7 +20,7 @@ dependencies:
|
|
20
20
|
requirements:
|
21
21
|
- - "="
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: 1.0.
|
23
|
+
version: 1.0.9
|
24
24
|
version:
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: haml
|