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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7441c9029694ce515a43f6ad45a35bab1b9b7044
4
- data.tar.gz: 1886d078184cca281cf0cbaaed59b3fb0e5b54ec
3
+ metadata.gz: 1452edab3f1662c37331457ca4fcce1e4ffd401d
4
+ data.tar.gz: 3a422895f5c092e81501e20447782038157e6cba
5
5
  SHA512:
6
- metadata.gz: 7c4258afca739fd317c388dbae614368ed6ca1c31b37a6eeccffb05de13a07082251fc6322ff5c60cdbe27f856c49342b5213d835c3469fb50b8af7666052c0b
7
- data.tar.gz: 98e93d68cf0f1c145836dc83ca8a47048ea23250b2778fc94f5a785e015172720e875c691d62a3a85c5b526e37a39ce16c45cf747d4d3c5b46182433fb18075e
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 = File.read(File.dirname(__FILE__) + '/view.erb')
21
- @erb_code = File.read(File.dirname(__FILE__) + '/view.erb')
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).result(context_binding) }
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) }
@@ -3,7 +3,7 @@ html
3
3
  head
4
4
  title Simple Benchmark
5
5
  body
6
- h1 == header
6
+ h1 =~ header
7
7
  unless item.empty?
8
8
  ul
9
9
  - for i in item
@@ -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
 
@@ -1,4 +1,4 @@
1
1
  # @Opulent
2
2
  module Opulent
3
- VERSION = '1.7.1'
3
+ VERSION = '1.7.2'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opulent
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.1
4
+ version: 1.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Grozav