wunderbar 1.2.1 → 1.2.2

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: 1e0a24f478dfe451da0e17380445b31050ef2dad
4
- data.tar.gz: 29938d3706c0485fa2503d6e66a8683e541349a3
3
+ metadata.gz: 5302769e2b4cec4245c002657e30a67ab3e3bd58
4
+ data.tar.gz: 55cacd2f87846550186a39e5335b81ad9fa787ae
5
5
  SHA512:
6
- metadata.gz: 9f34f142c8fe501d276da28c6bb422f99a8fb13a964b52dece6a9254a916b9727a29058ac8a87b24f7b477ebc7284613d8c4600daf59efa1e1231a9dc2554db6
7
- data.tar.gz: 3f9ac9651b0ddf90b1e7fda0a8e0b3df33cd3010813e0d9ddc9f798ed1d1a453844274288c461f4385afee2f43f3a56f971229e29ccffc658f552efc9f1a4b59
6
+ metadata.gz: 1621333ee1eed24865a709f9c78c96df0cf2d7c259c32b77def3e58204e521304b3f07fba7dd781f21c083a00e4ac2749817a1a056ed3e147548fea3473ba4d6
7
+ data.tar.gz: 51d0b2b248508e0004924206a5b74a2b0a1eac3559f0e0e5f53eaffd4c13c4d12864aa15992c446ca47551c09294883335810f52a184275de14d868fedc1f101
@@ -119,14 +119,17 @@ class Wunderbar::XmlMarkup
119
119
 
120
120
  # concatenate and execute scripts on server
121
121
  if browserify
122
- setup << requires.map {|key, value| "#{key}=require(#{value.inspect})"}.
123
- join(';')
122
+ setup += requires.map {|key, value|
123
+ "const #{key}=module.exports.#{key} || require(#{value.inspect})"
124
+ "const #{key}=require(#{value.inspect})"
125
+ }
124
126
  end
125
127
  scripts.unshift *setup.uniq
126
128
  html = Wunderbar::Render.eval(scripts, server)
127
129
 
128
130
  # insert results into target
129
131
  nodes = builder._ { html }
132
+
130
133
  begin
131
134
  nodes.each {|node| node.parent = target}
132
135
  target.children += nodes
@@ -135,7 +138,7 @@ class Wunderbar::XmlMarkup
135
138
  style: 'background-color:#ff0; margin: 1em 0; padding: 1em; ' +
136
139
  'border: 4px solid red; border-radius: 1em')
137
140
  div.children << Wunderbar::Node.new('pre', e.to_s)
138
- div.children << Wunderbar::Node.new('pre', e.backtrace)
141
+ div.children << Wunderbar::Node.new('pre', e.backtrace.join("\n"))
139
142
  div.children << Wunderbar::Node.new('pre', html)
140
143
  div.children << Wunderbar::Node.new('pre', nodes.inspect)
141
144
  div.children.each {|node| node.parent = div}
@@ -2,7 +2,7 @@ module Wunderbar
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 1
4
4
  MINOR = 2
5
- TINY = 1
5
+ TINY = 2
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
data/lib/wunderbar/vue.rb CHANGED
@@ -29,12 +29,17 @@ class Wunderbar::Render
29
29
  end
30
30
 
31
31
  def self.eval(scripts, server)
32
- output, status = Open3.capture3 self.nodejs,
32
+ stdout, stderr, status = Open3.capture3 self.nodejs,
33
33
  stdin_data: scripts.compact.join(";\n") + ";\n" + server
34
- output.untaint
34
+
35
+ unless stderr.empty?
36
+ Wunderbar.err stderr
37
+ stdout += "\n<pre>#{CGI.escapeHTML(stderr)}</pre>"
38
+ end
39
+
40
+ stdout.untaint
35
41
  rescue => e
36
42
  Wunderbar.error e
37
- "<pre>" + e.message.gsub('&', '&amp;').gsub('<', '&lt;').gsub('>', '&gt;') +
38
- "</pre>"
43
+ "<pre>#{CGI.escapeHTML(e.message)}</pre>"
39
44
  end
40
45
  end
data/wunderbar.gemspec CHANGED
@@ -1,14 +1,14 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: wunderbar 1.2.1 ruby lib
2
+ # stub: wunderbar 1.2.2 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "wunderbar".freeze
6
- s.version = "1.2.1"
6
+ s.version = "1.2.2"
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
9
9
  s.require_paths = ["lib".freeze]
