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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3215da9ec9c55748c08f9e6fabbd3c5e6dbe6d903a682551a44cca8eba3890e4
4
- data.tar.gz: cff255db8c6edb81fabbe1f57cb54c256a01f5bca47a0aea608d04f37e1be365
3
+ metadata.gz: 7e3b39556c40610939b3bb6418c79ee0352d78b4e1ea28cdca0c7aa14cd889a6
4
+ data.tar.gz: 1be4c90a4cecd14ce38ac1aa9c45646415ed81c55a8cf922ec119b3cd5833c10
5
5
  SHA512:
6
- metadata.gz: 0152ef9a6e55332ffb8d918b8633900db98fe842b1836510ff41828f698dd676dd616157f433c887dcbf78620cc3862a4a4f7bf1701296fdbe7e1b648061585a
7
- data.tar.gz: 928eda14c8f4660f4de984300a0dd8baed04545fbfcb3eb31c90cbd42e9cd69d1a8f35fd5e9f6e75ca89deea73789a7b84ba261e49b528a144491a9dc979a3c4
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
- super(errors.join("\n"))
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
 
@@ -3,8 +3,8 @@
3
3
  module ViewComponent
4
4
  module VERSION
5
5
  MAJOR = 3
6
- MINOR = 15
7
- PATCH = 1
6
+ MINOR = 16
7
+ PATCH = 0
8
8
  PRE = nil
9
9
 
10
10
  STRING = [MAJOR, MINOR, PATCH, PRE].compact.join(".")
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.15.1
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-09-30 00:00:00.000000000 Z
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: []