sprockets-rails 3.0.2 → 3.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f8c96d4f4c8b770bf039af77568aab992f8a95fa
4
- data.tar.gz: 3591bb727f75ddd09a2a86e514f3d4c15a8274af
3
+ metadata.gz: 441aad85291e3c33ca4ccbf5cf9acb9fd7ebf43c
4
+ data.tar.gz: 234aac3001536c29088b8997c81ec3a935c4ddfe
5
5
  SHA512:
6
- metadata.gz: cee437715999af262b0693d2f91ecf2bf05ff3f7bcdccfb6ad8b473b8025c7744dc2d6c55f05460224b48ee476018e0ad030ad9d3563b5c987f31593ddc15d27
7
- data.tar.gz: b8f35da389be7e927f1fd5961435b6c74a184f1b8bb2c4e1420cd391708ca0a7dc067eeb0daac74855a3aaf0c81f939b92faccd5151ffdffe55879ad688aef15
6
+ metadata.gz: b7a3ab9d1423a2d2b96c2576e8e895a3db8a7b280a0d64df13d057daceb91040d5dd5a52f52b9e5e8349e91f0eeca468aada9810c3b0693e7ef8a26c82f26aec
7
+ data.tar.gz: 0bc29f5363d1eaea49eb19a285ec03329aaf751f8ac06a37773fda0f989a83172843cbdec0034dabe8744a29e28e7e5203ad2c5a0bfa81eea58f685f5db5705e
@@ -18,8 +18,7 @@ module Sprockets
18
18
  "`//= link_directory ../javascripts .js`\n" +
19
19
  "`//= link_directory ../stylesheets .css`\n" +
20
20
  "`//= link_tree ../javascripts .js`\n" +
21
- "`//= link_tree ../images`\n" +
22
- "and restart your server"
21
+ "`//= link_tree ../images`\n"
23
22
  else
24
23
  "Asset was not declared to be precompiled in production.\n" +
25
24
  "Add `Rails.application.config.assets.precompile += " +
@@ -1,5 +1,5 @@
1
1
  module Sprockets
2
2
  module Rails
3
- VERSION = "3.0.2"
3
+ VERSION = "3.0.3"
4
4
  end
5
5
  end
@@ -31,13 +31,21 @@ module Rails
31
31
  # Called from asset helpers to alert you if you reference an asset URL that
32
32
  # isn't precompiled and hence won't be available in production.
33
33
  def asset_precompiled?(logical_path)
34
- precompiled_assets.include? logical_path
34
+ if precompiled_assets.include?(logical_path)
35
+ true
36
+ elsif !config.cache_classes
37
+ # Check to see if precompile list has been updated
38
+ precompiled_assets(true).include?(logical_path)
39
+ else
40
+ false
41
+ end
35
42
  end
36
43
 
37
44
  # Lazy-load the precompile list so we don't cause asset compilation at app
38
45
  # boot time, but ensure we cache the list so we don't recompute it for each
39
46
  # request or test case.
40
- def precompiled_assets
47
+ def precompiled_assets(clear_cache = false)
48
+ @precompiled_assets = nil if clear_cache
41
49
  @precompiled_assets ||= assets_manifest.find(config.assets.precompile).map(&:logical_path).to_set
42
50
  end
43
51
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sprockets-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.2
4
+ version: 3.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Peek
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-23 00:00:00.000000000 Z
11
+ date: 2016-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sprockets