10
10
  s.authors = ["Sam Ruby".freeze]
11
- s.date = "2017-09-04"
11
+ s.date = "2017-09-05"
12
12
  s.description = " Wunderbar makes it easy to produce valid HTML5, wellformed XHTML, Unicode\n (utf-8), consistently indented, readable applications.'\n".freeze
13
13
  s.email = "rubys@intertwingly.net".freeze
14
14
  s.files = ["COPYING".freeze, "README.md".freeze, "lib/wunderbar".freeze, "lib/wunderbar.rb".freeze, "lib/wunderbar/angularjs".freeze, "lib/wunderbar/angularjs.rb".freeze, "lib/wunderbar/angularjs/resource.rb".freeze, "lib/wunderbar/angularjs/route.rb".freeze, "lib/wunderbar/asset.rb".freeze, "lib/wunderbar/backtick.rb".freeze, "lib/wunderbar/bootstrap".freeze, "lib/wunderbar/bootstrap.rb".freeze, "lib/wunderbar/bootstrap/theme.rb".freeze, "lib/wunderbar/builder.rb".freeze, "lib/wunderbar/cgi-methods.rb".freeze, "lib/wunderbar/coderay.rb".freeze, "lib/wunderbar/coffeescript.rb".freeze, "lib/wunderbar/cssproxy.rb".freeze, "lib/wunderbar/environment.rb".freeze, "lib/wunderbar/eventsource.rb".freeze, "lib/wunderbar/html-methods.rb".freeze, "lib/wunderbar/installation.rb".freeze, "lib/wunderbar/job-control.rb".freeze, "lib/wunderbar/jquery".freeze, "lib/wunderbar/jquery.rb".freeze, "lib/wunderbar/jquery/filter.rb".freeze, "lib/wunderbar/jquery/stupidtable.rb".freeze, "lib/wunderbar/listen.rb".freeze, "lib/wunderbar/logger.rb".freeze, "lib/wunderbar/markdown.rb".freeze, "lib/wunderbar/marked.rb".freeze, "lib/wunderbar/node.rb".freeze, "lib/wunderbar/pagedown.rb".freeze, "lib/wunderbar/polymer.rb".freeze, "lib/wunderbar/rack.rb".freeze, "lib/wunderbar/rails.rb".freeze, "lib/wunderbar/react.rb".freeze, "lib/wunderbar/render.rb".freeze, "lib/wunderbar/script.rb".freeze, "lib/wunderbar/server.rb".freeze, "lib/wunderbar/sinatra.rb".freeze, "lib/wunderbar/underscore.rb".freeze, "lib/wunderbar/vendor".freeze, "lib/wunderbar/vendor/Markdown.Converter.js".freeze, "lib/wunderbar/vendor/angular-resource.min.js".freeze, "lib/wunderbar/vendor/angular-route.min.js".freeze, "lib/wunderbar/vendor/angular.min.js".freeze, "lib/wunderbar/vendor/bootstrap-theme.min.css".freeze, "lib/wunderbar/vendor/bootstrap.min.css".freeze, "lib/wunderbar/vendor/bootstrap.min.js".freeze, "lib/wunderbar/vendor/eventsource.min.js".freeze, "lib/wunderbar/vendor/jquery-3.2.1.min.js".freeze, "lib/wunderbar/vendor/marked.min.js".freeze, "lib/wunderbar/vendor/polymer-v0.0.20131003.min.js".freeze, "lib/wunderbar/vendor/react-dom-server.min.js".freeze, "lib/wunderbar/vendor/react-dom.min.js".freeze, "lib/wunderbar/vendor/react-with-addons.min.js".freeze, "lib/wunderbar/vendor/stupidtable.min.js".freeze, "lib/wunderbar/vendor/underscore-min.js".freeze, "lib/wunderbar/vendor/vue-server.min.js".freeze, "lib/wunderbar/vendor/vue.min.js".freeze, "lib/wunderbar/version.rb".freeze, "lib/wunderbar/vue.rb".freeze, "lib/wunderbar/websocket.rb".freeze, "wunderbar.gemspec".freeze]
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.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Ruby
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-04 00:00:00.000000000 Z
11
+ date: 2017-09-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json