hamljs 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/hamljs.rb +1 -5
  2. data/lib/hamljs/railtie.rb +12 -0
  3. metadata +3 -2
@@ -1,5 +1 @@
1
- if defined?(:Sprockets)
2
- require 'hamljs/sprockets_template'
3
-
4
- Sprockets.register_engine '.hamljs', Hamljs::SprocketsTemplate
5
- end
1
+ require 'hamljs/railtie' if defined?(Rails)
@@ -0,0 +1,12 @@
1
+ require 'hamljs/sprockets_template'
2
+
3
+ module Hamljs
4
+ class HamljsRailtie < ::Rails::Railtie
5
+ if defined?(:Sprockets)
6
+
7
+ config.before_initialize do
8
+ Sprockets.register_engine '.hamljs', Hamljs::SprocketsTemplate
9
+ end
10
+ end
11
+ end
12
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hamljs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-08-11 00:00:00.000000000 +02:00
12
+ date: 2011-09-02 00:00:00.000000000 +02:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
  description: Compiles HAML templates for use in JST templating systems
@@ -22,6 +22,7 @@ files:
22
22
  - README.md
23
23
  - LICENSE
24
24
  - lib/hamljs/engine.rb
25
+ - lib/hamljs/railtie.rb
25
26
  - lib/hamljs/sprockets_template.rb
26
27
  - lib/hamljs.rb
27
28
  has_rdoc: true