render_turbo_stream 0.1.37 → 0.1.39

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: 5aec959a7ad9663de11285bba5734246b90b764235464a41da68e80a35dc2609
4
- data.tar.gz: d38bc6507be14b63af99e268cf167c567836cd7021d6777e6c31dac02b73c80e
3
+ metadata.gz: 8ab1bc2e64e1c8b702db49bb7d0e23b6624d6e017f8f619c2dbfacba0c532598
4
+ data.tar.gz: 33431e1a09d659c6b531c21970e03d556671c27b06af3ba93d477130fc5997b8
5
5
  SHA512:
6
- metadata.gz: d0ab474fc5ea832bf2ea135af3696ea0fd3d032cb17ebe8847262d7fbd53ab86e038fa37e28b497b3b7d9892e2c680aa153ba06d9e059b21cff82d682bb18099
7
- data.tar.gz: b9954342146266f214581d689fdbd0b1084fd8bb0d4d64e8e08bdbd07c931cb39e950953f6dc56c946941a922a3e39b3eee8401559548a0164ea2185d3f692d6
6
+ metadata.gz: 6b36a34b7c9eb520d03abab8eeb27c55f9f18538940278acf9d6db5e79747a71897499ed85d3fa4162cf542b1de638eb7d816dd52fa300245aee5d812bb7baaf
7
+ data.tar.gz: e1ea9eab5c37f8aab1e8336119df9dae2fa0bc7761cf18a918e242d00c02a1e14645875aaeef91e096242e16cd53e7eba698161b02a5fdc91e684b706423f12d
data/README.md CHANGED
@@ -44,7 +44,7 @@ from [turbo_power](https://github.com/marcoroth/turbo_power).
44
44
  Required Configurations for Flash Partial
45
45
 
46
46
  ```ruby
47
- config.x.render_turbo_stream.flash_partial = 'layouts/flash'
47
+ config.x.render_turbo_stream.flash_partial = 'layouts/flash'
48
48
  config.x.render_turbo_stream.flash_id = 'flash-box'
49
49
  config.x.render_turbo_stream.flash_action = 'prepend'
50
50
  ```
@@ -147,10 +147,9 @@ RSpec.describe "Articles", type: :request do
147
147
  expect(partials_responses(id: 'flash-box').length).to eq(1)
148
148
 
149
149
  # Same with partials
150
-
151
150
  expect(partials_responses(partial: 'layouts/flash').length).to eq(1)
152
151
 
153
- # little helper for showing a array of prepared flashes and all what the renderer has done
152
+ # partials_log: developer info for what the renderer has done and strings for copy and paste into test commands
154
153
  expect(partials_log.join('')).to include('Article could not be created')
155
154
  expect(partials_log.join('')).to include('layouts/flash')
156
155
 
@@ -89,17 +89,18 @@ module RenderTurboStream
89
89
  # log as helper for the developer to see which flash is set and which partials are rendered to wich ids
90
90
  def partials_log
91
91
  r = []
92
- if flash[:alert].present?
93
- r.push("flash[:alert]: «#{flash[:alert]}»")
94
- end
95
- if flash[:notice].present?
96
- r.push("flash[:notice]: «#{flash[:notice]}»")
97
- end
98
92
  if response.status == 302
99
93
  r.push("redirect to #{turbo_redirect_to}")
100
94
  else
101
95
  partials_attributes.map do |a|
102
- str = [a['action'], 'id', "«#{a['id']}»", 'by partial', "«#{a['partial']}»"].join(' ')
96
+ str = [
97
+ a['action'],
98
+ 'id',
99
+ "«#{a['id']}»",
100
+ 'by partial',
101
+ "«#{a['partial']}»",
102
+ (a['locals'].present? ? "locals: «#{a['locals']}»" : nil)
103
+ ].compact.join(' ')
103
104
  r.push(str)
104
105
  end
105
106
  end
@@ -1,3 +1,3 @@
1
1
  module RenderTurboStream
2
- VERSION = "0.1.37"
2
+ VERSION = "0.1.39"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: render_turbo_stream
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.37
4
+ version: 0.1.39
5
5
  platform: ruby
6
6
  authors:
7
7
  - christian