smt_rails 0.2.5 → 0.2.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,38 +1,6 @@
1
1
  require 'tilt'
2
- require 'execjs'
3
- require 'pathname'
4
2
 
5
3
  module SmtRails
6
- class MustacheCompile
7
- class << self
8
- def compile(source, options = {})
9
- context.eval("Mustache.compile(#{source.inspect})")
10
- end
11
-
12
- def compilePartial(name, source, options = {})
13
- context.eval("Mustache.compilePartial(#{name.inspect}, #{source.inspect})")
14
- end
15
-
16
- private
17
-
18
- def context
19
- @context ||= ExecJS.compile(source)
20
- end
21
-
22
- def source
23
- @source ||= path.read
24
- end
25
-
26
- def path
27
- @path ||= assets_path.join('javascripts', 'mustache.js')
28
- end
29
-
30
- def assets_path
31
- @assets_path ||= Pathname(__FILE__).dirname.join('..', '..', 'vendor', 'assets')
32
- end
33
- end
34
- end
35
-
36
4
  class Tilt < Tilt::Template
37
5
  def self.default_mime_type
38
6
  'application/javascript'
@@ -1,3 +1,3 @@
1
1
  module SmtRails
2
- VERSION = "0.2.5"
2
+ VERSION = "0.2.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smt_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -116,7 +116,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
116
116
  version: '0'
117
117
  segments:
118
118
  - 0
119
- hash: -290175364099614496
119
+ hash: -3287018752011025401
120
120
  required_rubygems_version: !ruby/object:Gem::Requirement
121
121
  none: false
122
122
  requirements:
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
125
  version: '0'
126
126
  segments:
127
127
  - 0
128
- hash: -290175364099614496
128
+ hash: -3287018752011025401
129
129
  requirements: []
130
130
  rubyforge_project:
131
131
  rubygems_version: 1.8.25