tilt-mustache 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1 +1,41 @@
1
1
  # tilt-mustache
2
+
3
+ This gem is a verbatim copy of this tilt [pull request](https://github.com/rtomayko/tilt/pull/51) done by @Becojo
4
+
5
+ Rather than the [standard extension](https://github.com/defunkt/mustache/blob/master/lib/mustache/sinatra.rb) with this gem you should able to:
6
+
7
+ Mustache is awesome logic-less template engine, but for very small uses we can forget for a while the ruby implementation of views.
8
+
9
+ So if you agree with this different core concept you can easily render your `{mustache}` templates like:
10
+
11
+ ``` rb
12
+ # controllers/some.rb
13
+ get :index do
14
+ render :index, :locals => { :foo => :bar }
15
+ end
16
+ ```
17
+
18
+ ``` mustache
19
+ # views/index.ms
20
+ Hello I'm {{foo}}
21
+ ```
22
+
23
+ ## Author
24
+
25
+ DAddYE, you can follow me on twitter [@daddye](http://twitter.com/daddye) or take a look at my site [daddye.it](http://www.daddye.it)
26
+
27
+ ## Copyright
28
+
29
+ Copyright (C) 2011 Davide D'Agostino - [@daddye](http://twitter.com/daddye)
30
+
31
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
32
+ associated documentation files (the “Software”), to deal in the Software without restriction, including without
33
+ limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
34
+ and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
35
+
36
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
37
+
38
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
39
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM,
40
+ DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
41
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,13 +1,11 @@
1
1
  require 'tilt' unless defined? Tilt
2
+ require 'mustache'
2
3
 
3
4
  module Tilt
4
5
  # Mustache template
5
6
  # https://github.com/defunkt/mustache
6
7
  class MustacheTemplate < Template
7
- def initialize_engine
8
- return if defined? ::Mustache
9
- require_template_library 'mustache'
10
- end
8
+ def initialize_engine; end
11
9
 
12
10
  def prepare; end
13
11
 
@@ -16,4 +14,5 @@ module Tilt
16
14
  end
17
15
  end
18
16
  register 'mustache', MustacheTemplate
17
+ register 'ms', MustacheTemplate
19
18
  end
@@ -1,8 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "tilt-mustache"
3
- s.version = "0.0.1"
4
- s.date = "2012-01-04"
5
- s.platform = Gem::Platform::RUBY
3
+ s.version = "0.0.2"
6
4
  s.authors = ["Davide D'Agostino"]
7
5
  s.email = "d.dagostino@lipsiasoft.com"
8
6
  s.homepage = "http://github.com/daddye/tilt-mustache"
@@ -14,5 +12,6 @@ Gem::Specification.new do |s|
14
12
  s.add_development_dependency 'minitest'
15
13
 
16
14
  s.files = `git ls-files`.split("\n")
15
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
17
16
  s.require_paths = ["lib"]
18
17
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tilt-mustache
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Davide D'Agostino
@@ -111,5 +111,6 @@ rubygems_version: 1.6.2
111
111
  signing_key:
112
112
  specification_version: 3
113
113
  summary: Add Mustache to Tilt
114
- test_files: []
115
-
114
+ test_files:
115
+ - test/helper.rb
116
+ - test/test_mustache.rb