opulent 1.7.1 → 1.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/benchmarks/run-benchmarks.rb +3 -3
- data/benchmarks/view.op +1 -1
- data/lib/opulent/settings.rb +1 -1
- data/lib/opulent/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1452edab3f1662c37331457ca4fcce1e4ffd401d
|
4
|
+
data.tar.gz: 3a422895f5c092e81501e20447782038157e6cba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 056d9f523301271356b42f24551d38177b8f094502412ba3d41a50415e8d4ed4179171d9e83f6a27f8327ae34419323ef1ce087681710da0adeb29f2a6359599
|
7
|
+
data.tar.gz: 150c811e6a6578e7ab7a3b829feed842e88ba7d9a6ca0abb04d1f5c05b6079ba789f36c898c89ed96bd96ca7cc46e582257b21292f58c6434fa9424eaa1be0c5
|
@@ -17,8 +17,8 @@ class Benchmarks
|
|
17
17
|
def initialize(slow)
|
18
18
|
@benches = Hash.new { |h, k| h[k] = [] }
|
19
19
|
|
20
|
-
@opulent_code
|
21
|
-
@erb_code
|
20
|
+
@opulent_code = File.read(File.dirname(__FILE__) + '/view.op')
|
21
|
+
@erb_code = File.read(File.dirname(__FILE__) + '/view.erb')
|
22
22
|
@haml_code = File.read(File.dirname(__FILE__) + '/view.haml')
|
23
23
|
@slim_code = File.read(File.dirname(__FILE__) + '/view.slim')
|
24
24
|
|
@@ -82,7 +82,7 @@ class Benchmarks
|
|
82
82
|
context = Context.new
|
83
83
|
context_binding = context.instance_eval { binding }
|
84
84
|
|
85
|
-
bench(:parsing, 'opulent') { Opulent.new(@opulent_code).
|
85
|
+
bench(:parsing, 'opulent') { Opulent.new(@opulent_code).render(context) }
|
86
86
|
bench(:parsing, 'erb') { ERB.new(@erb_code).result(context_binding) }
|
87
87
|
bench(:parsing, 'erubis') { Erubis::Eruby.new(@erb_code).result(context_binding) }
|
88
88
|
bench(:parsing, 'fast erubis') { Erubis::FastEruby.new(@erb_code).result(context_binding) }
|
data/benchmarks/view.op
CHANGED
data/lib/opulent/settings.rb
CHANGED
@@ -37,7 +37,7 @@ module Opulent
|
|
37
37
|
|
38
38
|
# Check to see if we need to insert an end block for the current evaluation
|
39
39
|
# control do || .* end
|
40
|
-
END_INSERTION = /\A(if|begin|unless|else|elsif|when|rescue|ensure)\b|\bdo\s*(\|[^\|]*\|)?\s*$/
|
40
|
+
END_INSERTION = /\A(if|begin|unless|else|elsif|when|rescue|ensure|for|while|until)\b|\bdo\s*(\|[^\|]*\|)?\s*$/
|
41
41
|
END_REMOVAL = /\A(else|elsif|when|rescue|ensure)/
|
42
42
|
END_EXPLICIT = /\A(end)/
|
43
43
|
|
data/lib/opulent/version.rb
CHANGED