sprockets 2.12.3 → 2.12.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/sprockets/asset.rb +3 -1
- data/lib/sprockets/base.rb +1 -1
- data/lib/sprockets/server.rb +1 -1
- data/lib/sprockets/static_asset.rb +3 -1
- data/lib/sprockets/version.rb +1 -1
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 80bdc30a8aea68bb04398d467eea5a5e4cfe9b7dcef6ee41e2902debcec63342
|
4
|
+
data.tar.gz: 55a0f0b58e3e55c08ccfb30476017b814894b7ec98cf3bd22eecbc8bdcbe5c39
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3ee63f44b0391509f3e80b1c6b403abf52168a66910da726221b7b45c6c51187f86a7896df45e8b6c7bed68d5218ad7915fa79602e3cf7a23c32622d23ab8a5
|
7
|
+
data.tar.gz: da30a4f95ef0691cec504b73b1d832cec2577aa0b2905050e74ad9a89322c6568e3ec250a760ac3a6f2080f738e8ed1580e3ae7ff2a53e8623820d98fea00b2d
|
data/lib/sprockets/asset.rb
CHANGED
@@ -139,7 +139,9 @@ module Sprockets
|
|
139
139
|
# Save asset to disk.
|
140
140
|
def write_to(filename, options = {})
|
141
141
|
# Gzip contents if filename has '.gz'
|
142
|
-
options
|
142
|
+
unless options.key?(:compress)
|
143
|
+
options[:compress] = File.extname(filename) == '.gz' && File.extname(logical_path) != '.gz'
|
144
|
+
end
|
143
145
|
|
144
146
|
FileUtils.mkdir_p File.dirname(filename)
|
145
147
|
|
data/lib/sprockets/base.rb
CHANGED
@@ -18,7 +18,7 @@ module Sprockets
|
|
18
18
|
# Defaults to `Digest::MD5`.
|
19
19
|
attr_reader :digest_class
|
20
20
|
|
21
|
-
# Assign a `Digest` implementation class. This
|
21
|
+
# Assign a `Digest` implementation class. This may be any Ruby
|
22
22
|
# `Digest::` implementation such as `Digest::MD5` or
|
23
23
|
# `Digest::SHA1`.
|
24
24
|
#
|
data/lib/sprockets/server.rb
CHANGED
@@ -90,7 +90,7 @@ module Sprockets
|
|
90
90
|
#
|
91
91
|
# http://example.org/assets/../../../etc/passwd
|
92
92
|
#
|
93
|
-
path.include?("..") || Pathname.new(path).absolute?
|
93
|
+
path.include?("..") || Pathname.new(path).absolute? || path.include?("://")
|
94
94
|
end
|
95
95
|
|
96
96
|
# Returns a 403 Forbidden response tuple
|
@@ -21,7 +21,9 @@ module Sprockets
|
|
21
21
|
# Save asset to disk.
|
22
22
|
def write_to(filename, options = {})
|
23
23
|
# Gzip contents if filename has '.gz'
|
24
|
-
options
|
24
|
+
unless options.key?(:compress)
|
25
|
+
options[:compress] = File.extname(filename) == '.gz' && File.extname(logical_path) != '.gz'
|
26
|
+
end
|
25
27
|
|
26
28
|
FileUtils.mkdir_p File.dirname(filename)
|
27
29
|
|
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: 2.12.
|
4
|
+
version: 2.12.5
|
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:
|
12
|
+
date: 2018-06-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: hike
|
@@ -241,6 +241,20 @@ dependencies:
|
|
241
241
|
- - ">="
|
242
242
|
- !ruby/object:Gem::Version
|
243
243
|
version: '0'
|
244
|
+
- !ruby/object:Gem::Dependency
|
245
|
+
name: test-unit
|
246
|
+
requirement: !ruby/object:Gem::Requirement
|
247
|
+
requirements:
|
248
|
+
- - "~>"
|
249
|
+
- !ruby/object:Gem::Version
|
250
|
+
version: '3.1'
|
251
|
+
type: :development
|
252
|
+
prerelease: false
|
253
|
+
version_requirements: !ruby/object:Gem::Requirement
|
254
|
+
requirements:
|
255
|
+
- - "~>"
|
256
|
+
- !ruby/object:Gem::Version
|
257
|
+
version: '3.1'
|
244
258
|
description: Sprockets is a Rack-based asset packaging system that concatenates and
|
245
259
|
serves JavaScript, CoffeeScript, CSS, LESS, Sass, and SCSS.
|
246
260
|
email:
|
@@ -313,7 +327,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
313
327
|
version: '0'
|
314
328
|
requirements: []
|
315
329
|
rubyforge_project: sprockets
|
316
|
-
rubygems_version: 2.
|
330
|
+
rubygems_version: 2.7.6
|
317
331
|
signing_key:
|
318
332
|
specification_version: 4
|
319
333
|
summary: Rack-based asset packaging system
|