sprockets 3.7.3 → 3.7.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/sprockets/legacy.rb +4 -12
- data/lib/sprockets/uri_utils.rb +6 -4
- data/lib/sprockets/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1247cdff923f74bc8e25b4941797f3137e9d1765306bb79543543e17e4f1bc50
|
4
|
+
data.tar.gz: 4e05e0a201f4cb7713392c5ba7187d43663c1c23d0e44d1b0b2343ba7138f378
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fae3ef101561cdcde39a89c15d9953d9492317d1072bbf339dd94f4bc9fa4fbffd81c258d302dde38fef3e3225b4029fa63328312a19cd808ea05fb6c2b6cd81
|
7
|
+
data.tar.gz: be67fc1164cf0a748c9c437d29f70502f6df06a09a3ab2a4b306eecdf1d7fcdee8492479a6290601dac261e285def2dce56dc3e2f44b71b56820bb843bfac4e6
|
data/CHANGELOG.md
CHANGED
data/lib/sprockets/legacy.rb
CHANGED
@@ -154,18 +154,10 @@ module Sprockets
|
|
154
154
|
end
|
155
155
|
end
|
156
156
|
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
str = URI::DEFAULT_PARSER.unescape(str)
|
162
|
-
str.force_encoding(Encoding.default_internal) if Encoding.default_internal
|
163
|
-
str
|
164
|
-
end
|
165
|
-
else
|
166
|
-
def unescape(str)
|
167
|
-
URI.unescape(str)
|
168
|
-
end
|
157
|
+
def unescape(str)
|
158
|
+
URIUtils::URI_PARSER.unescape(str)
|
159
|
+
str.force_encoding(Encoding.default_internal) if Encoding.default_internal
|
160
|
+
str
|
169
161
|
end
|
170
162
|
end
|
171
163
|
|
data/lib/sprockets/uri_utils.rb
CHANGED
@@ -20,6 +20,8 @@ module Sprockets
|
|
20
20
|
module URIUtils
|
21
21
|
extend self
|
22
22
|
|
23
|
+
URI_PARSER = defined?(URI::RFC2396_PARSER) ? URI::RFC2396_PARSER : URI::RFC2396_Parser.new
|
24
|
+
|
23
25
|
# Internal: Parse URI into component parts.
|
24
26
|
#
|
25
27
|
# uri - String uri
|
@@ -44,7 +46,7 @@ module Sprockets
|
|
44
46
|
def split_file_uri(uri)
|
45
47
|
scheme, _, host, _, _, path, _, query, _ = URI.split(uri)
|
46
48
|
|
47
|
-
path =
|
49
|
+
path = URI_PARSER.unescape(path)
|
48
50
|
path.force_encoding(Encoding::UTF_8)
|
49
51
|
|
50
52
|
# Hack for parsing Windows "file:///C:/Users/IEUser" paths
|
@@ -63,7 +65,7 @@ module Sprockets
|
|
63
65
|
str = "#{scheme}://"
|
64
66
|
str << host if host
|
65
67
|
path = "/#{path}" unless path.start_with?("/")
|
66
|
-
str <<
|
68
|
+
str << URI_PARSER.escape(path)
|
67
69
|
str << "?#{query}" if query
|
68
70
|
str
|
69
71
|
end
|
@@ -162,7 +164,7 @@ module Sprockets
|
|
162
164
|
when Integer
|
163
165
|
query << "#{key}=#{value}"
|
164
166
|
when String, Symbol
|
165
|
-
query << "#{key}=#{
|
167
|
+
query << "#{key}=#{URI_PARSER.escape(value.to_s)}"
|
166
168
|
when TrueClass
|
167
169
|
query << "#{key}"
|
168
170
|
when FalseClass, NilClass
|
@@ -182,7 +184,7 @@ module Sprockets
|
|
182
184
|
def parse_uri_query_params(query)
|
183
185
|
query.to_s.split('&').reduce({}) do |h, p|
|
184
186
|
k, v = p.split('=', 2)
|
185
|
-
v =
|
187
|
+
v = URI_PARSER.unescape(v) if v
|
186
188
|
h[k.to_sym] = v || true
|
187
189
|
h
|
188
190
|
end
|
data/lib/sprockets/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sprockets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.7.
|
4
|
+
version: 3.7.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Stephenson
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-
|
12
|
+
date: 2024-09-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: base64
|
@@ -346,7 +346,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
346
346
|
- !ruby/object:Gem::Version
|
347
347
|
version: '0'
|
348
348
|
requirements: []
|
349
|
-
rubygems_version: 3.5.
|
349
|
+
rubygems_version: 3.5.11
|
350
350
|
signing_key:
|
351
351
|
specification_version: 4
|
352
352
|
summary: Rack-based asset packaging system
|