sprockets 3.0.0.beta.8 → 3.0.0.beta.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +7 -6
  3. data/lib/sprockets.rb +39 -15
  4. data/lib/sprockets/autoload.rb +11 -0
  5. data/lib/sprockets/autoload/closure.rb +7 -0
  6. data/lib/sprockets/autoload/coffee_script.rb +7 -0
  7. data/lib/sprockets/autoload/eco.rb +7 -0
  8. data/lib/sprockets/autoload/ejs.rb +7 -0
  9. data/lib/sprockets/autoload/sass.rb +7 -0
  10. data/lib/sprockets/autoload/uglifier.rb +7 -0
  11. data/lib/sprockets/autoload/yui.rb +7 -0
  12. data/lib/sprockets/bundle.rb +33 -3
  13. data/lib/sprockets/cache.rb +15 -6
  14. data/lib/sprockets/closure_compressor.rb +3 -5
  15. data/lib/sprockets/coffee_script_processor.rb +2 -5
  16. data/lib/sprockets/compressing.rb +2 -2
  17. data/lib/sprockets/context.rb +2 -2
  18. data/lib/sprockets/dependencies.rb +1 -1
  19. data/lib/sprockets/directive_processor.rb +3 -3
  20. data/lib/sprockets/eco_processor.rb +2 -4
  21. data/lib/sprockets/ejs_processor.rb +1 -3
  22. data/lib/sprockets/engines.rb +1 -1
  23. data/lib/sprockets/http_utils.rb +17 -1
  24. data/lib/sprockets/legacy.rb +3 -2
  25. data/lib/sprockets/loader.rb +11 -8
  26. data/lib/sprockets/manifest.rb +27 -17
  27. data/lib/sprockets/manifest_utils.rb +45 -0
  28. data/lib/sprockets/mime.rb +10 -7
  29. data/lib/sprockets/paths.rb +2 -2
  30. data/lib/sprockets/processing.rb +35 -52
  31. data/lib/sprockets/processor_utils.rb +34 -28
  32. data/lib/sprockets/resolve.rb +35 -25
  33. data/lib/sprockets/sass_cache_store.rb +29 -2
  34. data/lib/sprockets/sass_compressor.rb +3 -5
  35. data/lib/sprockets/sass_processor.rb +11 -32
  36. data/lib/sprockets/server.rb +4 -4
  37. data/lib/sprockets/transformers.rb +1 -1
  38. data/lib/sprockets/uglifier_compressor.rb +3 -5
  39. data/lib/sprockets/uri_utils.rb +3 -3
  40. data/lib/sprockets/version.rb +1 -1
  41. data/lib/sprockets/yui_compressor.rb +3 -5
  42. metadata +12 -4
  43. data/lib/sprockets/autoload_processor.rb +0 -48
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aa6fd6b6a93eb875e0c47c454bbeb7d473c92748
4
- data.tar.gz: 816d06f0078e7904cdec3955f99d6f8f9745264e
3
+ metadata.gz: da01c3bbf8752fe3705b073775d7067b1a984239
4
+ data.tar.gz: 934f3ea753eba823e957005907d594771d053ec2
5
5
  SHA512:
6
- metadata.gz: ddded5dadd8be6b580f069656908769f42a76a77ee6eeaad12e25dbb9467fb47ece8cb8901c182c8ccd5104d18abb2bbe7a90fb6a4acc98271974bb5e017a69b
7
- data.tar.gz: 3a4cd5ee63e6d1666a7c1de9bd019221903bd513decb7915ed8ffe419c518cb9dac7dfe72d32ef2a89a5741a9cd8ba109da98c145af2cf436243eda675b58388
6
+ metadata.gz: 86023eba8d65c22262182f2602b8c22a6347a634bf894cc969d4d5e7bf94a75198ea4034a3cad71f80c4bfb4ea46cf7bcdf2cad5f1dcdc1877589c9b1a967589
7
+ data.tar.gz: af13b0c540e0e78f0fa36a567aa2aa98f50680f20468c9d3d8433563f0d16c21d19279e3cac3b6369d532104cecb667a48cf9c6d150061cea41c86bfccb35465
data/README.md CHANGED
@@ -179,7 +179,7 @@ binding.
179
179
  If the `coffee-script` gem is available to your application, you can
