streamlined 0.6.1 → 0.6.2
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 +12 -2
- data/.solargraph.yml +12 -0
- data/CHANGELOG.md +6 -1
- data/Gemfile +6 -6
- data/Gemfile.lock +90 -81
- data/Rakefile +1 -1
- data/lib/roda/plugins/streamlined.rb +1 -1
- data/lib/streamlined/helpers.rb +6 -6
- data/lib/streamlined/version.rb +1 -1
- data/lib/streamlined.rb +2 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fc4bbc549d90142fb1990ea8f68d5772db8dd156b450ce2af48a3b8c23e8eea2
|
|
4
|
+
data.tar.gz: ec7369f420aac843c7cb94003822575213a6b750f98834496d5fab75e49416cb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ced14869e8c3708a78d52049a3288492e026a78943e193d9473d1b73d2b6fa6d4e194aeb6442d481aa10157f483499667b7876c1df76b429091f4d2aeba18e6f
|
|
7
|
+
data.tar.gz: 5a425609235b0dccdadb946f3797b93caa45d1b74ab01890649253b5e5b55d5b24e8211220ed75b3d50ad42246fbb07a057a2729476830d70ee7ec96dde41fe1
|
data/.rubocop.yml
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
- rubocop-bridgetown
|
|
1
|
+
plugins:
|
|
3
2
|
- rubocop-minitest
|
|
4
3
|
- rubocop-rake
|
|
5
4
|
|
|
5
|
+
require:
|
|
6
|
+
- rubocop-bridgetown
|
|
7
|
+
|
|
6
8
|
inherit_gem:
|
|
7
9
|
rubocop-bridgetown: .rubocop.yml
|
|
8
10
|
|
|
@@ -37,6 +39,10 @@ Metrics/AbcSize:
|
|
|
37
39
|
Exclude:
|
|
38
40
|
- test/**/*.rb
|
|
39
41
|
|
|
42
|
+
Metrics/BlockLength:
|
|
43
|
+
Exclude:
|
|
44
|
+
- test/**/*.rb
|
|
45
|
+
|
|
40
46
|
Metrics/ClassLength:
|
|
41
47
|
Exclude:
|
|
42
48
|
- test/**/*.rb
|
|
@@ -57,3 +63,7 @@ Style/NestedParenthesizedCalls:
|
|
|
57
63
|
|
|
58
64
|
Layout/LineLength:
|
|
59
65
|
Max: 120
|
|
66
|
+
|
|
67
|
+
Lint/Void:
|
|
68
|
+
Exclude:
|
|
69
|
+
- test/**/*.rb
|
data/.solargraph.yml
ADDED
data/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
-
## [0.6.
|
|
5
|
+
## [0.6.2] - 2025-11-03
|
|
6
|
+
|
|
7
|
+
- Rename proc internals to `__streamlined` prefix to avoid pollution
|
|
8
|
+
- Convert tests to spec style & remove rails-dom-testing
|
|
9
|
+
|
|
10
|
+
## [0.6.1] - 2025-09-07
|
|
6
11
|
|
|
7
12
|
- Migrate repo to Codeberg
|
|
8
13
|
|
data/Gemfile
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
source "https://
|
|
3
|
+
source "https://gem.coop"
|
|
4
4
|
|
|
5
5
|
# Specify your gem's dependencies in streamlined.gemspec
|
|
6
6
|
gemspec
|
|
@@ -11,11 +11,11 @@ gem "minitest", "~> 5.0"
|
|
|
11
11
|
gem "minitest-reporters", "~> 1.5"
|
|
12
12
|
|
|
13
13
|
gem "rubocop", "~> 1.21"
|
|
14
|
-
gem "rubocop-bridgetown", "~> 0.
|
|
14
|
+
gem "rubocop-bridgetown", "~> 0.7"
|
|
15
|
+
gem "rubocop-minitest", "~> 0.20"
|
|
16
|
+
gem "rubocop-rake", "~> 0.6"
|
|
15
17
|
|
|
16
18
|
gem "solargraph", "~> 0.50"
|
|
17
19
|
|
|
18
|
-
gem "
|
|
19
|
-
|
|
20
|
-
gem "rubocop-minitest", "~> 0.20.0"
|
|
21
|
-
gem "rubocop-rake", "~> 0.6.0"
|
|
20
|
+
gem "bridgetown-foundation", git: "https://github.com/bridgetownrb/bridgetown.git"
|
|
21
|
+
gem "nokolexbor", "~> 0.6.2"
|
data/Gemfile.lock
CHANGED
|
@@ -1,122 +1,130 @@
|
|
|
1
|
+
GIT
|
|
2
|
+
remote: https://github.com/bridgetownrb/bridgetown.git
|
|
3
|
+
revision: 47fecf6d13ae79095fbbca0577429e3e1212c292
|
|
4
|
+
specs:
|
|
5
|
+
bridgetown-foundation (2.0.3)
|
|
6
|
+
hash_with_dot_access (~> 2.0)
|
|
7
|
+
inclusive (~> 1.0)
|
|
8
|
+
zeitwerk (~> 2.5)
|
|
9
|
+
|
|
1
10
|
PATH
|
|
2
11
|
remote: .
|
|
3
12
|
specs:
|
|
4
|
-
streamlined (0.6.
|
|
13
|
+
streamlined (0.6.2)
|
|
5
14
|
serbea (>= 2.1)
|
|
6
15
|
zeitwerk (~> 2.5)
|
|
7
16
|
|
|
8
17
|
GEM
|
|
9
|
-
remote: https://
|
|
18
|
+
remote: https://gem.coop/
|
|
10
19
|
specs:
|
|
11
|
-
activesupport (7.2.1)
|
|
12
|
-
base64
|
|
13
|
-
bigdecimal
|
|
14
|
-
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
15
|
-
connection_pool (>= 2.2.5)
|
|
16
|
-
drb
|
|
17
|
-
i18n (>= 1.6, < 2)
|
|
18
|
-
logger (>= 1.4.2)
|
|
19
|
-
minitest (>= 5.1)
|
|
20
|
-
securerandom (>= 0.3)
|
|
21
|
-
tzinfo (~> 2.0, >= 2.0.5)
|
|
22
20
|
ansi (1.5.0)
|
|
23
|
-
ast (2.4.
|
|
21
|
+
ast (2.4.3)
|
|
24
22
|
backport (1.2.0)
|
|
25
|
-
|
|
26
|
-
benchmark (0.3.0)
|
|
27
|
-
bigdecimal (3.1.8)
|
|
23
|
+
benchmark (0.5.0)
|
|
28
24
|
builder (3.3.0)
|
|
29
|
-
|
|
30
|
-
connection_pool (2.4.1)
|
|
31
|
-
diff-lcs (1.5.1)
|
|
32
|
-
drb (2.2.1)
|
|
33
|
-
e2mmap (0.1.0)
|
|
25
|
+
diff-lcs (1.6.2)
|
|
34
26
|
erubi (1.13.1)
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
jaro_winkler (1.6.
|
|
38
|
-
json (2.
|
|
39
|
-
kramdown (2.
|
|
40
|
-
rexml
|
|
27
|
+
hash_with_dot_access (2.2.0)
|
|
28
|
+
inclusive (1.1.0)
|
|
29
|
+
jaro_winkler (1.6.1)
|
|
30
|
+
json (2.15.2)
|
|
31
|
+
kramdown (2.5.1)
|
|
32
|
+
rexml (>= 3.3.9)
|
|
41
33
|
kramdown-parser-gfm (1.1.0)
|
|
42
34
|
kramdown (~> 2.0)
|
|
43
|
-
language_server-protocol (3.17.0.
|
|
44
|
-
|
|
45
|
-
|
|
35
|
+
language_server-protocol (3.17.0.5)
|
|
36
|
+
lint_roller (1.1.0)
|
|
37
|
+
logger (1.7.0)
|
|
38
|
+
minitest (5.26.0)
|
|
46
39
|
minitest-reporters (1.7.1)
|
|
47
40
|
ansi
|
|
48
41
|
builder
|
|
49
42
|
minitest (>= 5.0)
|
|
50
43
|
ruby-progressbar
|
|
51
|
-
nokogiri (1.
|
|
44
|
+
nokogiri (1.18.10-arm64-darwin)
|
|
52
45
|
racc (~> 1.4)
|
|
53
|
-
nokogiri (1.
|
|
46
|
+
nokogiri (1.18.10-x86_64-linux-gnu)
|
|
54
47
|
racc (~> 1.4)
|
|
55
|
-
|
|
56
|
-
|
|
48
|
+
nokolexbor (0.6.2-x86_64-linux)
|
|
49
|
+
observer (0.1.2)
|
|
50
|
+
ostruct (0.6.3)
|
|
51
|
+
parallel (1.27.0)
|
|
52
|
+
parser (3.3.10.0)
|
|
57
53
|
ast (~> 2.4.1)
|
|
58
54
|
racc
|
|
55
|
+
prism (1.6.0)
|
|
59
56
|
racc (1.8.1)
|
|
60
|
-
rails-dom-testing (2.2.0)
|
|
61
|
-
activesupport (>= 5.0.0)
|
|
62
|
-
minitest
|
|
63
|
-
nokogiri (>= 1.6)
|
|
64
57
|
rainbow (3.1.1)
|
|
65
|
-
rake (13.
|
|
66
|
-
rbs (
|
|
67
|
-
|
|
68
|
-
|
|
58
|
+
rake (13.3.1)
|
|
59
|
+
rbs (3.9.5)
|
|
60
|
+
logger
|
|
61
|
+
regexp_parser (2.11.3)
|
|
62
|
+
reverse_markdown (3.0.0)
|
|
69
63
|
nokogiri
|
|
70
|
-
rexml (3.
|
|
71
|
-
rubocop (1.
|
|
64
|
+
rexml (3.4.4)
|
|
65
|
+
rubocop (1.81.7)
|
|
72
66
|
json (~> 2.3)
|
|
73
|
-
language_server-protocol (
|
|
67
|
+
language_server-protocol (~> 3.17.0.2)
|
|
68
|
+
lint_roller (~> 1.1.0)
|
|
74
69
|
parallel (~> 1.10)
|
|
75
70
|
parser (>= 3.3.0.2)
|
|
76
71
|
rainbow (>= 2.2.2, < 4.0)
|
|
77
|
-
regexp_parser (>= 2.
|
|
78
|
-
rubocop-ast (>= 1.
|
|
72
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
|
73
|
+
rubocop-ast (>= 1.47.1, < 2.0)
|
|
79
74
|
ruby-progressbar (~> 1.7)
|
|
80
|
-
unicode-display_width (>= 2.4.0, <
|
|
81
|
-
rubocop-ast (1.
|
|
82
|
-
parser (>= 3.3.
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
rubocop
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
rubocop (>= 1.
|
|
90
|
-
rubocop-ast (>= 1.
|
|
91
|
-
rubocop-
|
|
92
|
-
|
|
75
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
|
76
|
+
rubocop-ast (1.47.1)
|
|
77
|
+
parser (>= 3.3.7.2)
|
|
78
|
+
prism (~> 1.4)
|
|
79
|
+
rubocop-bridgetown (0.7.0)
|
|
80
|
+
rubocop (~> 1.72)
|
|
81
|
+
rubocop-performance (~> 1.24)
|
|
82
|
+
rubocop-minitest (0.38.2)
|
|
83
|
+
lint_roller (~> 1.1)
|
|
84
|
+
rubocop (>= 1.75.0, < 2.0)
|
|
85
|
+
rubocop-ast (>= 1.38.0, < 2.0)
|
|
86
|
+
rubocop-performance (1.26.1)
|
|
87
|
+
lint_roller (~> 1.1)
|
|
88
|
+
rubocop (>= 1.75.0, < 2.0)
|
|
89
|
+
rubocop-ast (>= 1.47.1, < 2.0)
|
|
90
|
+
rubocop-rake (0.7.1)
|
|
91
|
+
lint_roller (~> 1.1)
|
|
92
|
+
rubocop (>= 1.72.1)
|
|
93
93
|
ruby-progressbar (1.13.0)
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
solargraph (0.50.0)
|
|
94
|
+
serbea (2.3.0)
|
|
95
|
+
erubi (>= 1.11)
|
|
96
|
+
tilt (>= 2.1)
|
|
97
|
+
solargraph (0.57.0)
|
|
99
98
|
backport (~> 1.2)
|
|
100
|
-
benchmark
|
|
99
|
+
benchmark (~> 0.4)
|
|
101
100
|
bundler (~> 2.0)
|
|
102
101
|
diff-lcs (~> 1.4)
|
|
103
|
-
|
|
104
|
-
jaro_winkler (~> 1.5)
|
|
102
|
+
jaro_winkler (~> 1.6, >= 1.6.1)
|
|
105
103
|
kramdown (~> 2.3)
|
|
106
104
|
kramdown-parser-gfm (~> 1.1)
|
|
105
|
+
logger (~> 1.6)
|
|
106
|
+
observer (~> 0.1)
|
|
107
|
+
ostruct (~> 0.6)
|
|
107
108
|
parser (~> 3.0)
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
109
|
+
prism (~> 1.4)
|
|
110
|
+
rbs (>= 3.6.1, <= 4.0.0.dev.4)
|
|
111
|
+
reverse_markdown (~> 3.0)
|
|
112
|
+
rubocop (~> 1.76)
|
|
111
113
|
thor (~> 1.0)
|
|
112
114
|
tilt (~> 2.0)
|
|
113
115
|
yard (~> 0.9, >= 0.9.24)
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
unicode-display_width (2.
|
|
116
|
+
yard-activesupport-concern (~> 0.0)
|
|
117
|
+
yard-solargraph (~> 0.1)
|
|
118
|
+
thor (1.4.0)
|
|
119
|
+
tilt (2.6.1)
|
|
120
|
+
unicode-display_width (3.2.0)
|
|
121
|
+
unicode-emoji (~> 4.1)
|
|
122
|
+
unicode-emoji (4.1.0)
|
|
119
123
|
yard (0.9.37)
|
|
124
|
+
yard-activesupport-concern (0.0.1)
|
|
125
|
+
yard (>= 0.8)
|
|
126
|
+
yard-solargraph (0.1.0)
|
|
127
|
+
yard (~> 0.9)
|
|
120
128
|
zeitwerk (2.6.18)
|
|
121
129
|
|
|
122
130
|
PLATFORMS
|
|
@@ -124,14 +132,15 @@ PLATFORMS
|
|
|
124
132
|
x86_64-linux
|
|
125
133
|
|
|
126
134
|
DEPENDENCIES
|
|
135
|
+
bridgetown-foundation!
|
|
127
136
|
minitest (~> 5.0)
|
|
128
137
|
minitest-reporters (~> 1.5)
|
|
129
|
-
|
|
138
|
+
nokolexbor (~> 0.6.2)
|
|
130
139
|
rake (~> 13.0)
|
|
131
140
|
rubocop (~> 1.21)
|
|
132
|
-
rubocop-bridgetown (~> 0.
|
|
133
|
-
rubocop-minitest (~> 0.20
|
|
134
|
-
rubocop-rake (~> 0.6
|
|
141
|
+
rubocop-bridgetown (~> 0.7)
|
|
142
|
+
rubocop-minitest (~> 0.20)
|
|
143
|
+
rubocop-rake (~> 0.6)
|
|
135
144
|
solargraph (~> 0.50)
|
|
136
145
|
streamlined!
|
|
137
146
|
|
data/Rakefile
CHANGED
data/lib/streamlined/helpers.rb
CHANGED
|
@@ -5,7 +5,7 @@ require "tilt/erubi"
|
|
|
5
5
|
module Streamlined
|
|
6
6
|
module Helpers
|
|
7
7
|
module TouchableProc
|
|
8
|
-
attr_accessor :
|
|
8
|
+
attr_accessor :__streamlined_touched
|
|
9
9
|
|
|
10
10
|
def self.run_through_pipeline(in_context_binding, input, callback)
|
|
11
11
|
Serbea::Pipeline.new(in_context_binding, input).tap { _1.instance_exec(&callback) }.then do |pipeline|
|
|
@@ -13,8 +13,8 @@ module Streamlined
|
|
|
13
13
|
end
|
|
14
14
|
end
|
|
15
15
|
|
|
16
|
-
def
|
|
17
|
-
self.
|
|
16
|
+
def __streamlined_touch
|
|
17
|
+
self.__streamlined_touched = true
|
|
18
18
|
self
|
|
19
19
|
end
|
|
20
20
|
|
|
@@ -28,7 +28,7 @@ module Streamlined
|
|
|
28
28
|
end
|
|
29
29
|
|
|
30
30
|
def to_s
|
|
31
|
-
return self.().to_s.then { html_safe? ? _1.html_safe : _1 } if
|
|
31
|
+
return self.().to_s.then { html_safe? ? _1.html_safe : _1 } if __streamlined_touched
|
|
32
32
|
|
|
33
33
|
super
|
|
34
34
|
end
|
|
@@ -87,7 +87,7 @@ module Streamlined
|
|
|
87
87
|
def text(callback, piping = nil)
|
|
88
88
|
callback = TouchableProc.run_through_pipeline(binding, callback, piping) if piping
|
|
89
89
|
|
|
90
|
-
(callback.is_a?(Proc) ? callback.
|
|
90
|
+
(callback.is_a?(Proc) ? callback.__streamlined_touch : callback).to_s.then do |str|
|
|
91
91
|
next str if str.html_safe?
|
|
92
92
|
|
|
93
93
|
CGI.escapeHTML(str)
|
|
@@ -97,7 +97,7 @@ module Streamlined
|
|
|
97
97
|
def html(callback, piping = nil)
|
|
98
98
|
callback = TouchableProc.run_through_pipeline(binding, callback, piping) if piping
|
|
99
99
|
|
|
100
|
-
callback.html_safe.
|
|
100
|
+
callback.html_safe.__streamlined_touch
|
|
101
101
|
end
|
|
102
102
|
|
|
103
103
|
def html_map(input, &callback)
|
data/lib/streamlined/version.rb
CHANGED
data/lib/streamlined.rb
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require "cgi/escape"
|
|
3
4
|
require "serbea/helpers" # primarily just for HTML safety polyfill
|
|
4
5
|
require "serbea/pipeline"
|
|
5
6
|
require "zeitwerk"
|
|
@@ -11,7 +12,7 @@ module Streamlined
|
|
|
11
12
|
class Error < StandardError; end
|
|
12
13
|
end
|
|
13
14
|
|
|
14
|
-
if defined?(Bridgetown)
|
|
15
|
+
if defined?(Bridgetown) && Bridgetown.respond_to?(:initializer)
|
|
15
16
|
Bridgetown.initializer :streamlined do |config|
|
|
16
17
|
config.roda do |app|
|
|
17
18
|
app.plugin :streamlined
|
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.6.
|
|
4
|
+
version: 0.6.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Bridgetown Team
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-
|
|
11
|
+
date: 2025-11-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: serbea
|
|
@@ -46,6 +46,7 @@ extra_rdoc_files: []
|
|
|
46
46
|
files:
|
|
47
47
|
- ".rubocop.yml"
|
|
48
48
|
- ".ruby-version"
|
|
49
|
+
- ".solargraph.yml"
|
|
49
50
|
- CHANGELOG.md
|
|
50
51
|
- CODE_OF_CONDUCT.md
|
|
51
52
|
- Gemfile
|