wunderbar 1.2.3 → 1.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/wunderbar/render.rb +16 -9
- data/lib/wunderbar/version.rb +1 -1
- data/lib/wunderbar/vue.rb +1 -1
- data/wunderbar.gemspec +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eabde70a11ed4620143385f3ae2b5a3e63d50431
|
4
|
+
data.tar.gz: 117628a1e82d8d9fb9066fcc71353c71b0fe9155
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 14f36dd535e4b2a256c2031e0193cda524d17292e1db236ddcf8e88b62d55a9c0229775952660bdcdfd4f68936fdadbdaa9746debb70e617e0dc89f1a788ca3f
|
7
|
+
data.tar.gz: 41fb15d4cec8c2e0a89da200d2df79389a5e0538cd6708e12f47c3382756d737f5704973c2b4f185c53898723dd1e68336870c939533f70b62ff018c4b78e123
|
data/lib/wunderbar/render.rb
CHANGED
@@ -130,18 +130,25 @@ class Wunderbar::XmlMarkup
|
|
130
130
|
nodes = builder._ { html }
|
131
131
|
|
132
132
|
begin
|
133
|
-
nodes.
|
134
|
-
|
133
|
+
if nodes.length == 1
|
134
|
+
nodes.each {|node| node.parent = target}
|
135
|
+
target.children += nodes
|
136
|
+
else
|
137
|
+
span = Wunderbar::Node.new('span')
|
138
|
+
nodes.each {|node| node.parent = span}
|
139
|
+
span.children += nodes
|
140
|
+
target.children << span
|
141
|
+
end
|
135
142
|
rescue => e
|
136
|
-
|
143
|
+
span = Wunderbar::Node.new('span',
|
137
144
|
style: 'background-color:#ff0; margin: 1em 0; padding: 1em; ' +
|
138
145
|
'border: 4px solid red; border-radius: 1em')
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
target.children <<
|
146
|
+
span.children << Wunderbar::Node.new('pre', e.to_s)
|
147
|
+
span.children << Wunderbar::Node.new('pre', e.backtrace.join("\n"))
|
148
|
+
span.children << Wunderbar::Node.new('pre', html)
|
149
|
+
span.children << Wunderbar::Node.new('pre', nodes.inspect)
|
150
|
+
span.children.each {|node| node.parent = span}
|
151
|
+
target.children << span
|
145
152
|
end
|
146
153
|
|
147
154
|
# add client side script
|
data/lib/wunderbar/version.rb
CHANGED
data/lib/wunderbar/vue.rb
CHANGED
@@ -24,7 +24,7 @@ class Wunderbar::Render
|
|
24
24
|
def self.client(common, element, target)
|
25
25
|
wrap = "$h(#{target.name.inspect}, " +
|
26
26
|
"{attrs: {#{target.attrs.map {|name, value|
|
27
|
-
"#{name}: #{value.inspect}"}.join(' ')}}}, [#{common}])"
|
27
|
+
"#{name}: #{value.inspect}"}.join(', ')}}}, [#{common}])"
|
28
28
|
"new Vue({el: #{element}, render: function($h) {return #{wrap}}})"
|
29
29
|
end
|
30
30
|
|
data/wunderbar.gemspec
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
# stub: wunderbar 1.2.
|
2
|
+
# stub: wunderbar 1.2.4 ruby lib
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "wunderbar".freeze
|
6
|
-
s.version = "1.2.
|
6
|
+
s.version = "1.2.4"
|
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-
|
11
|
+
s.date = "2017-09-13"
|
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.
|
4
|
+
version: 1.2.4
|
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-
|
11
|
+
date: 2017-09-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|