cuba 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/cuba.gemspec +1 -1
- data/lib/cuba/ron.rb +7 -1
- data/lib/cuba/version.rb +1 -1
- metadata +3 -3
data/cuba.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "cuba"
|
3
|
-
s.version = "0.0.
|
3
|
+
s.version = "0.0.2"
|
4
4
|
s.summary = "Rum based microframework for web applications."
|
5
5
|
s.description = "Cuba is a light wrapper for Rum, a microframework for Rack applications."
|
6
6
|
s.authors = ["Michel Martens"]
|
data/lib/cuba/ron.rb
CHANGED
@@ -4,8 +4,14 @@ require "tilt"
|
|
4
4
|
|
5
5
|
module Cuba
|
6
6
|
class Ron < Rum
|
7
|
+
def _cache
|
8
|
+
Thread.current[:_cache] ||= Tilt::Cache.new
|
9
|
+
end
|
10
|
+
|
7
11
|
def haml(template, locals = {})
|
8
|
-
|
12
|
+
_cache.fetch(template, locals) {
|
13
|
+
Tilt::HamlTemplate.new("#{template}.haml")
|
14
|
+
}.render(self, locals)
|
9
15
|
end
|
10
16
|
end
|
11
17
|
end
|
data/lib/cuba/version.rb
CHANGED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 2
|
9
|
+
version: 0.0.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Michel Martens
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-04-
|
17
|
+
date: 2010-04-26 00:00:00 -03:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|