sprockets-rails 2.2.2 → 2.2.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: 9a75853b5fbad2a42e689b06bee90dfec2129025
4
- data.tar.gz: a9379c6d10f63b7954fab1d85e364f7910a19bee
3
+ metadata.gz: cb84bc7bd36b7ffd20672c1efcbda643081f920e
4
+ data.tar.gz: 8537e4e2c75db0113dc7bd6d5dffea203c61abb2
5
5
  SHA512:
6
- metadata.gz: bcc74b8d72f69d98593ab0219d29e97728c01067cda40afb01633bd17c8260d15f79c98bba5101938a0de16919902e378acd071ba9075ff243b44c35ac031523
7
- data.tar.gz: e442680379fedba3bfde97e44675643c0663aab959a0303b2f7409ac3c25320b2d83672859de7f47306bc8a92deee6dcb3242a274d59f0706ff3b80726410d03
6
+ metadata.gz: b7a77641c6db3f4d153ea10ae620e079fe722d2c77195b2c2d1834fed324c295942f0ab6c7568c9d7d9ac9344dd02d80a6cb78d389a40da09b95d5696b32b23b
7
+ data.tar.gz: d28e2d7b5f4560762d320325b58c82c71fb5a6f2c1f84a7c706fcb67ef2a05e19bd25e6b7a0d0db0c86d3caf49c5908e82d126d7503a2d93b378196a5294487c
@@ -1,5 +1,5 @@
1
1
  module Sprockets
2
2
  module Rails
3
- VERSION = "2.2.2"
3
+ VERSION = "2.2.3"
4
4
  end
5
5
  end
@@ -36,12 +36,30 @@ module Rails
36
36
  # Returns Sprockets::Manifest for app config.
37
37
  attr_accessor :assets_manifest
38
38
  end
39
+
40
+ class Engine < Railtie
41
+ # Skip defining append_assets_path on Rails <= 4.2
42
+ unless initializers.find { |init| init.name == :append_assets_path }
43
+ initializer :append_assets_path, :group => :all do |app|
44
+ if paths["app/assets"].respond_to?(:existent_directories)
45
+ app.config.assets.paths.unshift(*paths["vendor/assets"].existent_directories)
46
+ app.config.assets.paths.unshift(*paths["lib/assets"].existent_directories)
47
+ app.config.assets.paths.unshift(*paths["app/assets"].existent_directories)
48
+ else
49
+ app.config.assets.paths.unshift(*paths["vendor/assets"].paths.select { |d| File.directory?(d) })
50
+ app.config.assets.paths.unshift(*paths["lib/assets"].paths.select { |d| File.directory?(d) })
51
+ app.config.assets.paths.unshift(*paths["app/assets"].paths.select { |d| File.directory?(d) })
52
+ end
53
+ end
54
+ end
55
+ end
39
56
  end
40
57
 
41
58
  module Sprockets
42
59
  class Railtie < ::Rails::Railtie
43
- LOOSE_APP_ASSETS = lambda do |filename, path|
44
- path =~ /app\/assets/ && !%w(.js .css).include?(File.extname(filename))
60
+ LOOSE_APP_ASSETS = lambda do |logical_path, filename|
61
+ filename.start_with?(::Rails.root.join("app/assets").to_s) &&
62
+ !%w(.js .css).include?(File.extname(logical_path))
45
63
  end
46
64
 
47
65
  class OrderedOptions < ActiveSupport::OrderedOptions
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: 2.2.2
4
+ version: 2.2.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: 2014-11-29 00:00:00.000000000 Z
11
+ date: 2015-01-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sprockets