sprockets-rails 2.2.2 → 2.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sprockets/rails/version.rb +1 -1
- data/lib/sprockets/railtie.rb +20 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb84bc7bd36b7ffd20672c1efcbda643081f920e
|
4
|
+
data.tar.gz: 8537e4e2c75db0113dc7bd6d5dffea203c61abb2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7a77641c6db3f4d153ea10ae620e079fe722d2c77195b2c2d1834fed324c295942f0ab6c7568c9d7d9ac9344dd02d80a6cb78d389a40da09b95d5696b32b23b
|
7
|
+
data.tar.gz: d28e2d7b5f4560762d320325b58c82c71fb5a6f2c1f84a7c706fcb67ef2a05e19bd25e6b7a0d0db0c86d3caf49c5908e82d126d7503a2d93b378196a5294487c
|
data/lib/sprockets/railtie.rb
CHANGED
@@ -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 |
|
44
|
-
|
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.
|
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:
|
11
|
+
date: 2015-01-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sprockets
|