external_asset_pipeline 0.4.0 → 0.5.0

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
  SHA256:
3
- metadata.gz: 277f7dca5593faff66735a6fa238128fc8a810d0d59e31afa461d9bbde910372
4
- data.tar.gz: 0f2e02b7e3dc90821642e4315045394943b01594667e63f6d15cb60e94b657bd
3
+ metadata.gz: 938503884a15e3190f4827ac9c9bae8b495806ab6c94e96d2046e1af060f0959
4
+ data.tar.gz: 0eb9c4051a506b8b67e7e1b1024f0b4a695f5075dc48420286607f02767d0420
5
5
  SHA512:
6
- metadata.gz: 68daf25b4678a9aa512ef5ba00a506ebca6205cf6ac8778ee507bf3d601a9b01992475755c512d31d4fe5a1877f407f6a4aaf2c994637d138b66fb8ef541df68
7
- data.tar.gz: 4d1fbf67ea7d1d4ea56c3102f52b65239faa305f7568087d779515eb59cb7ea6e7fc250956cd0f359619fa426c3d32e5578ddce64a426406209201f047fe4d47
6
+ metadata.gz: 7b376bce88612967eee762d4c233a03ed271bfbeabcd69b74f87b5a6a518b8abefdba70e3d4e0a8f514bb11aca75066604b82f2ed4a2b47b71b070078a8a3e2f
7
+ data.tar.gz: 2cbbc2528ed5469a7bc21a3890b50a55b1c4827efb6fc10c66174b2b2ee391706cd4e5b0080a83ed5954f7f7f9703cb57515b265bae6b6cb342d54c34ffb348e
@@ -4,17 +4,24 @@ require 'external_asset_pipeline'
4
4
 
5
5
  module ExternalAssetPipeline
6
6
  module Helper
7
+ # This helper method can be overridden to return a different Manifest
8
+ # instance, e.g. to have distinct instances in different rails engines.
9
+ def external_asset_pipeline_manifest
10
+ ExternalAssetPipeline.manifest
11
+ end
12
+
7
13
  # Overrides the built-in
8
14
  # `ActionView::Helpers::AssetUrlHelper#compute_asset_path` to use the
9
15
  # external asset pipeline, in the same manner that sprockets-rails does:
10
16
  # https://github.com/rails/sprockets-rails/blob/v3.2.1/lib/sprockets/rails/helper.rb#L74-L96
11
17
  def compute_asset_path(source, options = {})
12
- asset = ExternalAssetPipeline.manifest.find(source)
18
+ manifest = external_asset_pipeline_manifest
19
+ asset = manifest.find(source)
13
20
 
14
21
  options[:host] = asset[:host] if asset && asset[:host]
15
22
 
16
23
  return asset[:path] if asset
17
- return super if ExternalAssetPipeline.manifest.fall_back_to_sprockets?
24
+ return super if manifest.fall_back_to_sprockets?
18
25
 
19
26
  raise AssetNotFound,
20
27
  "The asset #{source.inspect} is not present in the asset manifest"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ExternalAssetPipeline
4
- VERSION = '0.4.0'
4
+ VERSION = '0.5.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: external_asset_pipeline
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Macklin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-14 00:00:00.000000000 Z
11
+ date: 2019-09-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -56,8 +56,8 @@ licenses:
56
56
  - MIT
57
57
  metadata:
58
58
  homepage_uri: https://github.com/rails-front-end/external_asset_pipeline
59
- source_code_uri: https://github.com/rails-front-end/external_asset_pipeline/tree/v0.4.0
60
- changelog_uri: https://github.com/rails-front-end/external_asset_pipeline/blob/v0.4.0/CHANGELOG.md
59
+ source_code_uri: https://github.com/rails-front-end/external_asset_pipeline/tree/v0.5.0
60
+ changelog_uri: https://github.com/rails-front-end/external_asset_pipeline/blob/v0.5.0/CHANGELOG.md
61
61
  post_install_message:
62
62
  rdoc_options: []
63
63
  require_paths: