view_component 3.15.1 → 3.16.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/docs/CHANGELOG.md +10 -0
- data/lib/view_component/compiler.rb +1 -1
- data/lib/view_component/errors.rb +10 -2
- data/lib/view_component/version.rb +2 -2
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7e3b39556c40610939b3bb6418c79ee0352d78b4e1ea28cdca0c7aa14cd889a6
|
4
|
+
data.tar.gz: 1be4c90a4cecd14ce38ac1aa9c45646415ed81c55a8cf922ec119b3cd5833c10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 585dddfd0449d8d73652ce8b94f818c312e86316e77c6766e157ab4c025a55f8b896a2b9ee8f0fbc649128594d8c24b138515a0f3d3172e227f57a60b47e6e79
|
7
|
+
data.tar.gz: 48833cc160e6ad0a747da98f5efc959d0425895539886f14efb02cd447268306b6ce700ce50e501e520a3842b96abeeaab5e33e96751826795f59497f3326782
|
data/docs/CHANGELOG.md
CHANGED
@@ -10,6 +10,16 @@ nav_order: 5
|
|
10
10
|
|
11
11
|
## main
|
12
12
|
|
13
|
+
## 3.16.0
|
14
|
+
|
15
|
+
* Add template information to multiple template error messages.
|
16
|
+
|
17
|
+
*Joel Hawksley*
|
18
|
+
|
19
|
+
* Add `ostruct` to gemspec file to suppress stdlib removal warning.
|
20
|
+
|
21
|
+
*Jonathan Underwood*
|
22
|
+
|
13
23
|
## 3.15.1
|
14
24
|
|
15
25
|
* Re-add `@private`, undocumented `.identifier` method that was only meant for internal framework use but was used by some downstream consumers. This method will be removed in a coming minor release.
|
@@ -159,7 +159,7 @@ module ViewComponent
|
|
159
159
|
errors << "Colliding templates #{variant_names.sort.map { |v| "'#{v}'" }.to_sentence} found in #{@component}."
|
160
160
|
end
|
161
161
|
|
162
|
-
raise TemplateError.new(errors) if errors.any? && raise_errors
|
162
|
+
raise TemplateError.new(errors, @templates) if errors.any? && raise_errors
|
163
163
|
|
164
164
|
errors
|
165
165
|
end
|
@@ -17,8 +17,16 @@ module ViewComponent
|
|
17
17
|
end
|
18
18
|
|
19
19
|
class TemplateError < StandardError
|
20
|
-
def initialize(errors)
|
21
|
-
|
20
|
+
def initialize(errors, templates = nil)
|
21
|
+
message = errors.join("\n")
|
22
|
+
|
23
|
+
if templates
|
24
|
+
message << "\n"
|
25
|
+
message << "Templates:\n"
|
26
|
+
message << templates.map(&:inspect).join("\n")
|
27
|
+
end
|
28
|
+
|
29
|
+
super(message)
|
22
30
|
end
|
23
31
|
end
|
24
32
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: view_component
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.16.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ViewComponent Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-10-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -492,6 +492,20 @@ dependencies:
|
|
492
492
|
- - ">="
|
493
493
|
- !ruby/object:Gem::Version
|
494
494
|
version: '0'
|
495
|
+
- !ruby/object:Gem::Dependency
|
496
|
+
name: ostruct
|
497
|
+
requirement: !ruby/object:Gem::Requirement
|
498
|
+
requirements:
|
499
|
+
- - ">="
|
500
|
+
- !ruby/object:Gem::Version
|
501
|
+
version: '0'
|
502
|
+
type: :development
|
503
|
+
prerelease: false
|
504
|
+
version_requirements: !ruby/object:Gem::Requirement
|
505
|
+
requirements:
|
506
|
+
- - ">="
|
507
|
+
- !ruby/object:Gem::Version
|
508
|
+
version: '0'
|
495
509
|
description:
|
496
510
|
email:
|
497
511
|
executables: []
|