wunderbar 1.5.1 → 1.6.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2633787e3fe5370fb9c661d09f7774f01e0bd8343d6f67e03ff0798827c7b19f
4
- data.tar.gz: 39ca7d33dae070f59192b525c318c485f2e931a21c0b375be21ae350be65169a
3
+ metadata.gz: 5b41fc0cdf18f4493457caaf8ea0be99429a7ef2b93f3725dc255c0be969c49c
4
+ data.tar.gz: 6f3c9aba7491dcf8c7a2a3e6f344b063b5a0901b54f17e736c6e96f1f410d83d
5
5
  SHA512:
6
- metadata.gz: b44d6101629179c0ec3048b118a2bd2246bc3faf439452202b44dfa22ec09be3457db421b98a8713be47c4c0c68a5b21dfed86d092b0f90a50476172c267f542
7
- data.tar.gz: cad6637488679332c98a498f6ef60a0fb288faa735bd3b0851c495b386534b2add7dd9eb38dab1457c4174c6e7576e5a3538261c7cedcddcfe812c28bdf71721
6
+ metadata.gz: ab2ffb039d0bbf017f27b280724ac84b13f3887c7e1eb9c903bb9870cd598da31b9df369a20bc6fb7881177ecc75e29fb5c93a4433e2ccfdcd5fea2fdd3bd728
7
+ data.tar.gz: 4035385caae931b83278a621855d98ceb60be387ecff963fb621712daeec443313f4a6671642388ed72f261b5be8ec420194a57bddb10253154c2a03bb43a3fd
@@ -30,7 +30,7 @@ class Wunderbar::ClientScriptNode < Wunderbar::ScriptNode
30
30
  end
31
31
 
32
32
  class Wunderbar::XmlMarkup
33
- def render(container, &block)
33
+ def render(container, timeout: nil, &block)
34
34
  csspath = Wunderbar::Node.parse_css_selector(container)
35
35
  root = @node.root
36
36
 
@@ -124,6 +124,15 @@ class Wunderbar::XmlMarkup
124
124
  end
125
125
  end
126
126
 
127
+ # add timeout, if requested
128
+ #
129
+ # useful if the rendering itself is inherently synchronous, but may make
130
+ # use of a library routines that set up event handlers that will never fire.
131
+ #
132
+ if timeout
133
+ server += ";\nsetTimeout(() => {process.exit()}, #{timeout})"
134
+ end
135
+
127
136
  # concatenate and execute scripts on server
128
137
  if browserify
129
138
  setup += requires.map {|key, value|
@@ -1,8 +1,8 @@
1
1
  module Wunderbar
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 1
4
- MINOR = 5
5
- TINY = 1
4
+ MINOR = 6
5
+ TINY = 0
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
metadata CHANGED
@@ -1,11 +1,11 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wunderbar
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Ruby
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
  date: 2019-06-07 00:00:00.000000000 Z
@@ -89,7 +89,7 @@ homepage: http://github.com/rubys/wunderbar
89
89
  licenses:
90
90
  - MIT
91
91
  metadata: {}
92
- post_install_message:
92
+ post_install_message:
93
93
  rdoc_options: []
94
94
  require_paths:
95
95
  - lib
@@ -104,8 +104,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
104
104
  - !ruby/object:Gem::Version
105
105
  version: '0'
106
106
  requirements: []
107
- rubygems_version: 3.1.2
108
- signing_key:
107
+ rubygems_version: 3.3.7
108
+ signing_key:
109
109
  specification_version: 4
110
110
  summary: HTML Generator and CGI application support
111
111
  test_files: []