mote 0.0.1.rc2 → 0.0.1.rc3

Sign up to get free protection for your applications and to get access to all the features.
data/README.markdown CHANGED
@@ -64,7 +64,7 @@ free to include it in your code. To do it, just type:
64
64
 
65
65
  Here are the available helpers:
66
66
 
67
- ## `mote`
67
+ ## mote
68
68
 
69
69
  The `mote` helper receives a template string and returns the rendered version
70
70
  of it:
@@ -75,18 +75,17 @@ It works with parameters too:
75
75
 
76
76
  assert_equal "1 2 3", mote("1 <%= params[:n] %> 3", :n => 2)
77
77
 
78
- ## `mote_file`
78
+ ## mote_file
79
79
 
80
- The `mote_file` helper receives a file name without the `.erb` extension and
81
- returns the rendered version of its content. The compiled template is cached
82
- for subsequent calls.
80
+ The `mote_file` helper receives a file name and returns the rendered version of
81
+ its content. The compiled template is cached for subsequent calls.
83
82
 
84
- assert_equal "***\n", mote_file("test/basic", :n => 3)
83
+ assert_equal "***\n", mote_file("test/basic.erb", :n => 3)
85
84
 
86
85
  Installation
87
86
  ------------
88
87
 
89
- $ gem install mote
88
+ $ gem install mote --pre
90
89
 
91
90
  License
92
91
  -------
data/lib/mote.rb CHANGED
@@ -18,7 +18,7 @@
18
18
  # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
19
  # THE SOFTWARE.
20
20
  class Mote
21
- VERSION = "0.0.1.rc2"
21
+ VERSION = "0.0.1.rc3"
22
22
 
23
23
  def self.parse(template, context = self)
24
24
  terms = template.split(/(<%[=#]?)\s*(.*?)\s*%>/)
@@ -46,7 +46,7 @@ class Mote
46
46
  end
47
47
 
48
48
  def mote_file(filename, params = {})
49
- mote_files[filename] ||= Mote.parse(File.read("#{filename}.erb"))
49
+ mote_files[filename] ||= Mote.parse(File.read(filename))
50
50
  mote_files[filename][params]
51
51
  end
52
52
 
data/mote.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "mote"
3
- s.version = "0.0.1.rc2"
3
+ s.version = "0.0.1.rc3"
4
4
  s.summary = "Minimum Operational Template."
5
5
  s.description = "Mote is the little brother of ERB. It only provides a subset of ERB's features, but praises itself of being simple--both internally and externally--and super fast."
6
6
  s.authors = ["Michel Martens"]
data/test/mote_test.rb CHANGED
@@ -45,6 +45,6 @@ scope do
45
45
  end
46
46
 
47
47
  test do
48
- assert_equal "***\n", mote_file("test/basic", :n => 3)
48
+ assert_equal "***\n", mote_file("test/basic.erb", :n => 3)
49
49
  end
50
50
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: mote
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease: 6
5
- version: 0.0.1.rc2
5
+ version: 0.0.1.rc3
6
6
  platform: ruby
7
7
  authors:
8
8
  - Michel Martens