mochiscript 0.5.5 → 0.5.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,16 @@
1
+ require 'haml'
2
+
3
+ module Haml::Filters::Mochiscript
4
+ include ::Haml::Filters::Base
5
+
6
+ def render(text)
7
+ ctx = Mochiscript::Context.new
8
+ <<END
9
+ <script type="text/javascript">
10
+ //<![CDATA[
11
+ #{ctx.parse(text)}
12
+ //]]>
13
+ </script>
14
+ END
15
+ end
16
+ end
@@ -1,4 +1,5 @@
1
1
  require 'sprockets'
2
+ require 'sprockets/engines'
2
3
 
3
4
  class Engine < ::Rails::Engine
4
5
  end
@@ -1,3 +1,3 @@
1
1
  module Mochiscript
2
- VERSION = "0.5.5"
2
+ VERSION = "0.5.6"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: mochiscript
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.5.5
5
+ version: 0.5.6
6
6
  platform: ruby
7
7
  authors:
8
8
  - Jeff Su
@@ -54,6 +54,7 @@ files:
54
54
  - bin/ms-run
55
55
  - lib/mochiscript.rb
56
56
  - lib/mochiscript/core.rb
57
+ - lib/mochiscript/haml.rb
57
58
  - lib/mochiscript/rails/engine.rb
58
59
  - lib/mochiscript/sinatra/templates.rb
59
60
  - lib/mochiscript/tilt/template.rb