non-stupid-digest-assets 1.0.8 → 1.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/non-stupid-digest-assets.rb +8 -8
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 04526cdac68b0586a4016a9cb5f95681130c40e5
|
4
|
+
data.tar.gz: ff1a70e1080cf17d44027adfd3d313b97c28d363
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 880378206c82fecd1bc4dca8658285daef4166e9bf9ddd01d05a0e4044673d953112f1432bfa6cd921619a789df2b518b8f7bd7a357014162e773d044b3405a0
|
7
|
+
data.tar.gz: 632813809c1449efe9b532f4b6477d1ed5b1ed6965ebdd52f36ff454b447ebab486dfb02f869cea055fe2c1a4a7b6126b66c9a5b95402e53cc0092100f099f7e
|
@@ -5,17 +5,17 @@ module NonStupidDigestAssets
|
|
5
5
|
@@whitelist = []
|
6
6
|
|
7
7
|
class << self
|
8
|
-
def
|
9
|
-
return
|
10
|
-
|
8
|
+
def assets(assets)
|
9
|
+
return assets if whitelist.empty?
|
10
|
+
whitelisted_assets(assets)
|
11
11
|
end
|
12
12
|
|
13
13
|
private
|
14
14
|
|
15
|
-
def
|
16
|
-
|
15
|
+
def whitelisted_assets(assets)
|
16
|
+
assets.select do |logical_path, digest_path|
|
17
17
|
whitelist.any? do |item|
|
18
|
-
item ===
|
18
|
+
item === logical_path
|
19
19
|
end
|
20
20
|
end
|
21
21
|
end
|
@@ -24,10 +24,10 @@ module NonStupidDigestAssets
|
|
24
24
|
module CompileWithNonDigest
|
25
25
|
def compile *args
|
26
26
|
paths = super
|
27
|
-
NonStupidDigestAssets.
|
27
|
+
NonStupidDigestAssets.assets(assets).each do |(logical_path, digest_path)|
|
28
28
|
full_digest_path = File.join dir, digest_path
|
29
29
|
full_digest_gz_path = "#{full_digest_path}.gz"
|
30
|
-
full_non_digest_path = File.join dir,
|
30
|
+
full_non_digest_path = File.join dir, logical_path
|
31
31
|
full_non_digest_gz_path = "#{full_non_digest_path}.gz"
|
32
32
|
|
33
33
|
if File.exists? full_digest_path
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: non-stupid-digest-assets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Speller
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sprockets
|
@@ -58,9 +58,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
58
58
|
version: '0'
|
59
59
|
requirements: []
|
60
60
|
rubyforge_project:
|
61
|
-
rubygems_version: 2.
|
61
|
+
rubygems_version: 2.5.1
|
62
62
|
signing_key:
|
63
63
|
specification_version: 4
|
64
64
|
summary: Fix the Rails 4 asset pipeline to generate non-digest along with digest assets
|
65
65
|
test_files: []
|
66
|
-
has_rdoc:
|