inertia_rails 1.7.0 → 1.7.1

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: 91a7d64f22c5d539db5dcfe7527b2bde7d4661bbab098ce75c6d6822a036dec7
4
- data.tar.gz: 64e327c2079918628e2ff6ef21a85959691a48ed7493006cb280bff504fdfe41
3
+ metadata.gz: f3300d5a0d8ba1a4a433151b232dc06a2fbbdc337f8c1948b6a1fd52dbc20b4d
4
+ data.tar.gz: 3a62632643c8761c00fe3b462f2710d094a9adb06df0d7942b516c669eec7515
5
5
  SHA512:
6
- metadata.gz: de83b986de171f75fb64f28f1610e6ff7960722ea586c9ac2183dc99e6ef96fab2e5e5009e580766d595d6594ad3b7b14555b054f5302d03c7d7ac26fd4d3df8
7
- data.tar.gz: dca78a5fbb54dac45a328958dc026f9fb08428bb860fad36835c18ce7814e892329cdad6ab860faef9b095e672485a3b40748c7a7c27cdad8d9d7f90d9526b5d
6
+ metadata.gz: 29d82e990a312f2392f14b209c10d6cb198d1f335d0b0e33b2d6821d8bcbc51adeb6d489362fbf2f124bc0b3605d152eb8470221c061eaf6dcae5083f5e86a79
7
+ data.tar.gz: 44565a5b1b36086a7baf965671fd09d5b1e75f3ed393c7de459e5a3c4a7a2d17bd5f485f0f9b68261631cd47cd371439357cd1a852ed2d6a82aa71268c51aaf8
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [1.7.1] - 2020-11-24
8
+
9
+ * Fix the definition for InertiaRails::Lazy to avoid an uninitialized constant error when booting an application.
10
+
7
11
  ## [1.7.0] - 2020-11-24
8
12
 
9
13
  * Add support for "lazy" props while rendering. These are props that never compute on the initial page load. The only render during a partial update that calls for them explicitly.
@@ -1,26 +1,28 @@
1
- class InertiaRails::Lazy
2
- def initialize(value = nil, &block)
3
- @value = value
4
- @block = block
5
- end
1
+ module InertiaRails
2
+ class Lazy
3
+ def initialize(value = nil, &block)
4
+ @value = value
5
+ @block = block
6
+ end
6
7
 
7
- def call
8
- to_proc.call
9
- end
8
+ def call
9
+ to_proc.call
10
+ end
10
11
 
11
- def to_proc
12
- # This is called by controller.instance_exec, which changes self to the
13
- # controller instance. That makes the instance variables unavailable to the
14
- # proc via closure. Copying the instance variables to local variables before
15
- # the proc is returned keeps them in scope for the returned proc.
16
- value = @value
17
- block = @block
18
- if value.respond_to?(:call)
19
- value
20
- elsif value
21
- Proc.new { value }
22
- else
23
- block
12
+ def to_proc
13
+ # This is called by controller.instance_exec, which changes self to the
14
+ # controller instance. That makes the instance variables unavailable to the
15
+ # proc via closure. Copying the instance variables to local variables before
16
+ # the proc is returned keeps them in scope for the returned proc.
17
+ value = @value
18
+ block = @block
19
+ if value.respond_to?(:call)
20
+ value
21
+ elsif value
22
+ Proc.new { value }
23
+ else
24
+ block
25
+ end
24
26
  end
25
27
  end
26
28
  end
@@ -1,3 +1,3 @@
1
1
  module InertiaRails
2
- VERSION = "1.7.0"
2
+ VERSION = "1.7.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inertia_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.0
4
+ version: 1.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Knoles