assets_precompile_enforcer 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -30,10 +30,17 @@ module Sprockets
30
30
  Rails.application.config.assets.enforce_precompile
31
31
  end
32
32
 
33
+ def asset_list
34
+ ignored = Rails.application.config.assets.ignore_for_precompile || []
35
+ precompile = Rails.application.config.assets.precompile || []
36
+ precompile + ignored
37
+ end
38
+
33
39
  def ensure_asset_will_be_precompiled!(source, ext)
40
+ source = source.to_s
34
41
  return if asset_paths.is_uri?(source)
35
42
  asset_file = asset_environment.resolve(asset_paths.rewrite_extension(source, nil, ext))
36
- unless asset_environment.send(:logical_path_for_filename, asset_file, Rails.application.config.assets.precompile)
43
+ unless asset_environment.send(:logical_path_for_filename, asset_file, asset_list)
37
44
  raise AssetPaths::AssetNotPrecompiledError.new("#{asset_file} must be added to config.assets.precompile, " <<
38
45
  "otherwise it won't be precompiled for production!")
39
46
  end
@@ -1,3 +1,3 @@
1
1
  module AssetsPrecompileEnforcer
2
- VERSION = "1.0.4"
2
+ VERSION = "1.0.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: assets_precompile_enforcer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-22 00:00:00.000000000 Z
12
+ date: 2013-07-03 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Raises an exception if assets are missing from config.assets.precompile
15
15
  during development
@@ -43,7 +43,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
43
43
  version: '0'
44
44
  segments:
45
45
  - 0
46
- hash: -3341127486628414213
46
+ hash: -2970029651410170092
47
47
  required_rubygems_version: !ruby/object:Gem::Requirement
48
48
  none: false
49
49
  requirements:
@@ -52,7 +52,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
52
52
  version: '0'
53
53
  segments:
54
54
  - 0
55
- hash: -3341127486628414213
55
+ hash: -2970029651410170092
56
56
  requirements: []
57
57
  rubyforge_project:
58
58
  rubygems_version: 1.8.24