wunderbar 1.0.15 → 1.0.16

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: f16c327ed4da4e317601758ab9df7bd58f7a2795
4
- data.tar.gz: 5a9d3685491ef6d5c5262d02b0b35f36f7f635bb
3
+ metadata.gz: ea64892ba5117879969e9e060d74a3dc627a26bf
4
+ data.tar.gz: a4811ebeebb86646e94d25c4d4a17b8c2f59d05f
5
5
  SHA512:
6
- metadata.gz: 33911408b08b8e78334e410d86eafd384d9cf29f0ebbd7e745e3d851465fec801ba77a58cf62d5d421754ffc94dbc2faa9485e9c48f066f34dbd3cb05d96be37
7
- data.tar.gz: d5d88a4a33e81020027403cdd7c4cb9949d156a2f055f6dce0e2fcd67f54325149b63c4112ec16e381f13dd5b2aaa7fa22604b5510edbac586e4714b2a64fc82
6
+ metadata.gz: ebdb54ad7f8bcc232518f8c8a1c3f064b5b68fc85bee7f0418fbbd6cb4291e799c936285629c0df7588bffde3bdbc15ce6059d07d8d89fd6c8ec1263cffb10df
7
+ data.tar.gz: 29c28b4811be4c1d7b82f73a049bdbdcd655005b8e4b3483e0432b5ab62473fe6d3514bbc3ccc626ae92e749126119df1f7301ff56de24180025708b63631121
@@ -133,15 +133,19 @@ module Wunderbar
133
133
  # * Proxied Rack server. Document base may be relate to the
134
134
  # HTTP_X_WUNDERBAR_BASE
135
135
  #
136
+ cwd = File.realpath(Dir.pwd.untaint)
136
137
  base = @_scope.env['DOCUMENT_ROOT'] if @_scope.env.respond_to? :[]
137
- base ||= Dir.pwd
138
+ base ||= cwd
138
139
  href = (head.children[1].attrs[:href] || '')
139
- _base = @_scope.env['HTTP_X_WUNDERBAR_BASE']
140
- href = href[_base.length-1..-1] if _base and href.start_with? _base
140
+ _base = @_scope.env['HTTP_X_WUNDERBAR_BASE'] ||
141
+ @_scope.env['SCRIPT_NAME']
142
+ if _base and not _base.empty? and href.start_with? _base
143
+ href = href[_base.length-1..-1]
144
+ end
141
145
  base += href
142
146
  base += 'index.html' if base.end_with? '/'
143
147
  base = Pathname.new(base).parent
144
- prefix = Pathname.new(Dir.pwd).relative_path_from(base).to_s + '/'
148
+ prefix = Pathname.new(cwd).relative_path_from(base).to_s + '/'
145
149
  prefix = nil unless prefix.start_with? '..'
146
150
  elsif @_scope.respond_to? :env and @_scope.env['PATH_INFO'].to_s.length>1
147
151
  prefix = '../' * (@_scope.env['PATH_INFO'].count('/') - 1)
@@ -93,6 +93,7 @@ class Wunderbar::XmlMarkup
93
93
  end
94
94
  src = File.join(path.join('/'), src) unless path.empty?
95
95
  end
96
+ src.untaint
96
97
 
97
98
  name = File.expand_path(src, @_scope.settings.public_folder.untaint)
98
99
  name.untaint unless src.tainted?
@@ -2,7 +2,7 @@ module Wunderbar
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 1
4
4
  MINOR = 0
5
- TINY = 15
5
+ TINY = 16
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.15 ruby lib
2
+ # stub: wunderbar 1.0.16 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "wunderbar"
6
- s.version = "1.0.15"
6
+ s.version = "1.0.16"
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-01-23"
11
+ s.date = "2016-01-24"
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.15
4
+ version: 1.0.16
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-01-23 00:00:00.000000000 Z
11
+ date: 2016-01-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json