asset_paths_from_manifest 0.0.2 → 0.0.3

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: c5f06fd31cd6d7884b1fd4087ff4744e4fba23cb
4
- data.tar.gz: 5dee65c2e008ad4879be0078e7be891a737a2f73
3
+ metadata.gz: 2c633fc840d5259f33e52c5dae75b9270dbc069b
4
+ data.tar.gz: ebd9cbc3c802a8a8642c8b68644eec1426130cfc
5
5
  SHA512:
6
- metadata.gz: b0104c5f4d5a93002d8fecacb41e3a52a156ac9ca84f26cf1319470319a3a118a19265eb2709560329a21dadb32d9592b9708bf8e78eb323bd0476ffe57a4839
7
- data.tar.gz: 8abb2f02e4f13f9b61894519b7908cc68dbf70cfbce12148097af4a6a9deeeefc9c05a299440d6eef385d4d9d7becf0422a4c53f47b40e1dfb90937496449b08
6
+ metadata.gz: b03b8197cba3967ce411239e9b73dbad7f5ace1b639365472034492da7defe9ad70fbf6b177cc8743026dd2bb5e5d2351c0693542d18526e7b5de825d2e7d103
7
+ data.tar.gz: f3d70dcdbf646e4ec44a3af3a76a3a94d95dcfc3f6ba6739c02ee0a0eb7c85d9f1b99f24b56cefa636b891e16fa2f8b3fdc6bd18a72b9d931977dd0804d17714
@@ -1,10 +1,12 @@
1
1
  require "asset_paths_from_manifest/version"
2
2
 
3
3
  module AssetPathsFromManifest
4
- attr_reader :manifest
4
+ class << self
5
+ attr_reader :manifest
5
6
 
6
- def self.bootstrap
7
- @manifest = Manifest.load
7
+ def bootstrap
8
+ @manifest = Manifest.load
9
+ end
8
10
  end
9
11
  end
10
12
 
@@ -14,10 +14,10 @@ module AssetPathsFromManifest
14
14
  end
15
15
 
16
16
  class Config
17
- include ActiveSupport::Configurable
17
+ attr_accessor :manifest_json_path
18
18
 
19
- config_accessor :manifest_json_path do
20
- Rails.root.join('public', 'assets', 'manifest.json')
19
+ def initialize
20
+ @manifest_json_path = Rails.root.join('public', 'assets', 'manifest.json')
21
21
  end
22
22
  end
23
23
  end
@@ -17,12 +17,8 @@ module AssetPathsFromManifest
17
17
  private
18
18
 
19
19
  def lookup(name, type: nil)
20
- name_with_extname = compute_asset_extname(name, type)
21
- manifest.lookup(name_with_extname)
22
- end
23
-
24
- def manifest
25
- AssetPathsFromManifest.manifest
20
+ name_with_extname = compute_asset_extname(name, type: type)
21
+ AssetPathsFromManifest.manifest.lookup(name_with_extname)
26
22
  end
27
23
  end
28
24
  end
@@ -8,11 +8,11 @@ module AssetPathsFromManifest
8
8
  end
9
9
 
10
10
  def file_path
11
- AssetPathsFromManifest::Config.manifest_json_path
11
+ AssetPathsFromManifest.configuration.manifest_json_path
12
12
  end
13
13
  end
14
14
 
15
- def initializer(json_path)
15
+ def initialize(json_path)
16
16
  @json_path = json_path
17
17
  @data = load
18
18
  end
@@ -1,3 +1,3 @@
1
1
  module AssetPathsFromManifest
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asset_paths_from_manifest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - izumin5210