webpack_manifest 0.2.0 → 0.2.1
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 +5 -5
- data/CHANGELOG.md +4 -0
- data/README.md +1 -1
- data/lib/webpack_manifest/manifest.rb +5 -2
- data/lib/webpack_manifest/rails/manifest_repository.rb +3 -1
- data/lib/webpack_manifest/version.rb +1 -1
- data/webpack_manifest.gemspec +1 -1
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: f921dccf167c3824b5b4be27adbbd0dafe54bb7334fc4ca2569d03cd18a6874f
|
4
|
+
data.tar.gz: 52cc757897893892813beffd7b41fe69f98392466409cb0f681b23f3e07417db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 821d92a75d9f50206124c7f32063bb547b7419f01312355b7493b5b8481bc8dc2df99ec9eb7f939199395814f11f45fc6ca30089bb7e8513ca7ea6953b0aa611
|
7
|
+
data.tar.gz: f22f3e0a9b465d6b7b915cd4a5703e1f3877f6085e23e9eada3a1485485acf8ef5f1e7325a4aedb7be343dd865f53ea9acd37c4f77c62fcc0ca08cf1746654f6
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# WebpackManifest
|
1
|
+
# WebpackManifest [](https://travis-ci.org/nikushi/webpack_manifest) [](https://badge.fury.io/rb/webpack_manifest)
|
2
2
|
|
3
3
|
WebpackManifest is a gem that integrates Rails with npm's [webpack-manifest-plugin](https://www.npmjs.com/package/webpack-manifest-plugin) without [webpacker](https://github.com/rails/webpacker).
|
4
4
|
|
@@ -1,16 +1,18 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'json'
|
4
|
+
require 'pathname'
|
4
5
|
|
5
6
|
module WebpackManifest
|
6
7
|
class Manifest
|
7
8
|
class MissingEntryError < StandardError; end
|
9
|
+
class FileNotFoundError < StandardError; end
|
8
10
|
|
9
11
|
attr_reader :path
|
10
12
|
attr_writer :cache
|
11
13
|
|
12
14
|
def initialize(path, cache: false)
|
13
|
-
@path = path
|
15
|
+
@path = Pathname.new(path)
|
14
16
|
@cache = cache
|
15
17
|
end
|
16
18
|
|
@@ -41,7 +43,8 @@ module WebpackManifest
|
|
41
43
|
end
|
42
44
|
|
43
45
|
def load_data
|
44
|
-
|
46
|
+
raise(FileNotFoundError, "#{@path}: no such manifest found") unless File.exist?(@path)
|
47
|
+
JSON.parse(File.read(@path))
|
45
48
|
end
|
46
49
|
|
47
50
|
def handle_missing_entry(name)
|
@@ -3,6 +3,8 @@
|
|
3
3
|
module WebpackManifest
|
4
4
|
module Rails
|
5
5
|
class ManifestRepository
|
6
|
+
class NotFoundError < StandardError; end
|
7
|
+
|
6
8
|
attr_accessor :default
|
7
9
|
|
8
10
|
def initialize
|
@@ -23,7 +25,7 @@ module WebpackManifest
|
|
23
25
|
end
|
24
26
|
|
25
27
|
def get(key)
|
26
|
-
@manifests[key.to_sym]
|
28
|
+
@manifests[key.to_sym] || raise(NotFoundError, "manifest associated with #{key} not found")
|
27
29
|
end
|
28
30
|
end
|
29
31
|
end
|
data/webpack_manifest.gemspec
CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.authors = ["Nobuhiro Nikushi"]
|
10
10
|
spec.email = ["deneb.ge@gmail.com"]
|
11
11
|
|
12
|
-
spec.summary = "
|
12
|
+
spec.summary = "WebpackManifest is a gem that integrates Rails with npm's webpack-manifest-plugin without webpacker."
|
13
13
|
spec.description = spec.summary
|
14
14
|
spec.homepage = "https://github.com/nikushi/webpack_manifest"
|
15
15
|
spec.license = "MIT"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: webpack_manifest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nobuhiro Nikushi
|
@@ -66,7 +66,8 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '3.0'
|
69
|
-
description:
|
69
|
+
description: WebpackManifest is a gem that integrates Rails with npm's webpack-manifest-plugin
|
70
|
+
without webpacker.
|
70
71
|
email:
|
71
72
|
- deneb.ge@gmail.com
|
72
73
|
executables: []
|
@@ -105,8 +106,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
105
106
|
version: '0'
|
106
107
|
requirements: []
|
107
108
|
rubyforge_project:
|
108
|
-
rubygems_version: 2.
|
109
|
+
rubygems_version: 2.7.7
|
109
110
|
signing_key:
|
110
111
|
specification_version: 4
|
111
|
-
summary:
|
112
|
+
summary: WebpackManifest is a gem that integrates Rails with npm's webpack-manifest-plugin
|
113
|
+
without webpacker.
|
112
114
|
test_files: []
|