opulent 1.7.4 → 1.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +13 -2
- data/benchmarks/run-benchmarks.rb +15 -13
- data/lib/opulent/compiler/doctype.rb +2 -0
- data/lib/opulent/exec.rb +6 -3
- data/lib/opulent/logger.rb +1 -1
- data/lib/opulent/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 649d50c129f267ce100a631b1b11b6d36594e77c
|
4
|
+
data.tar.gz: cdb46f5248ab2559adb826d865537a789cb78e7f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6af493f6245ab7c7978c6b069aee3cbcf05310cca64f1369decf27a649d60596f7886c236c7f02c899ac5210d20d5b5c05c8ea549694961222b636eacb983f82
|
7
|
+
data.tar.gz: cb49b39f19db597c5e4ed84dd765ab7fdbc230be033c208117d01d72eb314ec765673168ed5d92ccae2bf9622fe5fbef13ad35e1af690397cd41df90600dce1c
|
data/.travis.yml
CHANGED
@@ -98,21 +98,23 @@ class Benchmarks
|
|
98
98
|
@benches.each do |group_name, group_benches|
|
99
99
|
puts "\nRunning #{group_name} benchmarks\n\n"
|
100
100
|
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
101
|
+
unless group_name == :parsing
|
102
|
+
puts "Warming up -------------------------------------"
|
103
|
+
Benchmark.bm do |x|
|
104
|
+
group_benches.each do |name, block|
|
105
|
+
x.report("#{group_name} #{name}") {
|
106
|
+
W.times do block.call end
|
107
|
+
}
|
108
|
+
end
|
107
109
|
end
|
108
|
-
end
|
109
110
|
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
111
|
+
puts "Measuring -------------------------------------"
|
112
|
+
Benchmark.bm do |x|
|
113
|
+
group_benches.each do |name, block|
|
114
|
+
x.report("#{group_name} #{name}") {
|
115
|
+
N.times do block.call end
|
116
|
+
}
|
117
|
+
end
|
116
118
|
end
|
117
119
|
end
|
118
120
|
|
data/lib/opulent/exec.rb
CHANGED
@@ -17,7 +17,7 @@ module Opulent
|
|
17
17
|
while arguments[i]
|
18
18
|
case arguments[i]
|
19
19
|
|
20
|
-
# opulent input.op output.
|
20
|
+
# opulent input.op output.html
|
21
21
|
when EXTENSION
|
22
22
|
@input = arguments[i]
|
23
23
|
is_keyword = KEYWORDS.include? arguments[i + 1]
|
@@ -69,11 +69,14 @@ module Opulent
|
|
69
69
|
|
70
70
|
Logger.error :exec, @input, :input unless File.file? @input
|
71
71
|
|
72
|
-
|
73
|
-
opulent_page = Opulent.new
|
72
|
+
input_file = File.read @input
|
73
|
+
opulent_page = Opulent.new input_file
|
74
|
+
|
74
75
|
scope = Object.new
|
75
76
|
|
76
77
|
if @layout
|
78
|
+
layout_file = File.read @layout
|
79
|
+
opulent_layout = Opulent.new layout_file
|
77
80
|
output = proc do
|
78
81
|
opulent_layout.render scope, @locals do
|
79
82
|
opulent_page.render scope, @locals do
|
data/lib/opulent/logger.rb
CHANGED
@@ -98,7 +98,7 @@ No output file specified. Writing result to terminal.
|
|
98
98
|
message = <<-LOG
|
99
99
|
You can use the following commands with the Opulent Command Line Interface:
|
100
100
|
|
101
|
-
opulent input.op output.
|
101
|
+
opulent input.op output.html Render an input file and write the result to
|
102
102
|
the output file.
|
103
103
|
opulent layout [-l] layout.op Render an input file using given input
|
104
104
|
layout file.
|
data/lib/opulent/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opulent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Grozav
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-04-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|