wunderbar 0.16.4 → 0.16.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -204,6 +204,12 @@ module Wunderbar
204
204
  else
205
205
  echo = command
206
206
  end
207
+
208
+ patterns = opts[:hilite] || []
209
+ patterns=[patterns] if String === patterns or Regexp === patterns
210
+ patterns.map! do |pattern|
211
+ String === pattern ? Regexp.new(Regexp.escape(pattern)) : pattern
212
+ end
207
213
 
208
214
  require 'open3'
209
215
  tag = opts[:tag] || 'pre'
@@ -211,6 +217,7 @@ module Wunderbar
211
217
  stdin = output_class[:stdin] || '_stdin'
212
218
  stdout = output_class[:stdout] || '_stdout'
213
219
  stderr = output_class[:stderr] || '_stderr'
220
+ hilite = output_class[:hilite] || '_stdout _hilite'
214
221
 
215
222
  @_builder.tag! tag, echo, :class=>stdin unless opts[:echo] == false
216
223
 
@@ -222,7 +229,11 @@ module Wunderbar
222
229
  until pout.eof?
223
230
  out_line = pout.readline.chomp
224
231
  semaphore.synchronize do
225
- @_builder.tag! tag, out_line, :class=>stdout
232
+ if patterns.any? {|pattern| out_line =~ pattern}
233
+ @_builder.tag! tag, out_line, :class=>hilite
234
+ else
235
+ @_builder.tag! tag, out_line, :class=>stdout
236
+ end
226
237
  end
227
238
  end
228
239
  end,
@@ -2,7 +2,7 @@ module Wunderbar
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 16
5
- TINY = 4
5
+ TINY = 5
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
data/wunderbar.gemspec CHANGED
@@ -2,17 +2,17 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "wunderbar"
5
- s.version = "0.16.4"
5
+ s.version = "0.16.5"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Sam Ruby"]
9
- s.date = "2012-05-24"
9
+ s.date = "2012-05-27"
10
10
  s.description = " Wunderbar makes it easy to produce valid HTML5, wellformed XHTML, Unicode\n (utf-8), consistently indented, readable applications. This includes\n output that conforms to the Polyglot specification and the emerging\n results from the XML Error Recovery Community Group.\n"
11
11
  s.email = "rubys@intertwingly.net"
12
12
  s.files = ["wunderbar.gemspec", "README.md", "COPYING", "lib/wunderbar.rb", "lib/wunderbar", "lib/wunderbar/installation.rb", "lib/wunderbar/html-methods.rb", "lib/wunderbar/job-control.rb", "lib/wunderbar/server.rb", "lib/wunderbar/logger.rb", "lib/wunderbar/rack.rb", "lib/wunderbar/builder.rb", "lib/wunderbar/websocket.rb", "lib/wunderbar/sinatra.rb", "lib/wunderbar/environment.rb", "lib/wunderbar/rails.rb", "lib/wunderbar/cgi-methods.rb", "lib/wunderbar/cssproxy.rb", "lib/wunderbar/version.rb"]
13
13
  s.homepage = "http://github.com/rubys/wunderbar"
14
14
  s.require_paths = ["lib"]
15
- s.rubygems_version = "1.8.15"
15
+ s.rubygems_version = "1.8.21"
16
16
  s.summary = "HTML Generator and CGI application support"
17
17
 
18
18
  if s.respond_to? :specification_version then
metadata CHANGED
@@ -1,47 +1,60 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: wunderbar
3
- version: !ruby/object:Gem::Version
4
- version: 0.16.4
3
+ version: !ruby/object:Gem::Version
4
+ hash: 85
5
5
  prerelease:
6
+ segments:
7
+ - 0
8
+ - 16
9
+ - 5
10
+ version: 0.16.5
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - Sam Ruby
9
14
  autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
- date: 2012-05-24 00:00:00.000000000Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
17
+
18
+ date: 2012-05-27 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
15
21
  name: builder
16
- requirement: &19386820 !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
17
24
  none: false
18
- requirements:
19
- - - ! '>='
20
- - !ruby/object:Gem::Version
21
- version: '3.0'
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ hash: 7
29
+ segments:
30
+ - 3
31
+ - 0
32
+ version: "3.0"
22
33
  type: :runtime
23
- prerelease: false
24
- version_requirements: *19386820
25
- - !ruby/object:Gem::Dependency
34
+ version_requirements: *id001
35
+ - !ruby/object:Gem::Dependency
26
36
  name: json
27
- requirement: &19386280 !ruby/object:Gem::Requirement
37
+ prerelease: false
38
+ requirement: &id002 !ruby/object:Gem::Requirement
28
39
  none: false
29
- requirements:
30
- - - ! '>='
31
- - !ruby/object:Gem::Version
32
- version: '0'
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ hash: 3
44
+ segments:
45
+ - 0
46
+ version: "0"
33
47
  type: :runtime
34
- prerelease: false
35
- version_requirements: *19386280
36
- description: ! " Wunderbar makes it easy to produce valid HTML5, wellformed XHTML,
37
- Unicode\n (utf-8), consistently indented, readable applications. This includes\n
38
- \ output that conforms to the Polyglot specification and the emerging\n results
39
- from the XML Error Recovery Community Group.\n"
48
+ version_requirements: *id002
49
+ description: " Wunderbar makes it easy to produce valid HTML5, wellformed XHTML, Unicode\n (utf-8), consistently indented, readable applications. This includes\n output that conforms to the Polyglot specification and the emerging\n results from the XML Error Recovery Community Group.\n"
40
50
  email: rubys@intertwingly.net
41
51
  executables: []
52
+
42
53
  extensions: []
54
+
43
55
  extra_rdoc_files: []
44
- files:
56
+
57
+ files:
45
58
  - wunderbar.gemspec
46
59
  - README.md
47
60
  - COPYING
@@ -62,26 +75,36 @@ files:
62
75
  - lib/wunderbar/version.rb
63
76
  homepage: http://github.com/rubys/wunderbar
64
77
  licenses: []
78
+
65
79
  post_install_message:
66
80
  rdoc_options: []
67
- require_paths:
81
+
82
+ require_paths:
68
83
  - lib
69
- required_ruby_version: !ruby/object:Gem::Requirement
84
+ required_ruby_version: !ruby/object:Gem::Requirement
70
85
  none: false
71
- requirements:
72
- - - ! '>='
73
- - !ruby/object:Gem::Version
74
- version: '0'
75
- required_rubygems_version: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ hash: 3
90
+ segments:
91
+ - 0
92
+ version: "0"
93
+ required_rubygems_version: !ruby/object:Gem::Requirement
76
94
  none: false
77
- requirements:
78
- - - ! '>='
79
- - !ruby/object:Gem::Version
80
- version: '0'
95
+ requirements:
96
+ - - ">="
97
+ - !ruby/object:Gem::Version
98
+ hash: 3
99
+ segments:
100
+ - 0
101
+ version: "0"
81
102
  requirements: []
103
+
82
104
  rubyforge_project:
83
- rubygems_version: 1.8.15
105
+ rubygems_version: 1.8.21
84
106
  signing_key:
85
107
  specification_version: 3
86
108
  summary: HTML Generator and CGI application support
87
109
  test_files: []
110
+