non-stupid-digest-assets 1.0.8 → 1.0.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +5 -5
  2. data/lib/non-stupid-digest-assets.rb +10 -10
  3. metadata +6 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: c76ce3cbe17858fab06b6a3ad76a9aa2f5d55f41
4
- data.tar.gz: 5c7b45845b14cc71d6908c740ca7611cf552d8cc
2
+ SHA256:
3
+ metadata.gz: d683f1ca707827700f5c7ca9486673df486fe0c5c88e9cf8aede6299d9839a7e
4
+ data.tar.gz: 2aad3fb858aad7079b4c6144340ebb347891454799af09c0dc5a07a2e8967bc6
5
5
  SHA512:
6
- metadata.gz: d50f498764c58e63b5dd9d4815c89a2bce43c6bcf3bc88d6438b243acb686db6d81bcf8c1f6a21d3493e55f93375e2b7b8e2c54816706c81a8c0ead7f6ade7ef
7
- data.tar.gz: f709b4b400404a81cfa8b9d5039c0181d68b4214d964fa5fb673da12742f2fbbe8ad75356eaf9152f49871cf64e8cb2dc4ffda6388361db0e99041e720a34a3a
6
+ metadata.gz: '069efc5e6dd9cfa43430b1859d7dd576c0b7be3e9c45a748277d56a5627f943a972b1f08a59d9ba183a2f940c2fedb4a896fd6cc95ee21b19e33e6c639648774'
7
+ data.tar.gz: 5229fe18388d2d76b927113e7468f38a38da5fd0ac575a334c7c9699d36e907a9fdafffc5c70c83847992f81a34c15542e65b4d5960ab297300202aabd67f447
@@ -5,17 +5,17 @@ module NonStupidDigestAssets
5
5
  @@whitelist = []
6
6
 
7
7
  class << self
8
- def files(files)
9
- return files if whitelist.empty?
10
- whitelisted_files(files)
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 whitelisted_files(files)
16
- files.select do |file, info|
15
+ def whitelisted_assets(assets)
16
+ assets.select do |logical_path, digest_path|
17
17
  whitelist.any? do |item|
18
- item === info['logical_path']
18
+ item === logical_path
19
19
  end
20
20
  end
21
21
  end
@@ -24,19 +24,19 @@ module NonStupidDigestAssets
24
24
  module CompileWithNonDigest
25
25
  def compile *args
26
26
  paths = super
27
- NonStupidDigestAssets.files(files).each do |(digest_path, info)|
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, info['logical_path']
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
- if File.exists? full_digest_path
33
+ if File.exist? full_digest_path
34
34
  logger.debug "Writing #{full_non_digest_path}"
35
35
  FileUtils.copy_file full_digest_path, full_non_digest_path, :preserve_attributes
36
36
  else
37
37
  logger.debug "Could not find: #{full_digest_path}"
38
38
  end
39
- if File.exists? full_digest_gz_path
39
+ if File.exist? full_digest_gz_path
40
40
  logger.debug "Writing #{full_non_digest_gz_path}"
41
41
  FileUtils.copy_file full_digest_gz_path, full_non_digest_gz_path, :preserve_attributes
42
42
  else
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.8
4
+ version: 1.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Speller
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-28 00:00:00.000000000 Z
11
+ date: 2023-11-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sprockets
@@ -42,7 +42,7 @@ homepage: http://github.com/alexspeller/non-stupid-digest-assets
42
42
  licenses:
43
43
  - MIT
44
44
  metadata: {}
45
- post_install_message:
45
+ post_install_message:
46
46
  rdoc_options: []
47
47
  require_paths:
48
48
  - lib
@@ -57,10 +57,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
57
57
  - !ruby/object:Gem::Version
58
58
  version: '0'
59
59
  requirements: []
60
- rubyforge_project:
61
- rubygems_version: 2.2.2
62
- signing_key:
60
+ rubygems_version: 3.3.26
61
+ signing_key:
63
62
  specification_version: 4
64
63
  summary: Fix the Rails 4 asset pipeline to generate non-digest along with digest assets
65
64
  test_files: []
66
- has_rdoc: