wunderbar 1.0.20 → 1.0.21

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: 0c48157c1e93214be94d033ad1b7668a91e981f5
4
- data.tar.gz: 16e734685f29e9176d0a0e588ed7b050a2a598dd
3
+ metadata.gz: f2e1e449f96b62b3cc9251367f7d25efcb45e1c7
4
+ data.tar.gz: 5f01bf5862c3956c07ca5a7247596a1495a70ef7
5
5
  SHA512:
6
- metadata.gz: e16fe8f5501798486d3c29243fbb14ab02074d1892ad219eb6a61400a04fb2877a446d4da9b4157f70aeef86b615531cdbdf26d3b45af859340cc56f41518605
7
- data.tar.gz: 60298f2b5f2aeb86c40b7896c4c826dd9a2ae8060525d2f91bc5e6659005831968fb3270a93d6272c6d2049be9cbd4deb6a35e69303e097dcbe7d05325a2e871
6
+ metadata.gz: 32e20118eeaa68e3e374812d8b75fdab54b05f3bdcceeffbe67accc0dd035d0408737682abb786dbc2468f3d942771f5d4319b2a1f038c76b5de8b4409d884eb
7
+ data.tar.gz: caac555ac66f5c5d688e10c7cc34d062babbd3cbc286183533fc9ad070b9e975f08c0c6313b6c48b9d7ac1592c8ce47d1abbce0458ce0a2dd7ef6d95114f30e0
@@ -74,7 +74,7 @@ module Wunderbar
74
74
  out_line = pout.readline.chomp
75
75
  semaphore.synchronize do
76
76
  if patterns.any? {|pattern| out_line =~ pattern}
77
- yield :hilight, out_line
77
+ yield :hilite, out_line
78
78
  else
79
79
  yield :stdout, out_line
80
80
  end
@@ -266,6 +266,26 @@ get "/#{Wunderbar::Asset.path}/:name" do |name|
266
266
  end
267
267
  end
268
268
 
269
+ unless Wunderbar.queue.empty?
270
+ queue = Wunderbar.queue.dup
271
+
272
+ get '/' do
273
+ xhr_json = (env['HTTP_ACCEPT'].to_s =~ /json/)
274
+ xhr_json ||= (env['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest')
275
+
276
+ task = queue.find {|type, args, block| (type!=:json) ^ xhr_json}
277
+ pass unless task
278
+
279
+ if xhr_json
280
+ _json *task[1], &task[2]
281
+ else
282
+ _html *task[1], &task[2]
283
+ end
284
+ end
285
+
286
+ Wunderbar.queue.clear
287
+ end
288
+
269
289
  # Monkeypatch to address https://github.com/sinatra/sinatra/pull/907
270
290
  module Rack
271
291
  class ShowExceptions
@@ -2,7 +2,7 @@ module Wunderbar
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 1
4
4
  MINOR = 0
5
- TINY = 20
5
+ TINY = 21
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
data/wunderbar.gemspec CHANGED
@@ -1,14 +1,14 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: wunderbar 1.0.20 ruby lib
2
+ # stub: wunderbar 1.0.21 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "wunderbar"
6
- s.version = "1.0.20"
6
+ s.version = "1.0.21"
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
9
9
  s.require_paths = ["lib"]
10
10
  s.authors = ["Sam Ruby"]
11
- s.date = "2016-02-14"
11
+ s.date = "2016-03-03"
12
12
  s.description = " Wunderbar makes it easy to produce valid HTML5, wellformed XHTML, Unicode\n (utf-8), consistently indented, readable applications.'\n"
13
13
  s.email = "rubys@intertwingly.net"
14
14
  s.files = ["COPYING", "README.md", "lib/wunderbar", "lib/wunderbar.rb", "lib/wunderbar/angularjs", "lib/wunderbar/angularjs.rb", "lib/wunderbar/angularjs/resource.rb", "lib/wunderbar/angularjs/route.rb", "lib/wunderbar/asset.rb", "lib/wunderbar/backtick.rb", "lib/wunderbar/bootstrap", "lib/wunderbar/bootstrap.rb", "lib/wunderbar/bootstrap/theme.rb", "lib/wunderbar/builder.rb", "lib/wunderbar/cgi-methods.rb", "lib/wunderbar/coderay.rb", "lib/wunderbar/coffeescript.rb", "lib/wunderbar/cssproxy.rb", "lib/wunderbar/environment.rb", "lib/wunderbar/eventsource.rb", "lib/wunderbar/html-methods.rb", "lib/wunderbar/installation.rb", "lib/wunderbar/job-control.rb", "lib/wunderbar/jquery", "lib/wunderbar/jquery.rb", "lib/wunderbar/jquery/filter.rb", "lib/wunderbar/jquery/stupidtable.rb", "lib/wunderbar/listen.rb", "lib/wunderbar/logger.rb", "lib/wunderbar/markdown.rb", "lib/wunderbar/marked.rb", "lib/wunderbar/node.rb", "lib/wunderbar/pagedown.rb", "lib/wunderbar/polymer.rb", "lib/wunderbar/rack.rb", "lib/wunderbar/rails.rb", "lib/wunderbar/react.rb", "lib/wunderbar/script.rb", "lib/wunderbar/server.rb", "lib/wunderbar/sinatra.rb", "lib/wunderbar/underscore.rb", "lib/wunderbar/vendor", "lib/wunderbar/vendor/Markdown.Converter.js", "lib/wunderbar/vendor/angular-resource.min.js", "lib/wunderbar/vendor/angular-route.min.js", "lib/wunderbar/vendor/angular.min.js", "lib/wunderbar/vendor/bootstrap-theme.min.css", "lib/wunderbar/vendor/bootstrap.min.css", "lib/wunderbar/vendor/bootstrap.min.js", "lib/wunderbar/vendor/eventsource.min.js", "lib/wunderbar/vendor/jquery-1.11.2.min.js", "lib/wunderbar/vendor/marked.min.js", "lib/wunderbar/vendor/polymer-v0.0.20131003.min.js", "lib/wunderbar/vendor/react-dom.min.js", "lib/wunderbar/vendor/react-with-addons.min.js", "lib/wunderbar/vendor/stupidtable.min.js", "lib/wunderbar/vendor/underscore-min.js", "lib/wunderbar/version.rb", "lib/wunderbar/websocket.rb", "wunderbar.gemspec"]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wunderbar
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.20
4
+ version: 1.0.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Ruby
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-14 00:00:00.000000000 Z
11
+ date: 2016-03-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json