sprockets-rails 2.2.1 → 2.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5e8641433529ea9c3a05db1bd1635595db184555
4
- data.tar.gz: 7fd8a28dfaccaccf519440771c924ea983278a5d
3
+ metadata.gz: 9a75853b5fbad2a42e689b06bee90dfec2129025
4
+ data.tar.gz: a9379c6d10f63b7954fab1d85e364f7910a19bee
5
5
  SHA512:
6
- metadata.gz: ba62fc90fda447f600f94bb5f3afbeb1f12aae866a8bb87e01f0490494bc3ed7c21aded8cff80117c71b5858a7532e234d169caf9f0dda16fbcc937c373e6fe4
7
- data.tar.gz: d9aed15bab1ca56c9da0d94400f8ab556bbbcc0d91eb633f239f74542286886db99b6bc83ba8aac2576c3c63962a7812a31ec6901e7bbf3c4e5d05206ca73133
6
+ metadata.gz: bcc74b8d72f69d98593ab0219d29e97728c01067cda40afb01633bd17c8260d15f79c98bba5101938a0de16919902e378acd071ba9075ff243b44c35ac031523
7
+ data.tar.gz: e442680379fedba3bfde97e44675643c0663aab959a0303b2f7409ac3c25320b2d83672859de7f47306bc8a92deee6dcb3242a274d59f0706ff3b80726410d03
@@ -1,5 +1,5 @@
1
1
  module Sprockets
2
2
  module Rails
3
- VERSION = "2.2.1"
3
+ VERSION = "2.2.2"
4
4
  end
5
5
  end
@@ -32,6 +32,9 @@ module Rails
32
32
  end
33
33
  end
34
34
  attr_writer :assets
35
+
36
+ # Returns Sprockets::Manifest for app config.
37
+ attr_accessor :assets_manifest
35
38
  end
36
39
  end
37
40
 
@@ -66,8 +69,6 @@ module Sprockets
66
69
  config.after_initialize do |app|
67
70
  config = app.config
68
71
 
69
- manifest_assets_path = File.join(config.paths['public'].first, config.assets.prefix)
70
-
71
72
  # Configuration options that should invalidate
72
73
  # the Sprockets cache when changed.
73
74
  app.assets.version = [
@@ -83,28 +84,6 @@ module Sprockets
83
84
  app.assets.append_path path
84
85
  end
85
86
 
86
- ActiveSupport.on_load(:action_view) do
87
- include Sprockets::Rails::Helper
88
-
89
- # Copy relevant config to AV context
90
- self.debug_assets = config.assets.debug
91
- self.digest_assets = config.assets.digest
92
- self.assets_prefix = config.assets.prefix
93
-
94
- # Copy over to Sprockets as well
95
- context = app.assets.context_class
96
- context.assets_prefix = config.assets.prefix
97
- context.digest_assets = config.assets.digest
98
- context.config = config.action_controller
99
-
100
- if config.assets.compile
101
- self.assets_environment = app.assets
102
- self.assets_manifest = Sprockets::Manifest.new(app.assets, manifest_assets_path, config.assets.manifest)
103
- else
104
- self.assets_manifest = Sprockets::Manifest.new(manifest_assets_path, config.assets.manifest)
105
- end
106
- end
107
-
108
87
  app.assets.js_compressor = config.assets.js_compressor
109
88
  app.assets.css_compressor = config.assets.css_compressor
110
89
 
@@ -121,6 +100,30 @@ module Sprockets
121
100
  app.assets = app.assets.index
122
101
  end
123
102
 
103
+ manifest_assets_path = File.join(config.paths['public'].first, config.assets.prefix)
104
+ if config.assets.compile
105
+ app.assets_manifest = Sprockets::Manifest.new(app.assets, manifest_assets_path, config.assets.manifest)
106
+ else
107
+ app.assets_manifest = Sprockets::Manifest.new(manifest_assets_path, config.assets.manifest)
108
+ end
109
+
110
+ ActiveSupport.on_load(:action_view) do
111
+ include Sprockets::Rails::Helper
112
+
113
+ # Copy relevant config to AV context
114
+ self.debug_assets = config.assets.debug
115
+ self.digest_assets = config.assets.digest
116
+ self.assets_prefix = config.assets.prefix
117
+
118
+ # Copy over to Sprockets as well
119
+ context = app.assets.context_class
120
+ context.assets_prefix = config.assets.prefix
121
+ context.digest_assets = config.assets.digest
122
+ context.config = config.action_controller
123
+
124
+ self.assets_environment = app.assets if config.assets.compile
125
+ self.assets_manifest = app.assets_manifest
126
+ end
124
127
 
125
128
  Sprockets::Rails::Helper.precompile ||= app.config.assets.precompile
126
129
  Sprockets::Rails::Helper.assets ||= app.assets
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.1
4
+ version: 2.2.2
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-24 00:00:00.000000000 Z
11
+ date: 2014-11-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sprockets