wunderbar 1.4.5 → 1.5.0

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
  SHA256:
3
- metadata.gz: 1753c6f65653020143af9ed4f73f15e11c7443e8fec1d26a3ae645be0f785191
4
- data.tar.gz: 3257c0840a2d8d9aaf5f7368623dc8f487e449d6e8d8046632c1a264bb373e18
3
+ metadata.gz: be770934a7f9d0f34e1d506ae7d27f35c5e2ab1a3e5720f56e85fbebf1a02a71
4
+ data.tar.gz: 63546e1889f0aabaf22cf605d0f415c294368732c018279281be18cb79209500
5
5
  SHA512:
6
- metadata.gz: 364ab25aeab2b20e7b98d98ac0dbf537b68fb11c82046b6206039661b2d0694521d09229cc4c5832aff48eab5fbb8b4fad34cabe65d9c534921b6f015b2c6fab
7
- data.tar.gz: '0885f9681bd7955e81de1a2920a77c736b1283c152eab4f20425ec7cebbd75c956da6efd348c388541229822c65644ad20f78f8a6911066fdfcf59616e133840'
6
+ metadata.gz: d23d1a99ad26576668e673da84c73d7cb1eaf376cb9e407084bbcb2d038efba67d01eda47307b82a6c4f50d77539e6378659d2320b0c0efa140644c04f18e712
7
+ data.tar.gz: 2fca8fbf9bbfd2b765db8d9af73ae6ab16fa99654990bab026c2ca2802aba72fa8a1d63bb679fed65dfd1fbf9da0fa91ad6a2cbed423504343606817eca15363
@@ -6,7 +6,12 @@ end
6
6
 
7
7
  require 'wunderbar/sinatra'
8
8
  require 'wunderbar/script'
9
- require 'nokogumbo'
9
+
10
+ if RUBY_VERSION =~ /^1|^2\.0/
11
+ require 'nokogumbo'
12
+ else
13
+ require 'nokogiri'
14
+ end
10
15
 
11
16
  class Wunderbar::Asset
12
17
  @@cached_scripts = {}
@@ -13,7 +13,9 @@ module Wunderbar
13
13
  if @block and @children.empty? and not @text
14
14
  width = options[:width]
15
15
  width -= indent.to_s.length if width
16
- @text = Ruby2JS.convert(@block, binding: @binding, width: width).to_s
16
+ opts = {binding: @binding, width: width}
17
+ opts = {**@attrs.delete(:options), **opts} if @attrs[:options]
18
+ @text = Ruby2JS.convert(@block, opts).to_s
17
19
  end
18
20
  super
19
21
  end
@@ -1,8 +1,8 @@
1
1
  module Wunderbar
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 1
4
- MINOR = 4
5
- TINY = 5
4
+ MINOR = 5
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.4.5
4
+ version: 1.5.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
@@ -105,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
105
105
  version: '0'
106
106
  requirements: []
107
107
  rubygems_version: 3.1.2
108
- signing_key:
108
+ signing_key:
109
109
  specification_version: 4
110
110
  summary: HTML Generator and CGI application support
111
111
  test_files: []