nice_partials 0.1.5 → 0.1.6

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: d42a736129588d106251452b5d8357a54b610105302f7fddd25d4658211f6b1b
4
- data.tar.gz: 66788e79de27fbddefaaef582dc4768bb3bd9a4e50eb43dd306c5c39919dac08
3
+ metadata.gz: 1a2bc1c656f72b37d7766bd5353a4320fc516dd2bfa808352f8b96217991c78b
4
+ data.tar.gz: fefb7742857fec22b402f714ce10e5d4e6b33279b3fe7abdb84b1408b31cb38c
5
5
  SHA512:
6
- metadata.gz: 0dfd842004c659c711e34675fd57a555e75dba71dd73990f73b1b8a37071c93e0ac8441b4248100b0faf6d930a70216e5d927b5aa9692ee13be9ffc6fc3507ff
7
- data.tar.gz: 65c451b1ddca8dab4bc9d523e6d9f14095c33cfe59df34f321b724445c60ab68e4aab23c26fd153929d48d5dfdad351cc230a0a0cb7970de32410e078e380bfd
6
+ metadata.gz: 40b811eb0e0231da0ed04d023af718200400880dffac5e64cb8f8c80de2f30ae187fb0e4c43235d305f1a60e74c321b370c4ff6d07a18fc975becea8c5faa975
7
+ data.tar.gz: 9ae278eb935fc27bb1f7ae46bb71efcdbf84d3ef0157e0897f4412208a1c8864251a8f8cec5ea9961d01c1884f451b6695c2a8862d2456c4f7ee2698a124362a
data/README.md CHANGED
@@ -50,7 +50,7 @@ Nice Partials is a lightweight and hopefully more Rails-native alternative to [V
50
50
 
51
51
  ## Benefits of Nice Partials
52
52
 
53
- Compared to something more heavy-handed, Nice Partials:
53
+ Nice Partials:
54
54
 
55
55
  - is just regular Rails view partials like you're used to.
56
56
  - reduces the friction when extracting components.
@@ -13,7 +13,14 @@ class ActionView::PartialRenderer
13
13
  context.nice_partials_push_t_prefix ''
14
14
  end
15
15
 
16
- result = original_render(partial, context, block)
16
+ begin
17
+ result = original_render(partial, context, block)
18
+ rescue Exception => exception
19
+ # If there was some sort of exception thrown, we also need to pop the `t` prefix.
20
+ # This provides compatibility with other libraries that depend on catching exceptions from the view renderer.
21
+ context.nice_partials_pop_t_prefix
22
+ raise exception
23
+ end
17
24
 
18
25
  # Whether there was a block or not, pop off whatever we put on the stack.
19
26
  context.nice_partials_pop_t_prefix
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module NicePartials
4
- VERSION = "0.1.5"
4
+ VERSION = "0.1.6"
5
5
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nice_partials
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Culver
8
8
  - Dom Christie
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-11-12 00:00:00.000000000 Z
12
+ date: 2022-02-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionview
@@ -70,7 +70,7 @@ homepage: https://github.com/bullet-train-co/nice_partials
70
70
  licenses:
71
71
  - MIT
72
72
  metadata: {}
73
- post_install_message:
73
+ post_install_message:
74
74
  rdoc_options: []
75
75
  require_paths:
76
76
  - lib
@@ -85,8 +85,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
85
85
  - !ruby/object:Gem::Version
86
86
  version: '0'
87
87
  requirements: []
88
- rubygems_version: 3.0.3
89
- signing_key:
88
+ rubygems_version: 3.2.22
89
+ signing_key:
90
90
  specification_version: 4
91
91
  summary: A little bit of magic to make partials perfect for components.
92
92
  test_files: