streamlined 0.5.1 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/Gemfile.lock +36 -35
- data/lib/streamlined/helpers.rb +10 -8
- data/lib/streamlined/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f997f37e68f2febf5c8b7b73366cd75cdccae74942b55cef25ed133748086c29
|
4
|
+
data.tar.gz: 22a5a7db25b97311c38892f675a52dcbfd29e971a95da94b2aec24909e270920
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b1708ddd3a081021f4d31aef3d6e63ede1f4f6b10325a31f58ad72d5ca7bb1bc9a48d19c58900bd82e866649cac6bd232061d4875f0a0af0f2b421e759cecc2
|
7
|
+
data.tar.gz: bc0e305ea12bf8858d4a75e081154511fef321ae8a80acb670cd0a80e1ea90d8011e3a34c9c95849347ee10dbd8cc041d1a02b4cfe3781951dc87f36bdad3b6d
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,97 +1,98 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
streamlined (0.
|
4
|
+
streamlined (0.6.0)
|
5
5
|
serbea (>= 2.1)
|
6
6
|
zeitwerk (~> 2.5)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
activesupport (7.1
|
11
|
+
activesupport (7.2.1)
|
12
12
|
base64
|
13
13
|
bigdecimal
|
14
|
-
concurrent-ruby (~> 1.0, >= 1.
|
14
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
15
15
|
connection_pool (>= 2.2.5)
|
16
16
|
drb
|
17
17
|
i18n (>= 1.6, < 2)
|
18
|
+
logger (>= 1.4.2)
|
18
19
|
minitest (>= 5.1)
|
19
|
-
|
20
|
-
tzinfo (~> 2.0)
|
20
|
+
securerandom (>= 0.3)
|
21
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
21
22
|
ansi (1.5.0)
|
22
23
|
ast (2.4.2)
|
23
24
|
backport (1.2.0)
|
24
25
|
base64 (0.2.0)
|
25
26
|
benchmark (0.3.0)
|
26
|
-
bigdecimal (3.1.
|
27
|
-
builder (3.
|
28
|
-
concurrent-ruby (1.
|
27
|
+
bigdecimal (3.1.8)
|
28
|
+
builder (3.3.0)
|
29
|
+
concurrent-ruby (1.3.4)
|
29
30
|
connection_pool (2.4.1)
|
30
31
|
diff-lcs (1.5.1)
|
31
32
|
drb (2.2.1)
|
32
33
|
e2mmap (0.1.0)
|
33
|
-
erubi (1.
|
34
|
-
i18n (1.14.
|
34
|
+
erubi (1.13.0)
|
35
|
+
i18n (1.14.5)
|
35
36
|
concurrent-ruby (~> 1.0)
|
36
|
-
jaro_winkler (1.
|
37
|
+
jaro_winkler (1.6.0)
|
37
38
|
json (2.7.2)
|
38
39
|
kramdown (2.4.0)
|
39
40
|
rexml
|
40
41
|
kramdown-parser-gfm (1.1.0)
|
41
42
|
kramdown (~> 2.0)
|
42
43
|
language_server-protocol (3.17.0.3)
|
43
|
-
|
44
|
-
minitest
|
44
|
+
logger (1.6.1)
|
45
|
+
minitest (5.25.1)
|
46
|
+
minitest-reporters (1.7.1)
|
45
47
|
ansi
|
46
48
|
builder
|
47
49
|
minitest (>= 5.0)
|
48
50
|
ruby-progressbar
|
49
|
-
|
50
|
-
nokogiri (1.16.3-arm64-darwin)
|
51
|
+
nokogiri (1.16.7-arm64-darwin)
|
51
52
|
racc (~> 1.4)
|
52
|
-
nokogiri (1.16.
|
53
|
+
nokogiri (1.16.7-x86_64-linux)
|
53
54
|
racc (~> 1.4)
|
54
|
-
parallel (1.
|
55
|
-
parser (3.3.0
|
55
|
+
parallel (1.26.3)
|
56
|
+
parser (3.3.5.0)
|
56
57
|
ast (~> 2.4.1)
|
57
58
|
racc
|
58
|
-
racc (1.
|
59
|
+
racc (1.8.1)
|
59
60
|
rails-dom-testing (2.2.0)
|
60
61
|
activesupport (>= 5.0.0)
|
61
62
|
minitest
|
62
63
|
nokogiri (>= 1.6)
|
63
64
|
rainbow (3.1.1)
|
64
|
-
rake (13.2.
|
65
|
+
rake (13.2.1)
|
65
66
|
rbs (2.8.4)
|
66
|
-
regexp_parser (2.9.
|
67
|
+
regexp_parser (2.9.2)
|
67
68
|
reverse_markdown (2.1.1)
|
68
69
|
nokogiri
|
69
|
-
rexml (3.
|
70
|
-
rubocop (1.
|
70
|
+
rexml (3.3.7)
|
71
|
+
rubocop (1.66.1)
|
71
72
|
json (~> 2.3)
|
72
73
|
language_server-protocol (>= 3.17.0)
|
73
74
|
parallel (~> 1.10)
|
74
75
|
parser (>= 3.3.0.2)
|
75
76
|
rainbow (>= 2.2.2, < 4.0)
|
76
|
-
regexp_parser (>=
|
77
|
-
|
78
|
-
rubocop-ast (>= 1.31.1, < 2.0)
|
77
|
+
regexp_parser (>= 2.4, < 3.0)
|
78
|
+
rubocop-ast (>= 1.32.2, < 2.0)
|
79
79
|
ruby-progressbar (~> 1.7)
|
80
80
|
unicode-display_width (>= 2.4.0, < 3.0)
|
81
|
-
rubocop-ast (1.
|
82
|
-
parser (>= 3.3.0
|
83
|
-
rubocop-bridgetown (0.
|
81
|
+
rubocop-ast (1.32.3)
|
82
|
+
parser (>= 3.3.1.0)
|
83
|
+
rubocop-bridgetown (0.5.0)
|
84
84
|
rubocop (~> 1.23)
|
85
85
|
rubocop-performance (~> 1.12)
|
86
86
|
rubocop-minitest (0.20.1)
|
87
87
|
rubocop (>= 0.90, < 2.0)
|
88
|
-
rubocop-performance (1.21.
|
88
|
+
rubocop-performance (1.21.1)
|
89
89
|
rubocop (>= 1.48.1, < 2.0)
|
90
90
|
rubocop-ast (>= 1.31.1, < 2.0)
|
91
91
|
rubocop-rake (0.6.0)
|
92
92
|
rubocop (~> 1.0)
|
93
93
|
ruby-progressbar (1.13.0)
|
94
|
-
|
94
|
+
securerandom (0.3.1)
|
95
|
+
serbea (2.2.0)
|
95
96
|
erubi (>= 1.10)
|
96
97
|
tilt (~> 2.0)
|
97
98
|
solargraph (0.50.0)
|
@@ -110,13 +111,13 @@ GEM
|
|
110
111
|
thor (~> 1.0)
|
111
112
|
tilt (~> 2.0)
|
112
113
|
yard (~> 0.9, >= 0.9.24)
|
113
|
-
thor (1.3.
|
114
|
-
tilt (2.
|
114
|
+
thor (1.3.2)
|
115
|
+
tilt (2.4.0)
|
115
116
|
tzinfo (2.0.6)
|
116
117
|
concurrent-ruby (~> 1.0)
|
117
118
|
unicode-display_width (2.5.0)
|
118
|
-
yard (0.9.
|
119
|
-
zeitwerk (2.6.
|
119
|
+
yard (0.9.37)
|
120
|
+
zeitwerk (2.6.18)
|
120
121
|
|
121
122
|
PLATFORMS
|
122
123
|
arm64-darwin-21
|
data/lib/streamlined/helpers.rb
CHANGED
@@ -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
|
@@ -75,25 +81,21 @@ module Streamlined
|
|
75
81
|
# @param value [String] the attribute value
|
76
82
|
# @return [String]
|
77
83
|
def attribute_segment(attr, value)
|
78
|
-
"#{attr}
|
84
|
+
"#{attr}=\"#{CGI.escapeHTML(value.to_s)}\""
|
79
85
|
end
|
80
86
|
|
81
87
|
def text(callback, piping = nil)
|
82
|
-
callback =
|
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?
|
86
92
|
|
87
|
-
|
93
|
+
CGI.escapeHTML(str)
|
88
94
|
end
|
89
95
|
end
|
90
96
|
|
91
97
|
def html(callback, piping = nil)
|
92
|
-
if piping
|
93
|
-
callback = Serbea::Pipeline.new(binding, callback).tap { _1.instance_exec(&piping) }.then do |pipeline|
|
94
|
-
-> { pipeline.value }
|
95
|
-
end
|
96
|
-
end
|
98
|
+
callback = TouchableProc.run_through_pipeline(binding, callback, piping) if piping
|
97
99
|
|
98
100
|
callback.html_safe.touch
|
99
101
|
end
|
data/lib/streamlined/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: streamlined
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bridgetown Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-09-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: serbea
|