opulent 1.7.4 → 1.7.5

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: cfd7c4bb2a3d68371199e60dbde0142284838c33
4
- data.tar.gz: 439afecffbd0e1365d8776a2fea806fdac0b0abc
3
+ metadata.gz: 649d50c129f267ce100a631b1b11b6d36594e77c
4
+ data.tar.gz: cdb46f5248ab2559adb826d865537a789cb78e7f
5
5
  SHA512:
6
- metadata.gz: 2cb8538328cd64913156f39e660fb2be5d020ddc13cf8548d11c72d26867c2dece4c665075c274176e6cbb29aea33dca79eaadd92d5784c223c3dc8c1ac5f6ab
7
- data.tar.gz: 4f9d9ff6ac176401c74296ed8d9ce46728644c6b2b85ced95f96f0c709db9df5f1b418920c0cf9b8f494eaac4670a410d9eae1caf2d1b35b9720cba1d6eeee5a
6
+ metadata.gz: 6af493f6245ab7c7978c6b069aee3cbcf05310cca64f1369decf27a649d60596f7886c236c7f02c899ac5210d20d5b5c05c8ea549694961222b636eacb983f82
7
+ data.tar.gz: cb49b39f19db597c5e4ed84dd765ab7fdbc230be033c208117d01d72eb314ec765673168ed5d92ccae2bf9622fe5fbef13ad35e1af690397cd41df90600dce1c
@@ -1,5 +1,16 @@
1
1
  language: ruby
2
+
2
3
  rvm:
3
- - "2.1.0"
4
- - rbx
4
+ - ruby-head
5
+ - 2.2.2
6
+ - 2.1.6
7
+ - 2.0.0
8
+ - rbx-2
9
+ - rbx
10
+ - 1.9.3
11
+ - jruby-head
12
+ - jruby-19mode
13
+
5
14
  script: bundle exec rspec spec
15
+
16
+ sudo: false
@@ -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
- puts "Warming up -------------------------------------"
102
- Benchmark.bm do |x|
103
- group_benches.each do |name, block|
104
- x.report("#{group_name} #{name}") {
105
- W.times do block.call end
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
- puts "Measuring -------------------------------------"
111
- Benchmark.bm do |x|
112
- group_benches.each do |name, block|
113
- x.report("#{group_name} #{name}") {
114
- N.times do block.call end
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
 
@@ -27,6 +27,8 @@ module Opulent
27
27
  '?xml version="1.0" encoding="utf-8" ?'
28
28
  when :'xml ISO-8859-1'
29
29
  '?xml version="1.0" encoding="iso-8859-1" ?'
30
+ else
31
+ "!DOCTYPE #{node[@value]}"
30
32
  end
31
33
 
32
34
  @node_stack << :doctype
@@ -17,7 +17,7 @@ module Opulent
17
17
  while arguments[i]
18
18
  case arguments[i]
19
19
 
20
- # opulent input.op output.op
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
- opulent_layout = Opulent.new @layout
73
- opulent_page = Opulent.new @input
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
@@ -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.op Render an input file and write the result to
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.
@@ -1,4 +1,4 @@
1
1
  # @Opulent
2
2
  module Opulent
3
- VERSION = '1.7.4'
3
+ VERSION = '1.7.5'
4
4
  end
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
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-03-26 00:00:00.000000000 Z
11
+ date: 2016-04-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler