sprockets 3.5.0 → 3.5.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of sprockets might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/sprockets/manifest.rb +7 -4
- data/lib/sprockets/utils/gzip.rb +4 -2
- data/lib/sprockets/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7dd0209b90a101e98586e5dbc8c1828fb54552e0
|
4
|
+
data.tar.gz: 4c5a23c98fba032b63f914e27eca0cafc139602f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25ac8156e0bf67173e12ff95c683fe5ad7805946b8baf503e6821db164e19c7477af4fbc4384f620ff5f9cd917439a89d3ffeb2ae326f6cd582897e0162b38b2
|
7
|
+
data.tar.gz: 8d437551f99263d8b4bc636e4a3de57adff4816505d271d60e096661c06e74f0d812d67e95fb6e32f2598d5a28aa6148cc1cc8912a4799a630f288fd1623b169
|
data/CHANGELOG.md
CHANGED
data/lib/sprockets/manifest.rb
CHANGED
@@ -202,13 +202,16 @@ module Sprockets
|
|
202
202
|
logger.debug "Skipping #{target}.gz, already exists"
|
203
203
|
else
|
204
204
|
logger.info "Writing #{target}.gz"
|
205
|
-
concurrent_compressors << Concurrent::Future.execute
|
205
|
+
concurrent_compressors << Concurrent::Future.execute do
|
206
|
+
write_file.wait! if write_file
|
207
|
+
gzip.compress(target)
|
208
|
+
end
|
206
209
|
end
|
207
210
|
|
208
211
|
end
|
209
|
-
concurrent_writers.each(&:wait)
|
210
|
-
concurrent_compressors.each(&:wait)
|
211
|
-
|
212
|
+
concurrent_writers.each(&:wait!)
|
213
|
+
concurrent_compressors.each(&:wait!)
|
214
|
+
save
|
212
215
|
|
213
216
|
filenames
|
214
217
|
end
|
data/lib/sprockets/utils/gzip.rb
CHANGED
@@ -4,7 +4,6 @@ module Sprockets
|
|
4
4
|
# Private: Generates a gzipped file based off of reference file.
|
5
5
|
def initialize(asset)
|
6
6
|
@content_type = asset.content_type
|
7
|
-
@mtime = asset.mtime
|
8
7
|
@source = asset.source
|
9
8
|
@charset = asset.charset
|
10
9
|
end
|
@@ -42,11 +41,14 @@ module Sprockets
|
|
42
41
|
#
|
43
42
|
# Returns nothing.
|
44
43
|
def compress(target)
|
44
|
+
mtime = PathUtils.stat(target).mtime
|
45
45
|
PathUtils.atomic_write("#{target}.gz") do |f|
|
46
46
|
gz = Zlib::GzipWriter.new(f, Zlib::BEST_COMPRESSION)
|
47
|
-
gz.mtime =
|
47
|
+
gz.mtime = mtime
|
48
48
|
gz.write(@source)
|
49
49
|
gz.close
|
50
|
+
|
51
|
+
File.utime(mtime, mtime, f.path)
|
50
52
|
end
|
51
53
|
|
52
54
|
nil
|
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.5.
|
4
|
+
version: 3.5.1
|
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: 2015-12-
|
12
|
+
date: 2015-12-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rack
|