view_component 2.60.0 → 2.61.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: b74cdfd2d8306224e0fc89d244d70f08fbf779ec9a892affd0fe766b16a4ac6d
4
- data.tar.gz: d401c34f06238713ba43d97e5b50b9db647f946f8937e964c57578918b3418fb
3
+ metadata.gz: f46bf10c68e5273401ec52134ae2cf55d844f9b01c55121e082146364194e144
4
+ data.tar.gz: 81ec5867c81158b0c06fdab309674f2f5a9cef7cf0546575308084ac928116c6
5
5
  SHA512:
6
- metadata.gz: a3c56fb2399e387fb57f6976264ea7aa3d3ce9e4490a741cf660876fe90fb5265bf80a865887a082cf282259a04b8477416546bdd21a2be08ac21744aa8316b5
7
- data.tar.gz: 71049fb1fcc3cd1a09404feb9ab7a5aee6b2c9e5dc88c377233472953ee3e498f4a95a973033d717413e8d128a0ea3e95d955885692581b9e62c26fb66a18d0f
6
+ metadata.gz: 05450d5c3e5376fe7aa4a2a934ee2b7179cafb91681cf1b6ed7f1469bd3db29f92d0ba6e96930e36403f7e250a3b7b8aeb7cc061aa30954d2d8524c6d7081d6b
7
+ data.tar.gz: 91101a168fee89fd23dad833c769027db7022a852b07b918d427b40a8b1997b861827724f7390dd470f4e69e1a8351638a43cd2d34f6df9bf20c64be0eb61d43
data/docs/CHANGELOG.md CHANGED
@@ -9,6 +9,12 @@ title: Changelog
9
9
 
10
10
  ## main
11
11
 
12
+ ## 2.61.0
13
+
14
+ * Ensure side-effects in `content` are consistently evaluated before components are rendered. This change effectively means that `content` is evaluated for every component render where `render?` returns true. As a result, code that is passed to a component via a block/content will now always be evaluated, before `#call`, which can reveal bugs in existing components.
15
+
16
+ *Blake Williams*
17
+
12
18
  ## 2.60.0
13
19
 
14
20
  * Add support for `render_preview` in RSpec tests.
@@ -124,6 +124,10 @@ module ViewComponent
124
124
  before_render
125
125
 
126
126
  if render?
127
+ # preload content to support slot delegation and to consistently perform
128
+ # side-effects that may exist in the block
129
+ content
130
+
127
131
  perform_render
128
132
  else
129
133
  ""
@@ -3,7 +3,7 @@
3
3
  module ViewComponent
4
4
  module VERSION
5
5
  MAJOR = 2
6
- MINOR = 60
6
+ MINOR = 61
7
7
  PATCH = 0
8
8
 
9
9
  STRING = [MAJOR, MINOR, PATCH].join(".")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: view_component
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.60.0
4
+ version: 2.61.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitHub Open Source