180
180
  use CoffeeScript to write JavaScript assets in Sprockets. Note that
181
181
  the CoffeeScript compiler is written in JavaScript, and you will need
182
- an [ExecJS](https://github.com/sstephenson/execjs)-supported runtime
182
+ an [ExecJS](https://github.com/rails/execjs)-supported runtime
183
183
  on your system to invoke it.
184
184
 
185
185
  To write JavaScript assets with CoffeeScript, use the extension
@@ -378,7 +378,7 @@ Sprockets 2.x was originally design around [Tilt](https://github.com/rtomayko/ti
378
378
 
379
379
  Similar to Rack, a processor is a any "callable" (an object that responds to `call`). This maybe a simple Proc or a full class that defines a `def self.call(input)` method. The `call` method accepts an `input` Hash and returns a Hash of metadata.
380
380
 
381
- Also see [`Sprockets::ProcessorUtils`](https://github.com/sstephenson/sprockets/blob/master/lib/sprockets/processor_utils.rb) for public helper methods.
381
+ Also see [`Sprockets::ProcessorUtils`](https://github.com/rails/sprockets/blob/master/lib/sprockets/processor_utils.rb) for public helper methods.
382
382
 
383
383
  ### input Hash
384
384
 
@@ -386,7 +386,7 @@ The `input` Hash defines the following public fields.
386
386
 
387
387
  * `:data` - String asset contents
388
388
  * `:environment` - Current `Sprockets::Environment` instance.
389
- * `:cache` - A `Sprockets::Cache` instance. See [`Sprockets::Cache#fetch`](https://github.com/sstephenson/sprockets/blob/master/lib/sprockets/cache.rb).
389
+ * `:cache` - A `Sprockets::Cache` instance. See [`Sprockets::Cache#fetch`](https://github.com/rails/sprockets/blob/master/lib/sprockets/cache.rb).
390
390
  * `:uri` - String Asset URI.
391
391
  * `:filename` - String full path to original file.
392
392
  * `:load_path` - String current load path for filename.
@@ -436,14 +436,14 @@ end
436
436
  ### Contributing
437
437
 
438
438
  The Sprockets source code is [hosted on
439
- GitHub](https://github.com/sstephenson/sprockets). You can check out a
439
+ GitHub](https://github.com/rails/sprockets). You can check out a
440
440
  copy of the latest code using Git:
441
441
 
442
- $ git clone https://github.com/sstephenson/sprockets
442
+ $ git clone https://github.com/rails/sprockets
443
443
 
444
444
  If you've found a bug or have a question, please open an issue on the
445
445
  [Sprockets issue
446
- tracker](https://github.com/sstephenson/sprockets/issues). Or, clone
446
+ tracker](https://github.com/rails/sprockets/issues). Or, clone
447
447
  the Sprockets repository, write a failing test case, fix the bug and
448
448
  submit a pull request.
449
449
 
@@ -469,6 +469,7 @@ submit a pull request.
469
469
  * Rename `Asset#digest` to `Asset#hexdigest`. `Asset#digest` is deprecated and will
470
470
  return a raw byte String in 4.x.
471
471
  * Added transitional compatibility flag to `Environment#resolve(path, compat: true)`. 2.x mode operates with `compat: true` and 4.x with `compat: false`
472
+ * `manifest-abc123.json` renamed to `.sprockets-abc123.json`
472
473
 
473
474
  **2.12.3** (October 28, 2014)
474
475
 
data/lib/sprockets.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require 'sprockets/version'
2
+ require 'sprockets/autoload'
2
3
 
3
4
  module Sprockets
4
5
  # Environment
@@ -10,7 +11,6 @@ module Sprockets
10
11
 
11
12
  # Processing
12
13
  autoload :Bundle, 'sprockets/bundle'
13
- autoload :CoffeeScriptTemplate, 'sprockets/coffee_script_template'
14
14
  autoload :Context, 'sprockets/context'
15
15
  autoload :DirectiveProcessor, 'sprockets/directive_processor'
16
16
  autoload :FileReader, 'sprockets/file_reader'
@@ -48,6 +48,7 @@ module Sprockets
48
48
  mime_exts: {}.freeze,
49
49
  mime_types: {}.freeze,
50
50
  paths: [].freeze,
51
+ pipelines: {}.freeze,
51
52
  postprocessors: Hash.new { |h, k| [].freeze }.freeze,
52
53
  preprocessors: Hash.new { |h, k| [].freeze }.freeze,
53
54
  registered_transformers: Hash.new { |h, k| {}.freeze }.freeze,
@@ -97,6 +98,18 @@ module Sprockets
97
98
  register_mime_type 'application/x-font-ttf', extensions: ['.ttf']
98
99
  register_mime_type 'application/font-woff', extensions: ['.woff']
99
100
 
101
+ register_pipeline :source do |env|
102
+ []
103
+ end
104
+
105
+ register_pipeline :self do |env, type, file_type, engine_extnames|
106
+ env.self_processors_for(type, file_type, engine_extnames)
107
+ end
108
+
109
+ register_pipeline :default do |env, type, file_type, engine_extnames|
110
+ env.default_processors_for(type, file_type, engine_extnames)
111
+ end
112
+
100
113
  require 'sprockets/directive_processor'
101
114
  register_preprocessor 'text/css', DirectiveProcessor.new(
102
115
  comments: ["//", ["/*", "*/"]]
@@ -113,28 +126,39 @@ module Sprockets
113
126
  register_bundle_metadata_reducer 'application/javascript', :data, Utils.method(:concat_javascript_sources)
114
127
  register_bundle_metadata_reducer '*/*', :links, :+
115
128
 
116
- register_compressor 'text/css', :sass, autoload_processor(:SassCompressor, 'sprockets/sass_compressor')
117
- register_compressor 'text/css', :scss, autoload_processor(:SassCompressor, 'sprockets/sass_compressor')
118
- register_compressor 'text/css', :yui, autoload_processor(:YUICompressor, 'sprockets/yui_compressor')
119
- register_compressor 'application/javascript', :closure, autoload_processor(:ClosureCompressor, 'sprockets/closure_compressor')
120
- register_compressor 'application/javascript', :uglifier, autoload_processor(:UglifierCompressor, 'sprockets/uglifier_compressor')
121
- register_compressor 'application/javascript', :uglify, autoload_processor(:UglifierCompressor, 'sprockets/uglifier_compressor')
122
- register_compressor 'application/javascript', :yui, autoload_processor(:YUICompressor, 'sprockets/yui_compressor')
129
+ require 'sprockets/closure_compressor'
130
+ require 'sprockets/sass_compressor'
131
+ require 'sprockets/uglifier_compressor'
132
+ require 'sprockets/yui_compressor'
133
+ register_compressor 'text/css', :sass, SassCompressor
134
+ register_compressor 'text/css', :scss, SassCompressor
135
+ register_compressor 'text/css', :yui, YUICompressor
136
+ register_compressor 'application/javascript', :closure, ClosureCompressor
137
+ register_compressor 'application/javascript', :uglifier, UglifierCompressor
138
+ register_compressor 'application/javascript', :uglify, UglifierCompressor
139
+ register_compressor 'application/javascript', :yui, YUICompressor
123
140
 
124
141
  # Mmm, CoffeeScript
125
- register_engine '.coffee', autoload_processor(:CoffeeScriptProcessor, 'sprockets/coffee_script_processor'), mime_type: 'application/javascript'
142
+ require 'sprockets/coffee_script_processor'
143
+ register_engine '.coffee', CoffeeScriptProcessor, mime_type: 'application/javascript'
126
144
 
127
145
  # JST engines
128
- register_engine '.jst', autoload_processor(:JstProcessor, 'sprockets/jst_processor'), mime_type: 'application/javascript'
129
- register_engine '.eco', autoload_processor(:EcoProcessor, 'sprockets/eco_processor'), mime_type: 'application/javascript'
130
- register_engine '.ejs', autoload_processor(:EjsProcessor, 'sprockets/ejs_processor'), mime_type: 'application/javascript'
146
+ require 'sprockets/eco_processor'
147
+ require 'sprockets/ejs_processor'
148
+ require 'sprockets/jst_processor'
149
+ register_engine '.jst', JstProcessor, mime_type: 'application/javascript'
150
+ register_engine '.eco', EcoProcessor, mime_type: 'application/javascript'
151
+ register_engine '.ejs', EjsProcessor, mime_type: 'application/javascript'
131
152
 
132
153
  # CSS engines
133
- register_engine '.sass', autoload_processor(:SassProcessor, 'sprockets/sass_processor'), mime_type: 'text/css'
134
- register_engine '.scss', autoload_processor(:ScssProcessor, 'sprockets/sass_processor'), mime_type: 'text/css'
154
+ require 'sprockets/sass_processor'
155
+ register_engine '.sass', SassProcessor, mime_type: 'text/css'
156
+ register_engine '.scss', ScssProcessor, mime_type: 'text/css'
157
+ register_bundle_metadata_reducer 'text/css', :sass_dependencies, Set.new, :+
135
158
 
136
159
  # Other
137
- register_engine '.erb', autoload_processor(:ERBProcessor, 'sprockets/erb_processor'), mime_type: 'text/plain'
160
+ require 'sprockets/erb_processor'
161
+ register_engine '.erb', ERBProcessor, mime_type: 'text/plain'
138
162
 
139
163
  register_dependency_resolver 'environment-version' do |env|
140
164
  env.version
@@ -0,0 +1,11 @@
1
+ module Sprockets
2
+ module Autoload
3
+ autoload :Closure, 'sprockets/autoload/closure'
4
+ autoload :CoffeeScript, 'sprockets/autoload/coffee_script'
5
+ autoload :Eco, 'sprockets/autoload/eco'
6
+ autoload :EJS, 'sprockets/autoload/ejs'
7
+ autoload :Sass, 'sprockets/autoload/sass'
8
+ autoload :Uglifier, 'sprockets/autoload/uglifier'
9
+ autoload :YUI, 'sprockets/autoload/yui'
10
+ end
11
+ end
@@ -0,0 +1,7 @@
1
+ require 'closure-compiler'
2
+
3
+ module Sprockets
4
+ module Autoload
5
+ Closure = ::Closure
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ require 'coffee_script'
2
+
3
+ module Sprockets
4
+ module Autoload
5
+ CoffeeScript = ::CoffeeScript
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ require 'eco'
2
+
3
+ module Sprockets
4
+ module Autoload
5
+ Eco = ::Eco
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ require 'ejs'
2
+
3
+ module Sprockets
4
+ module Autoload
5
+ EJS = ::EJS
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ require 'sass'
2
+
3
+ module Sprockets
4
+ module Autoload
5
+ Sass = ::Sass
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ require 'uglifier'
2
+
3
+ module Sprockets
4
+ module Autoload
5
+ Uglifier = ::Uglifier
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ require 'yui/compressor'
2
+
3
+ module Sprockets
4
+ module Autoload
5
+ YUI = ::YUI
6
+ end
7
+ end
@@ -15,8 +15,10 @@ module Sprockets
15
15
  def self.call(input)
16
16
  env = input[:environment]
17
17
  type = input[:content_type]
18
+ dependencies = Set.new(input[:metadata][:dependencies])
18
19
 
19
- processed_uri = env.build_asset_uri(input[:filename], type: type, skip_bundle: true)
20
+ processed_uri, deps = env.resolve(input[:filename], accept: type, pipeline: :self, compat: false)
21
+ dependencies.merge(deps)
20
22
 
21
23
  find_required = proc { |uri| env.load(uri).metadata[:required] }
22
24
  required = Utils.dfs(processed_uri, &find_required)
@@ -24,12 +26,40 @@ module Sprockets
24
26
  required.subtract(stubbed)
25
27
  assets = required.map { |uri| env.load(uri) }
26
28
 
27
- dependencies = Set.new(input[:metadata][:dependencies])
28
29
  (required + stubbed).each do |uri|
29
30
  dependencies.merge(env.load(uri).metadata[:dependencies])
30
31
  end
31
32
 
32
- env.process_bundle_reducers(assets, env.load_bundle_reducers(type)).merge(dependencies: dependencies, included: assets.map(&:uri))
33
+ reducers = Hash[env.match_mime_type_keys(env.config[:bundle_reducers], type).flat_map(&:to_a)]
34
+ process_bundle_reducers(assets, reducers).merge(dependencies: dependencies, included: assets.map(&:uri))
35
+ end
36
+
37
+ # Internal: Run bundle reducers on set of Assets producing a reduced
38
+ # metadata Hash.
39
+ #
40
+ # assets - Array of Assets
41
+ # reducers - Array of [initial, reducer_proc] pairs
42
+ #
43
+ # Returns reduced asset metadata Hash.
44
+ def self.process_bundle_reducers(assets, reducers)
45
+ initial = {}
46
+ reducers.each do |k, (v, _)|
47
+ initial[k] = v if !v.nil?
48
+ end
49
+
50
+ assets.reduce(initial) do |h, asset|
51
+ reducers.each do |k, (_, block)|
52
+ value = k == :data ? asset.source : asset.metadata[k]
53
+ if h.key?(k)
54
+ if !value.nil?
55
+ h[k] = block.call(h[k], value)
56
+ end
57
+ else
58
+ h[k] = value
59
+ end
60
+ end
61
+ h
62
+ end
33
63
  end
34
64
  end
35
65
  end
@@ -60,7 +60,7 @@ module Sprockets
60
60
  # cache - A compatible backend cache store instance.
61
61
  def initialize(cache = nil, logger = self.class.default_logger)
62
62
  @cache_wrapper = get_cache_wrapper(cache)
63
- @fetch_cache = Cache::MemoryStore.new(1024)
63
+ @fetch_cache = Cache::MemoryStore.new(4096)
64
64
  @logger = logger
65
65
  end
66
66
 
@@ -107,8 +107,14 @@ module Sprockets
107
107
  # Returns a JSON serializable object or nil if there was a cache miss.
108
108
  def get(key, local = false)
109
109
  expanded_key = expand_key(key)
110
- value = @fetch_cache.get(expanded_key) if local
111
- value = @cache_wrapper.get(expanded_key) if value.nil?
110
+
111
+ if local && value = @fetch_cache.get(expanded_key)
112
+ return value
113
+ end
114
+
115
+ value = @cache_wrapper.get(expanded_key)
116
+ @fetch_cache.set(expanded_key, value) if local
117
+
112
118
  value
113
119
  end
114
120
 
@@ -126,7 +132,7 @@ module Sprockets
126
132
  # Returns the value argument.
127
133
  def set(key, value, local = false)
128
134
  expanded_key = expand_key(key)
129
- @fetch_cache.set(expanded_key, value)
135
+ @fetch_cache.set(expanded_key, value) if local
130
136
  @cache_wrapper.set(expanded_key, value)
131
137
  end
132
138
 
@@ -156,9 +162,12 @@ module Sprockets
156
162
  #
157
163
  # Returns a String with a length less than 100 characters.
158
164
  def peek_key(key)
159
- if key.is_a?(String)
165
+ case key
166
+ when Integer
167
+ key.to_s
168
+ when String
160
169
  key[0, PEEK_SIZE].inspect
161
- elsif key.is_a?(Array)
170
+ when Array
162
171
  str = []
163
172
  key.each { |k| str << peek_key(k) }
164
173
  str.join(':')[0, PEEK_SIZE]
@@ -1,5 +1,3 @@
1
- require 'closure-compiler'
2
-
3
1
  module Sprockets
4
2
  # Public: Closure Compiler minifier.
5
3
  #
@@ -34,11 +32,11 @@ module Sprockets
34
32
  attr_reader :cache_key
35
33
 
36
34
  def initialize(options = {})
37
- @compiler = ::Closure::Compiler.new(options)
35
+ @compiler = Autoload::Closure::Compiler.new(options)
38
36
  @cache_key = [
39
37
  self.class.name,
40
- ::Closure::VERSION,
41
- ::Closure::COMPILER_VERSION,
38
+ Autoload::Closure::VERSION,
39
+ Autoload::Closure::COMPILER_VERSION,
42
40
  VERSION,
43
41
  options
44
42
  ].freeze
@@ -1,5 +1,3 @@
1
- require 'coffee_script'
2
-
3
1
  module Sprockets
4
2
  # Processor engine class for the CoffeeScript compiler.
5
3
  # Depends on the `coffee-script` and `coffee-script-source` gems.
@@ -10,16 +8,15 @@ module Sprockets
10
8
  #
11
9
  module CoffeeScriptProcessor
12
10
  VERSION = '1'
13
- SOURCE_VERSION = ::CoffeeScript::Source.version
14
11
 
15
12
  def self.cache_key
16
- @cache_key ||= [name, SOURCE_VERSION, VERSION].freeze
13
+ @cache_key ||= [name, Autoload::CoffeeScript::Source.version, VERSION].freeze
17
14
  end
18
15
 
19
16
  def self.call(input)
20
17
  data = input[:data]
21
18
  input[:cache].fetch(self.cache_key + [data]) do
22
- ::CoffeeScript.compile(data)
19
+ Autoload::CoffeeScript.compile(data)
23
20
  end
24
21
  end
25
22
  end
@@ -33,7 +33,7 @@ module Sprockets
33
33
  return unless compressor
34
34
 
35
35
  if compressor.is_a?(Symbol)
36
- @css_compressor = klass = compressors['text/css'][compressor] || raise(Error, "unknown compressor: #{compressor}")
36
+ @css_compressor = klass = config[:compressors]['text/css'][compressor] || raise(Error, "unknown compressor: #{compressor}")
37
37
  elsif compressor.respond_to?(:compress)
38
38
  klass = LegacyProcProcessor.new(:css_compressor, proc { |context, data| compressor.compress(data) })
39
39
  @css_compressor = :css_compressor
@@ -60,7 +60,7 @@ module Sprockets
60
60
  return unless compressor
61
61
 
62
62
  if compressor.is_a?(Symbol)
63
- @js_compressor = klass = compressors['application/javascript'][compressor] || raise(Error, "unknown compressor: #{compressor}")
63
+ @js_compressor = klass = config[:compressors]['application/javascript'][compressor] || raise(Error, "unknown compressor: #{compressor}")
64
64
  elsif compressor.respond_to?(:compress)
65
65
  klass = LegacyProcProcessor.new(:js_compressor, proc { |context, data| compressor.compress(data) })
66
66
  @js_compressor = :js_compressor
@@ -133,7 +133,7 @@ module Sprockets
133
133
  # <%= require_asset "#{framework}.js" %>
134
134
  #
135
135
  def require_asset(path)
136
- @required << resolve(path, accept: @content_type, bundle: false, compat: false)
136
+ @required << resolve(path, accept: @content_type, pipeline: :self, compat: false)
137
137
  nil
138
138
  end
139
139
 
@@ -141,7 +141,7 @@ module Sprockets
141
141
  # `path` must be an asset which may or may not already be included
142
142
  # in the bundle.
143
143
  def stub_asset(path)
144
- @stubbed << resolve(path, accept: @content_type, bundle: false, compat: false)
144
+ @stubbed << resolve(path, accept: @content_type, pipeline: :self, compat: false)
145
145
  nil
146
146
  end
147
147
 
@@ -63,7 +63,7 @@ module Sprockets
63
63
  # Returns resolved Object.
64
64
  def resolve_dependency(str)
65
65
  scheme = str[/([^:]+)/, 1]
66
- if resolver = dependency_resolvers[scheme]
66
+ if resolver = config[:dependency_resolvers][scheme]
67
67
  resolver.call(self, str)
68
68
  else
69
69
  nil
@@ -204,7 +204,7 @@ module Sprockets
204
204
  # //= require "./bar"
205
205
  #
206
206
  def process_require_directive(path)
207
- @required << resolve(path, accept: @content_type, bundle: false)
207
+ @required << resolve(path, accept: @content_type, pipeline: :self)
208
208
  end
209
209
 
210
210
  # `require_self` causes the body of the current file to be inserted
@@ -285,7 +285,7 @@ module Sprockets
285
285
  # //= stub "jquery"
286
286
  #
287
287
  def process_stub_directive(path)
288
- @stubbed << resolve(path, accept: @content_type, bundle: false)
288
+ @stubbed << resolve(path, accept: @content_type, pipeline: :self)
289
289
  end
290
290
 
291
291
  # Declares a linked dependency on the target asset.
@@ -347,7 +347,7 @@ module Sprockets
347
347
  end
348
348
 
349
349
  def require_paths(paths, deps)
350
- resolve_paths(paths, deps, accept: @content_type, bundle: false) do |uri|
350
+ resolve_paths(paths, deps, accept: @content_type, pipeline: :self) do |uri|
351
351
  @required << uri
352
352
  end
353
353
  end