rails_external_assets 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +1 -1
- data/lib/rails_external_assets/asset_finder.rb +6 -1
- data/lib/rails_external_assets/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d39b14eec9470919305b4a82a34e529f2bf233f8
|
4
|
+
data.tar.gz: 434440e6ed92d70a04f5fbd6d2faff6ffc00591f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9089982bb34984250bbf3dc9faf0119875e16feadb1580063909c330b4b67dbd989cf7eabd39225911f5ef72486abb369b6492070bec17dc107c8387fc253b21
|
7
|
+
data.tar.gz: 5417e10ac16be66e7585146fa59a804fb79baecfffc94c3f47a9acad5c1c207e4cf38ad60e6f6ab21ecf39dad010b72d0b964f17df8a522b9a5f391ec2c0a1f7
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -124,7 +124,7 @@ This is the file location off of Rails' `public/` folder that the external asset
|
|
124
124
|
|
125
125
|
This is the file location of the asset manifest JSON file. The keys are the file paths pre-build, and the values are the file paths post-build.
|
126
126
|
|
127
|
-
> Defaults to `public/external-assets/
|
127
|
+
> Defaults to `public/external-assets/manifest.json`
|
128
128
|
|
129
129
|
**sprockets_directives**
|
130
130
|
|
@@ -2,6 +2,7 @@ require 'json'
|
|
2
2
|
|
3
3
|
module RailsExternalAssets
|
4
4
|
class AssetFinder
|
5
|
+
@@manifest_file = nil
|
5
6
|
class << self
|
6
7
|
def external_asset(path)
|
7
8
|
external_path = File.join(RailsExternalAssets.config.base_path, asset_path(path))
|
@@ -15,11 +16,15 @@ module RailsExternalAssets
|
|
15
16
|
end
|
16
17
|
|
17
18
|
def asset_manifest
|
19
|
+
return @@manifest_file unless @@manifest_file.nil?
|
18
20
|
manifest_file = RailsExternalAssets.config.manifest_file
|
19
21
|
throw_invalid_manifest(manifest_file) unless File.file? manifest_file
|
20
|
-
JSON.parse(File.read manifest_file)
|
22
|
+
@@manifest_file = JSON.parse(File.read manifest_file)
|
21
23
|
end
|
22
24
|
|
25
|
+
def clear_manifest_cache
|
26
|
+
@@manifest_file = nil
|
27
|
+
end
|
23
28
|
|
24
29
|
private
|
25
30
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_external_assets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Lehman
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -170,7 +170,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
170
170
|
version: '0'
|
171
171
|
requirements: []
|
172
172
|
rubyforge_project:
|
173
|
-
rubygems_version: 2.
|
173
|
+
rubygems_version: 2.5.2
|
174
174
|
signing_key:
|
175
175
|
specification_version: 4
|
176
176
|
summary: Use external assets, those built outside of Sprockets' asset pipeline, in
|