view_component 2.71.0 → 2.72.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0fbced9eb4c36f970d2b46f99dfd3aca2043b619b807b89b27ae772596c3fe1d
4
- data.tar.gz: 82ccdda90514c215f72b6e4d654db71b3ed42e55a52c8eebbd99742f047d0b4f
3
+ metadata.gz: 0a53f531caa4766f1b698806911dd9f9868f5b7ccfc254e866eef1ee9d49b3a3
4
+ data.tar.gz: e8e80af4b878346ac1d94a4bea73244777a48f9e649d0428c9fbb0ace1554efa
5
5
  SHA512:
6
- metadata.gz: e874d63dd57bd39186244c95f351e975d8bb8e54f21c8619659b171084426c5c038ad52e710760fb0ef7301ed956c9eac99a3be5bc6f48fea0aa35f8c4459186
7
- data.tar.gz: db9fef63203b0cde5f7a867c553ef776b8b485ac21b4e7911ec78d0a5e3e8d484545b715dfd41f71c31bdab0f155d605b11554be8b33c21373e94f76aa132907
6
+ metadata.gz: b1f8c68742f0cd43a5420d9610832ea547728442cad0e2eda6f20d362d8031b23c7aabaafd3d16ea68f374b1fa72ffb27daffb789d2706d615a0d84efef8b732
7
+ data.tar.gz: 0f1f4da777b8ede894577b552356366a10c0668f121e09e251873441deb69ea92f9edf8692eeb5a9f7f98f2d49bb6e4e0dd4d35327af8ff409ed4aa56929a8fd
data/docs/CHANGELOG.md CHANGED
@@ -10,6 +10,36 @@ nav_order: 5
10
10
 
11
11
  ## main
12
12
 
13
+ ## 2.72.0
14
+
15
+ * Deprecate support for Ruby < 2.7 for removal in v3.0.0.
16
+
17
+ *Joel Hawksley*
18
+
19
+ * Add `changelog_uri` to gemspec.
20
+
21
+ *Joel Hawksley*
22
+
23
+ * Link to `CHANGELOG.md` instead of symlink.
24
+
25
+ *Joel Hawksley.
26
+
27
+ * Add Aluuno to list of companies using ViewComponent.
28
+
29
+ *Daniel Naves de Carvalho*
30
+
31
+ * Add `source_code_uri` to gemspec.
32
+
33
+ *Yoshiyuki Hirano*
34
+
35
+ * Update link to benchmark script in docs.
36
+
37
+ *Daniel Diekmeier*
38
+
39
+ * Add special exception message for `renders_one :content` explaining that content passed as a block will be assigned to the `content` accessor without having to create an explicit slot.
40
+
41
+ *Daniel Diekmeier*
42
+
13
43
  ## 2.71.0
14
44
 
15
45
  **ViewComponent has moved to a new organization: [https://github.com/viewcomponent/view_component](https://github.com/viewcomponent/view_component). See [https://github.com/viewcomponent/view_component/issues/1424](https://github.com/viewcomponent/view_component/issues/1424) for more details.**
@@ -33,6 +33,10 @@ module ViewComponent
33
33
  return if compiled? && !force
34
34
  return if component_class == ViewComponent::Base
35
35
 
36
+ if RUBY_VERSION < "2.7.0"
37
+ ViewComponent::Deprecation.warn("Support for Ruby versions < 2.7.0 will be removed in v3.0.0.")
38
+ end
39
+
36
40
  component_class.superclass.compile(raise_errors: raise_errors) if should_compile_superclass?
37
41
 
38
42
  with_write_lock do
@@ -272,6 +272,14 @@ module ViewComponent
272
272
  end
273
273
 
274
274
  def validate_singular_slot_name(slot_name)
275
+ if slot_name.to_sym == :content
276
+ raise ArgumentError.new(
277
+ "#{self} declares a slot named content, which is a reserved word in ViewComponent.\n\n" \
278
+ "Content passed to a ViewComponent as a block is captured and assigned to the `content` accessor without having to create an explicit slot.\n\n" \
279
+ "To fix this issue, either use the `content` accessor directly or choose a different slot name."
280
+ )
281
+ end
282
+
275
283
  if RESERVED_NAMES[:singular].include?(slot_name.to_sym)
276
284
  raise ArgumentError.new(
277
285
  "#{self} declares a slot named #{slot_name}, which is a reserved word in the ViewComponent framework.\n\n" \
@@ -3,7 +3,7 @@
3
3
  module ViewComponent
4
4
  module VERSION
5
5
  MAJOR = 2
6
- MINOR = 71
6
+ MINOR = 72
7
7
  PATCH = 0
8
8
 
9
9
  STRING = [MAJOR, MINOR, PATCH].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: 2.71.0
4
+ version: 2.72.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: 2022-08-31 00:00:00.000000000 Z
11
+ date: 2022-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -389,6 +389,8 @@ licenses:
389
389
  - MIT
390
390
  metadata:
391
391
  allowed_push_host: https://rubygems.org
392
+ source_code_uri: https://github.com/viewcomponent/view_component
393
+ changelog_uri: https://github.com/ViewComponent/view_component/blob/main/docs/CHANGELOG.md
392
394
  post_install_message:
393
395
  rdoc_options: []
394
396
  require_paths: