streamlined 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop.yml +3 -0
- data/CHANGELOG.md +4 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +31 -33
- data/lib/streamlined/helpers.rb +15 -15
- data/lib/streamlined/renderable.rb +0 -2
- 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: 2f6d5e0e63a6f2acc9944f0b703943dc3481e6430cfd19c89df6bd3b68e84a2b
|
|
4
|
+
data.tar.gz: 1b9c27c5af0cd0cf0dde74aaae73c6cb1add9ebd32a510ca3b2b119749b84994
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 662a0b51ff471acb258b6529c6a9a9b64d1de6062d082301e030f03e4821b82537b050ccdf2ba690426c5441e717f7ba70f6e41e42fa0a28fefd090d4f00b9f6
|
|
7
|
+
data.tar.gz: 13978e66cd60115cacfeed50d7397c016a04343bad73c862eb6fbd6bd9c21bdd90e1eb3cb292b2b73c73b68822cf90a4f818957e0b33c6cfdf7f855f11912360
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
streamlined (0.
|
|
4
|
+
streamlined (0.5.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.1.3.2)
|
|
12
12
|
base64
|
|
13
13
|
bigdecimal
|
|
14
14
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
@@ -21,39 +21,38 @@ GEM
|
|
|
21
21
|
ansi (1.5.0)
|
|
22
22
|
ast (2.4.2)
|
|
23
23
|
backport (1.2.0)
|
|
24
|
-
base64 (0.
|
|
25
|
-
benchmark (0.
|
|
26
|
-
bigdecimal (3.1.
|
|
24
|
+
base64 (0.2.0)
|
|
25
|
+
benchmark (0.3.0)
|
|
26
|
+
bigdecimal (3.1.7)
|
|
27
27
|
builder (3.2.4)
|
|
28
|
-
concurrent-ruby (1.2.
|
|
28
|
+
concurrent-ruby (1.2.3)
|
|
29
29
|
connection_pool (2.4.1)
|
|
30
|
-
diff-lcs (1.5.
|
|
31
|
-
drb (2.
|
|
32
|
-
ruby2_keywords
|
|
30
|
+
diff-lcs (1.5.1)
|
|
31
|
+
drb (2.2.1)
|
|
33
32
|
e2mmap (0.1.0)
|
|
34
33
|
erubi (1.12.0)
|
|
35
|
-
i18n (1.14.
|
|
34
|
+
i18n (1.14.4)
|
|
36
35
|
concurrent-ruby (~> 1.0)
|
|
37
36
|
jaro_winkler (1.5.6)
|
|
38
|
-
json (2.
|
|
37
|
+
json (2.7.2)
|
|
39
38
|
kramdown (2.4.0)
|
|
40
39
|
rexml
|
|
41
40
|
kramdown-parser-gfm (1.1.0)
|
|
42
41
|
kramdown (~> 2.0)
|
|
43
42
|
language_server-protocol (3.17.0.3)
|
|
44
|
-
minitest (5.
|
|
43
|
+
minitest (5.22.3)
|
|
45
44
|
minitest-reporters (1.6.1)
|
|
46
45
|
ansi
|
|
47
46
|
builder
|
|
48
47
|
minitest (>= 5.0)
|
|
49
48
|
ruby-progressbar
|
|
50
|
-
mutex_m (0.
|
|
51
|
-
nokogiri (1.
|
|
49
|
+
mutex_m (0.2.0)
|
|
50
|
+
nokogiri (1.16.3-arm64-darwin)
|
|
52
51
|
racc (~> 1.4)
|
|
53
|
-
nokogiri (1.
|
|
52
|
+
nokogiri (1.16.3-x86_64-linux)
|
|
54
53
|
racc (~> 1.4)
|
|
55
|
-
parallel (1.
|
|
56
|
-
parser (3.
|
|
54
|
+
parallel (1.24.0)
|
|
55
|
+
parser (3.3.0.5)
|
|
57
56
|
ast (~> 2.4.1)
|
|
58
57
|
racc
|
|
59
58
|
racc (1.7.3)
|
|
@@ -62,41 +61,40 @@ GEM
|
|
|
62
61
|
minitest
|
|
63
62
|
nokogiri (>= 1.6)
|
|
64
63
|
rainbow (3.1.1)
|
|
65
|
-
rake (13.
|
|
64
|
+
rake (13.2.0)
|
|
66
65
|
rbs (2.8.4)
|
|
67
|
-
regexp_parser (2.
|
|
66
|
+
regexp_parser (2.9.0)
|
|
68
67
|
reverse_markdown (2.1.1)
|
|
69
68
|
nokogiri
|
|
70
69
|
rexml (3.2.6)
|
|
71
|
-
rubocop (1.
|
|
70
|
+
rubocop (1.62.1)
|
|
72
71
|
json (~> 2.3)
|
|
73
72
|
language_server-protocol (>= 3.17.0)
|
|
74
73
|
parallel (~> 1.10)
|
|
75
|
-
parser (>= 3.
|
|
74
|
+
parser (>= 3.3.0.2)
|
|
76
75
|
rainbow (>= 2.2.2, < 4.0)
|
|
77
76
|
regexp_parser (>= 1.8, < 3.0)
|
|
78
77
|
rexml (>= 3.2.5, < 4.0)
|
|
79
|
-
rubocop-ast (>= 1.
|
|
78
|
+
rubocop-ast (>= 1.31.1, < 2.0)
|
|
80
79
|
ruby-progressbar (~> 1.7)
|
|
81
80
|
unicode-display_width (>= 2.4.0, < 3.0)
|
|
82
|
-
rubocop-ast (1.
|
|
83
|
-
parser (>= 3.
|
|
81
|
+
rubocop-ast (1.31.2)
|
|
82
|
+
parser (>= 3.3.0.4)
|
|
84
83
|
rubocop-bridgetown (0.4.1)
|
|
85
84
|
rubocop (~> 1.23)
|
|
86
85
|
rubocop-performance (~> 1.12)
|
|
87
86
|
rubocop-minitest (0.20.1)
|
|
88
87
|
rubocop (>= 0.90, < 2.0)
|
|
89
|
-
rubocop-performance (1.
|
|
90
|
-
rubocop (>= 1.
|
|
91
|
-
rubocop-ast (>=
|
|
88
|
+
rubocop-performance (1.21.0)
|
|
89
|
+
rubocop (>= 1.48.1, < 2.0)
|
|
90
|
+
rubocop-ast (>= 1.31.1, < 2.0)
|
|
92
91
|
rubocop-rake (0.6.0)
|
|
93
92
|
rubocop (~> 1.0)
|
|
94
93
|
ruby-progressbar (1.13.0)
|
|
95
|
-
ruby2_keywords (0.0.5)
|
|
96
94
|
serbea (2.1.0)
|
|
97
95
|
erubi (>= 1.10)
|
|
98
96
|
tilt (~> 2.0)
|
|
99
|
-
solargraph (0.
|
|
97
|
+
solargraph (0.50.0)
|
|
100
98
|
backport (~> 1.2)
|
|
101
99
|
benchmark
|
|
102
100
|
bundler (~> 2.0)
|
|
@@ -112,13 +110,13 @@ GEM
|
|
|
112
110
|
thor (~> 1.0)
|
|
113
111
|
tilt (~> 2.0)
|
|
114
112
|
yard (~> 0.9, >= 0.9.24)
|
|
115
|
-
thor (1.3.
|
|
113
|
+
thor (1.3.1)
|
|
116
114
|
tilt (2.3.0)
|
|
117
115
|
tzinfo (2.0.6)
|
|
118
116
|
concurrent-ruby (~> 1.0)
|
|
119
117
|
unicode-display_width (2.5.0)
|
|
120
|
-
yard (0.9.
|
|
121
|
-
zeitwerk (2.6.
|
|
118
|
+
yard (0.9.36)
|
|
119
|
+
zeitwerk (2.6.13)
|
|
122
120
|
|
|
123
121
|
PLATFORMS
|
|
124
122
|
arm64-darwin-21
|
|
@@ -133,7 +131,7 @@ DEPENDENCIES
|
|
|
133
131
|
rubocop-bridgetown (~> 0.4)
|
|
134
132
|
rubocop-minitest (~> 0.20.0)
|
|
135
133
|
rubocop-rake (~> 0.6.0)
|
|
136
|
-
solargraph (~> 0.
|
|
134
|
+
solargraph (~> 0.50)
|
|
137
135
|
streamlined!
|
|
138
136
|
|
|
139
137
|
BUNDLED WITH
|
data/lib/streamlined/helpers.rb
CHANGED
|
@@ -1,19 +1,15 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require "tilt/erubi"
|
|
4
|
+
|
|
3
5
|
module Streamlined
|
|
4
6
|
module Helpers
|
|
5
|
-
module
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
attr_accessor :pipe_block, :touched
|
|
9
|
-
|
|
10
|
-
def pipe(&block)
|
|
11
|
-
return super(self.(), &pipe_block) if pipe_block && !block
|
|
7
|
+
module TouchableProc
|
|
8
|
+
attr_accessor :touched
|
|
12
9
|
|
|
10
|
+
def touch
|
|
13
11
|
self.touched = true
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
tap { _1.pipe_block = block }
|
|
12
|
+
self
|
|
17
13
|
end
|
|
18
14
|
|
|
19
15
|
def html_safe
|
|
@@ -36,7 +32,7 @@ module Streamlined
|
|
|
36
32
|
end
|
|
37
33
|
end
|
|
38
34
|
|
|
39
|
-
::Proc.prepend(
|
|
35
|
+
::Proc.prepend(TouchableProc)
|
|
40
36
|
|
|
41
37
|
# Create a set of attributes from a hash.
|
|
42
38
|
#
|
|
@@ -82,16 +78,20 @@ module Streamlined
|
|
|
82
78
|
"#{attr}=#{value.to_s.encode(xml: :attr)}"
|
|
83
79
|
end
|
|
84
80
|
|
|
85
|
-
def text(callback)
|
|
86
|
-
|
|
81
|
+
def text(callback, piping = nil)
|
|
82
|
+
callback = Serbea::Pipeline.new(binding, callback).tap { _1.instance_exec(&piping) } if piping
|
|
83
|
+
|
|
84
|
+
(callback.is_a?(Proc) ? callback.touch : callback).to_s.then do |str|
|
|
87
85
|
next str if str.html_safe?
|
|
88
86
|
|
|
89
87
|
str.encode(xml: :attr).gsub(%r{\A"|"\Z}, "")
|
|
90
88
|
end
|
|
91
89
|
end
|
|
92
90
|
|
|
93
|
-
def html(callback)
|
|
94
|
-
callback.
|
|
91
|
+
def html(callback, piping = nil)
|
|
92
|
+
callback = Serbea::Pipeline.new(binding, callback).tap { _1.instance_exec(&piping) } if piping
|
|
93
|
+
|
|
94
|
+
callback.html_safe.touch
|
|
95
95
|
end
|
|
96
96
|
|
|
97
97
|
def html_map(input, &callback)
|
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.5.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-04-
|
|
11
|
+
date: 2024-04-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: serbea
|