streamlined 0.5.0 → 0.5.2

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: 2f6d5e0e63a6f2acc9944f0b703943dc3481e6430cfd19c89df6bd3b68e84a2b
4
- data.tar.gz: 1b9c27c5af0cd0cf0dde74aaae73c6cb1add9ebd32a510ca3b2b119749b84994
3
+ metadata.gz: 64c3e44e98c33631cefb78810cd8aff9b92847b0a8a4ef7c858c4bc06f3475a7
4
+ data.tar.gz: d97b35a710c00a1965f5e0f7cfedc53417b951eef53afcf70d3410e0b2892921
5
5
  SHA512:
6
- metadata.gz: 662a0b51ff471acb258b6529c6a9a9b64d1de6062d082301e030f03e4821b82537b050ccdf2ba690426c5441e717f7ba70f6e41e42fa0a28fefd090d4f00b9f6
7
- data.tar.gz: 13978e66cd60115cacfeed50d7397c016a04343bad73c862eb6fbd6bd9c21bdd90e1eb3cb292b2b73c73b68822cf90a4f818957e0b33c6cfdf7f855f11912360
6
+ metadata.gz: 701443af9bddfeb173d728631918854bde0b32f00cf9dce963220ac9624490564fa613d4f2199b9011f9dc1cd3e75dea8e8039269028c40e37b93bc58b2a3fcc
7
+ data.tar.gz: 5c2030736d89340f207944ce0ea1db48990310eed4a6c3146f840d55ff89c6d51cd0219fb8872095a830d133203cd27f6ae0c6227f0f89b2c625d710bc8fbe96
data/CHANGELOG.md CHANGED
@@ -2,9 +2,17 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
- ## [0.5.0 - 2024-04-06
5
+ ## [0.5.2] - 2024-04-06
6
6
 
7
- - Simplify syntax of pipe procs for text & html
7
+ - And we need that same fix for `text` too
8
+
9
+ ## [0.5.1] - 2024-04-06
10
+
11
+ - Fix logic bug in `html`
12
+
13
+ ## [0.5.0] - 2024-04-06
14
+
15
+ - Simplify syntax of pipe procs for `text` & `html`
8
16
 
9
17
  ## [0.4.0] — 2024-04-04
10
18
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- streamlined (0.5.0)
4
+ streamlined (0.5.2)
5
5
  serbea (>= 2.1)
6
6
  zeitwerk (~> 2.5)
7
7
 
@@ -7,6 +7,12 @@ module Streamlined
7
7
  module TouchableProc
8
8
  attr_accessor :touched
9
9
 
10
+ def self.run_through_pipeline(in_context_binding, input, callback)
11
+ Serbea::Pipeline.new(in_context_binding, input).tap { _1.instance_exec(&callback) }.then do |pipeline|
12
+ -> { pipeline.value }
13
+ end
14
+ end
15
+
10
16
  def touch
11
17
  self.touched = true
12
18
  self
@@ -79,7 +85,7 @@ module Streamlined
79
85
  end
80
86
 
81
87
  def text(callback, piping = nil)
82
- callback = Serbea::Pipeline.new(binding, callback).tap { _1.instance_exec(&piping) } if piping
88
+ callback = TouchableProc.run_through_pipeline(binding, callback, piping) if piping
83
89
 
84
90
  (callback.is_a?(Proc) ? callback.touch : callback).to_s.then do |str|
85
91
  next str if str.html_safe?
@@ -89,7 +95,7 @@ module Streamlined
89
95
  end
90
96
 
91
97
  def html(callback, piping = nil)
92
- callback = Serbea::Pipeline.new(binding, callback).tap { _1.instance_exec(&piping) } if piping
98
+ callback = TouchableProc.run_through_pipeline(binding, callback, piping) if piping
93
99
 
94
100
  callback.html_safe.touch
95
101
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Streamlined
4
- VERSION = "0.5.0"
4
+ VERSION = "0.5.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: streamlined
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bridgetown Team