wunderbar 0.16.7 → 0.16.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -194,15 +194,15 @@ module Wunderbar
194
194
  # if available, use escape as it does prettier quoting
195
195
  require 'escape'
196
196
  echo = Escape.shell_command(command.compact - secret)
197
- command = Escape.shell_command(flat.compact).untaint
198
197
  rescue LoadError
199
198
  # std-lib function that gets the job done
200
199
  require 'shellwords'
201
200
  echo = Shellwords.join(command.compact - secret)
202
- command = Shellwords.join(flat.compact).untaint
203
201
  end
202
+ command = flat.compact.map(&:untaint)
204
203
  else
205
204
  echo = command
205
+ command = [command]
206
206
  end
207
207
 
208
208
  patterns = opts[:hilite] || []
@@ -223,7 +223,7 @@ module Wunderbar
223
223
 
224
224
  require 'thread'
225
225
  semaphore = Mutex.new
226
- Open3.popen3(command) do |pin, pout, perr|
226
+ Open3.popen3(*command) do |pin, pout, perr, wait|
227
227
  [
228
228
  Thread.new do
229
229
  until pout.eof?
@@ -257,6 +257,7 @@ module Wunderbar
257
257
  pin.close
258
258
  end
259
259
  ].each {|thread| thread.join}
260
+ wait and wait.value.exitstatus
260
261
  end
261
262
  end
262
263
 
@@ -46,6 +46,10 @@ module Wunderbar
46
46
  args.push(@attrs)
47
47
  args = @args + args unless block or String === args.first
48
48
 
49
+ if @sym == :pre
50
+ args.first.chomp! if String === args.first and args.first.end_with? "\n"
51
+ end
52
+
49
53
  while @stream.length > @original_stream_length
50
54
  @stream.pop
51
55
  end
@@ -198,6 +198,7 @@ module Wunderbar
198
198
  end
199
199
 
200
200
  def _pre(*args, &block)
201
+ args.first.chomp! if String === args.first and args.first.end_with? "\n"
201
202
  @x.disable_indentation! { @x.tag! :pre, *args, &block }
202
203
  end
203
204
 
@@ -2,7 +2,7 @@ module Wunderbar
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 16
5
- TINY = 7
5
+ TINY = 8
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
data/wunderbar.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "wunderbar"
5
- s.version = "0.16.7"
5
+ s.version = "0.16.8"
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-06-06"
9
+ s.date = "2012-06-11"
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"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wunderbar
3
3
  version: !ruby/object:Gem::Version
4
- hash: 81
4
+ hash: 79
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 16
9
- - 7
10
- version: 0.16.7
9
+ - 8
10
+ version: 0.16.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sam Ruby
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-06-06 00:00:00 Z
18
+ date: 2012-06-11 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: builder