asset_paths_from_manifest 0.0.3 → 0.0.4
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 77f7f718638154a291f2a7daeb4656be3e6d640b
|
4
|
+
data.tar.gz: c622743de2625bae0403c6a510154269d458518b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b1c0cf4fc35b24d32f210b85b8c97f27e0ab9d64f67536d8e7d13047eb4201c16d842492524da06f4bc9fc37071561a7a2bceed6d1fd02beb9b4d1857d29a8f9
|
7
|
+
data.tar.gz: 305cf89ad991a866134c2bed2aaafc81284d49759bb94e093335ee5cea46ffa7c79b160ccd4d75148a444bf8c2290daf5d340967cbad7172aa42d57c7ebec9cf
|
@@ -11,13 +11,13 @@ module AssetPathsFromManifest
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def stylesheet_link_tag_from_manifest(name, **options)
|
14
|
-
|
14
|
+
stylesheet_link_tag(lookup(name, type: :stylesheet), **options)
|
15
15
|
end
|
16
16
|
|
17
17
|
private
|
18
18
|
|
19
19
|
def lookup(name, type: nil)
|
20
|
-
name_with_extname = compute_asset_extname(name, type: type)
|
20
|
+
name_with_extname = "#{name}#{compute_asset_extname(name, type: type)}"
|
21
21
|
AssetPathsFromManifest.manifest.lookup(name_with_extname)
|
22
22
|
end
|
23
23
|
end
|
@@ -14,14 +14,15 @@ module AssetPathsFromManifest
|
|
14
14
|
|
15
15
|
def initialize(json_path)
|
16
16
|
@json_path = json_path
|
17
|
-
|
17
|
+
load
|
18
18
|
end
|
19
19
|
|
20
20
|
def load
|
21
|
-
JSON.parse(File.read(@json_path))
|
21
|
+
@data = JSON.parse(File.read(@json_path))
|
22
22
|
end
|
23
23
|
|
24
24
|
def lookup(name)
|
25
|
+
load if Rails.env.development?
|
25
26
|
@data[name]
|
26
27
|
end
|
27
28
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: asset_paths_from_manifest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- izumin5210
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-04-
|
11
|
+
date: 2017-04-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|