middleman-core 4.3.10 → 4.3.11

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: b6517438bf88fc9e92b57472e4ef3e6d059cd8a44268bb6ac0d19a0e6340a748
4
- data.tar.gz: f736d871dd103415828e314fb032936d26eae9b329503b50a38d9b68156df871
3
+ metadata.gz: 9a6c24e6aadd1825d0b97243b66abcfc1e1e55bd2614d2bb38d16e090eacf93d
4
+ data.tar.gz: 508ed84f8d68b46a4a8216d5faec3ca534e9c2e26afb8ce5bc0e7caa99bb21d1
5
5
  SHA512:
6
- metadata.gz: 63ffd61ee8b9d8b79793e651ec98f3561d8ce2aa083022504aad6ce17ca457584e5e4c750d4e4d19cfca9ad6daed1063765028bf53cb3d76540271d1b3f58816
7
- data.tar.gz: 1a98606f12923af0a6f1cb9f47792f6ca3ef702839b8c81c72764a05181273723f29650698f71f5282685131898753115f19b1013456e583f4a8bceb63053d1e
6
+ metadata.gz: 5ee86cb278396a0db2d9d7355cfcc4b48407499f3f24a41c0ab71d8776a89118311a5014ca194ea45dd4bdc0374e67341ac1e25aa8075758fc13d4776a56027f
7
+ data.tar.gz: 7cc9c4fbc9e0489aab97a206d9687bd5edca75f3e199b9e1d08e547d532e0d8c3abf1983b6abeaa52bb82826a28d632ebfe318571c73c6a52db602c1d0704f93
@@ -3,6 +3,7 @@ require 'rack/file'
3
3
  require 'rack/lint'
4
4
  require 'rack/head'
5
5
  require 'rack/utils'
6
+ require 'webrick'
6
7
 
7
8
  require 'middleman-core/util'
8
9
  require 'middleman-core/logger'
@@ -86,7 +87,7 @@ module Middleman
86
87
  def process_request(env, req, res)
87
88
  start_time = Time.now
88
89
 
89
- request_path = URI.decode(env['PATH_INFO'].dup)
90
+ request_path = WEBrick::HTTPUtils.unescape(env['PATH_INFO'].dup)
90
91
  if request_path.respond_to? :force_encoding
91
92
  request_path.force_encoding('UTF-8')
92
93
  end
@@ -1,6 +1,7 @@
1
1
  require 'middleman-core/rack'
2
2
  require 'rspec/expectations'
3
3
  require 'capybara/cucumber'
4
+ require 'webrick'
4
5
 
5
6
  Given /^a clean server$/ do
6
7
  @initialize_commands = []
@@ -72,11 +73,11 @@ Given /^a template named "([^\"]*)" with:$/ do |name, string|
72
73
  end
73
74
 
74
75
  When /^I go to "([^\"]*)"$/ do |url|
75
- visit(URI.encode(url).to_s)
76
+ visit(WEBrick::HTTPUtils.escape(url))
76
77
  end
77
78
 
78
79
  Then /^going to "([^\"]*)" should not raise an exception$/ do |url|
79
- expect{ visit(URI.encode(url).to_s) }.to_not raise_exception
80
+ expect{ visit(WEBrick::HTTPUtils.escape(url)) }.to_not raise_exception
80
81
  end
81
82
 
82
83
  Then /^the content type should be "([^\"]*)"$/ do |expected|
@@ -4,6 +4,7 @@ require 'uri'
4
4
  require 'addressable/uri'
5
5
  require 'memoist'
6
6
  require 'tilt'
7
+ require 'webrick'
7
8
 
8
9
  require 'middleman-core/contracts'
9
10
 
@@ -33,7 +34,7 @@ module Middleman
33
34
  Contract String => String
34
35
  def normalize_path(path)
35
36
  # The tr call works around a bug in Ruby's Unicode handling
36
- ::URI.decode(path).sub(%r{^/}, '').tr('', '')
37
+ WEBrick::HTTPUtils.unescape(path).sub(%r{^/}, '').tr('', '')
37
38
  end
38
39
  memoize :normalize_path
39
40
 
@@ -1,5 +1,5 @@
1
1
  module Middleman
2
2
  # Current Version
3
3
  # @return [String]
4
- VERSION = '4.3.10'.freeze unless const_defined?(:VERSION)
4
+ VERSION = '4.3.11'.freeze unless const_defined?(:VERSION)
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.3.10
4
+ version: 4.3.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Reynolds
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2020-09-10 00:00:00.000000000 Z
13
+ date: 2020-09-15 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler