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: 2c633fc840d5259f33e52c5dae75b9270dbc069b
4
- data.tar.gz: ebd9cbc3c802a8a8642c8b68644eec1426130cfc
3
+ metadata.gz: 77f7f718638154a291f2a7daeb4656be3e6d640b
4
+ data.tar.gz: c622743de2625bae0403c6a510154269d458518b
5
5
  SHA512:
6
- metadata.gz: b03b8197cba3967ce411239e9b73dbad7f5ace1b639365472034492da7defe9ad70fbf6b177cc8743026dd2bb5e5d2351c0693542d18526e7b5de825d2e7d103
7
- data.tar.gz: f3d70dcdbf646e4ec44a3af3a76a3a94d95dcfc3f6ba6739c02ee0a0eb7c85d9f1b99f24b56cefa636b891e16fa2f8b3fdc6bd18a72b9d931977dd0804d17714
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
- javascript_include_tag(lookup(name, type: :javascript), **options)
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
- @data = load
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
@@ -1,3 +1,3 @@
1
1
  module AssetPathsFromManifest
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  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.3
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-29 00:00:00.000000000 Z
11
+ date: 2017-04-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport