view_component 2.70.0 → 2.72.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of view_component might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dfe904fc47e30f865915a9b517c3251338fecdac7c64ed171eb1cf01ffb93c19
4
- data.tar.gz: 68589f54949361d592dad65bd7e225c8e4268e9538f3e48202bf3685053411bb
3
+ metadata.gz: 0a53f531caa4766f1b698806911dd9f9868f5b7ccfc254e866eef1ee9d49b3a3
4
+ data.tar.gz: e8e80af4b878346ac1d94a4bea73244777a48f9e649d0428c9fbb0ace1554efa
5
5
  SHA512:
6
- metadata.gz: 3f833b5f3024650abce4085c8558d9bbf8b023270f1d7225624a4bfe279f92b6ba7dcc946299d89307e73ff1273817c2f0a5675c5f591402e40fd4694ec51b23
7
- data.tar.gz: 8287a658c19c7aeb49cd1e0f57ffd9569f4727adde01ddc02a8d7f2322ad09ec3a3e2afe521c236ab086c5f48f399b11bea1145165c5a752286eaf93f5590b4e
6
+ metadata.gz: b1f8c68742f0cd43a5420d9610832ea547728442cad0e2eda6f20d362d8031b23c7aabaafd3d16ea68f374b1fa72ffb27daffb789d2706d615a0d84efef8b732
7
+ data.tar.gz: 0f1f4da777b8ede894577b552356366a10c0668f121e09e251873441deb69ea92f9edf8692eeb5a9f7f98f2d49bb6e4e0dd4d35327af8ff409ed4aa56929a8fd
data/docs/CHANGELOG.md CHANGED
@@ -10,6 +10,40 @@ 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
+
43
+ ## 2.71.0
44
+
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.**
46
+
13
47
  ## 2.70.0
14
48
 
15
49
  * `render_preview` can pass parameters to preview.
@@ -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 = 70
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.70.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-29 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: