streamlined 0.6.0 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f997f37e68f2febf5c8b7b73366cd75cdccae74942b55cef25ed133748086c29
4
- data.tar.gz: 22a5a7db25b97311c38892f675a52dcbfd29e971a95da94b2aec24909e270920
3
+ metadata.gz: fc4bbc549d90142fb1990ea8f68d5772db8dd156b450ce2af48a3b8c23e8eea2
4
+ data.tar.gz: ec7369f420aac843c7cb94003822575213a6b750f98834496d5fab75e49416cb
5
5
  SHA512:
6
- metadata.gz: 7b1708ddd3a081021f4d31aef3d6e63ede1f4f6b10325a31f58ad72d5ca7bb1bc9a48d19c58900bd82e866649cac6bd232061d4875f0a0af0f2b421e759cecc2
7
- data.tar.gz: bc0e305ea12bf8858d4a75e081154511fef321ae8a80acb670cd0a80e1ea90d8011e3a34c9c95849347ee10dbd8cc041d1a02b4cfe3781951dc87f36bdad3b6d
6
+ metadata.gz: ced14869e8c3708a78d52049a3288492e026a78943e193d9473d1b73d2b6fa6d4e194aeb6442d481aa10157f483499667b7876c1df76b429091f4d2aeba18e6f
7
+ data.tar.gz: 5a425609235b0dccdadb946f3797b93caa45d1b74ab01890649253b5e5b55d5b24e8211220ed75b3d50ad42246fbb07a057a2729476830d70ee7ec96dde41fe1
data/.rubocop.yml CHANGED
@@ -1,8 +1,10 @@
1
- require:
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/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.1.0
1
+ ruby-3.1.4
data/.solargraph.yml ADDED
@@ -0,0 +1,12 @@
1
+ include:
2
+ - "**/*.rb"
3
+ exclude:
4
+ - vendor/**/*
5
+ - ".bundle/**/*"
6
+ require:
7
+ - "bridgetown-foundation"
8
+ domains: []
9
+ reporters:
10
+ - rubocop
11
+ - require_not_found
12
+ max_files: 5000
data/CHANGELOG.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
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
11
+
12
+ - Migrate repo to Codeberg
13
+
5
14
  ## [0.6.0] - 2024-09-07
6
15
 
7
16
  - Use much faster `CGI.escapeHTML` for escaping text
data/Gemfile CHANGED
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- source "https://rubygems.org"
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.4"
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 "rails-dom-testing", "~> 2.0"
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.0)
13
+ streamlined (0.6.2)
5
14
  serbea (>= 2.1)
6
15
  zeitwerk (~> 2.5)
7
16
 
8
17
  GEM
9
- remote: https://rubygems.org/
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.2)
21
+ ast (2.4.3)
24
22
  backport (1.2.0)
25
- base64 (0.2.0)
26
- benchmark (0.3.0)
27
- bigdecimal (3.1.8)
23
+ benchmark (0.5.0)
28
24
  builder (3.3.0)
29
- concurrent-ruby (1.3.4)
30
- connection_pool (2.4.1)
31
- diff-lcs (1.5.1)
32
- drb (2.2.1)
33
- e2mmap (0.1.0)
34
- erubi (1.13.0)
35
- i18n (1.14.5)
36
- concurrent-ruby (~> 1.0)
37
- jaro_winkler (1.6.0)
38
- json (2.7.2)
39
- kramdown (2.4.0)
40
- rexml
25
+ diff-lcs (1.6.2)
26
+ erubi (1.13.1)
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.3)
44
- logger (1.6.1)
45
- minitest (5.25.1)
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.16.7-arm64-darwin)
44
+ nokogiri (1.18.10-arm64-darwin)
52
45
  racc (~> 1.4)
53
- nokogiri (1.16.7-x86_64-linux)
46
+ nokogiri (1.18.10-x86_64-linux-gnu)
54
47
  racc (~> 1.4)
55
- parallel (1.26.3)
56
- parser (3.3.5.0)
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.2.1)
66
- rbs (2.8.4)
67
- regexp_parser (2.9.2)
68
- reverse_markdown (2.1.1)
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.3.7)
71
- rubocop (1.66.1)
64
+ rexml (3.4.4)
65
+ rubocop (1.81.7)
72
66
  json (~> 2.3)
73
- language_server-protocol (>= 3.17.0)
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.4, < 3.0)
78
- rubocop-ast (>= 1.32.2, < 2.0)
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, < 3.0)
81
- rubocop-ast (1.32.3)
82
- parser (>= 3.3.1.0)
83
- rubocop-bridgetown (0.5.0)
84
- rubocop (~> 1.23)
85
- rubocop-performance (~> 1.12)
86
- rubocop-minitest (0.20.1)
87
- rubocop (>= 0.90, < 2.0)
88
- rubocop-performance (1.21.1)
89
- rubocop (>= 1.48.1, < 2.0)
90
- rubocop-ast (>= 1.31.1, < 2.0)
91
- rubocop-rake (0.6.0)
92
- rubocop (~> 1.0)
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
- securerandom (0.3.1)
95
- serbea (2.2.0)
96
- erubi (>= 1.10)
97
- tilt (~> 2.0)
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
- e2mmap
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
- rbs (~> 2.0)
109
- reverse_markdown (~> 2.0)
110
- rubocop (~> 1.38)
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
- thor (1.3.2)
115
- tilt (2.4.0)
116
- tzinfo (2.0.6)
117
- concurrent-ruby (~> 1.0)
118
- unicode-display_width (2.5.0)
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
- rails-dom-testing (~> 2.0)
138
+ nokolexbor (~> 0.6.2)
130
139
  rake (~> 13.0)
131
140
  rubocop (~> 1.21)
132
- rubocop-bridgetown (~> 0.4)
133
- rubocop-minitest (~> 0.20.0)
134
- rubocop-rake (~> 0.6.0)
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/README.md CHANGED
@@ -24,12 +24,8 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
24
24
 
25
25
  ## Contributing
26
26
 
27
- Bug reports and pull requests are welcome on GitHub at https://github.com/bridgetownrb/streamlined. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/bridgetownrb/streamlined/blob/main/CODE_OF_CONDUCT.md).
27
+ Bug reports and pull requests are welcome on Codeberg at https://codeberg.org/jaredwhite/streamlined. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://codeberg.org/jaredwhite/streamlined/src/branch/main/CODE_OF_CONDUCT.md).
28
28
 
29
29
  ## License
30
30
 
31
31
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
32
-
33
- ## Code of Conduct
34
-
35
- Everyone interacting in the Streamlined project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/bridgetownrb/streamlined/blob/main/CODE_OF_CONDUCT.md).
data/Rakefile CHANGED
@@ -14,4 +14,4 @@ require "rubocop/rake_task"
14
14
 
15
15
  RuboCop::RakeTask.new
16
16
 
17
- task default: %i[test rubocop]
17
+ task default: %i[rubocop test]
@@ -5,7 +5,7 @@ class Roda
5
5
  module Streamlined
6
6
  module CheckForStreamlined
7
7
  def self.===(other)
8
- other.is_a?(Proc) && other.respond_to?(:touched) && other.touched
8
+ other.is_a?(Proc) && other.respond_to?(:__streamlined_touched) && other.__streamlined_touched
9
9
  end
10
10
  end
11
11
 
@@ -5,7 +5,7 @@ require "tilt/erubi"
5
5
  module Streamlined
6
6
  module Helpers
7
7
  module TouchableProc
8
- attr_accessor :touched
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 touch
17
- self.touched = true
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 touched
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.touch : callback).to_s.then do |str|
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.touch
100
+ callback.html_safe.__streamlined_touch
101
101
  end
102
102
 
103
103
  def html_map(input, &callback)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Streamlined
4
- VERSION = "0.6.0"
4
+ VERSION = "0.6.2"
5
5
  end
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
data/streamlined.gemspec CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
9
9
  spec.email = "maintainers@bridgetownrb.com"
10
10
 
11
11
  spec.summary = "HTML fragment & component rendering for Ruby using streamlined procs & heredocs."
12
- spec.homepage = "https://github.com/bridgetownrb/streamlined"
12
+ spec.homepage = "https://codeberg.org/jaredwhite/streamlined"
13
13
  spec.license = "MIT"
14
14
  spec.required_ruby_version = ">= 3.1"
15
15
  spec.metadata["rubygems_mfa_required"] = "true"
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.0
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: 2024-09-08 00:00:00.000000000 Z
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
@@ -63,7 +64,7 @@ files:
63
64
  - lib/streamlined/renderable.rb
64
65
  - lib/streamlined/version.rb
65
66
  - streamlined.gemspec
66
- homepage: https://github.com/bridgetownrb/streamlined
67
+ homepage: https://codeberg.org/jaredwhite/streamlined
67
68
  licenses:
68
69
  - MIT
69
70
  metadata:
@@ -83,7 +84,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
83
84
  - !ruby/object:Gem::Version
84
85
  version: '0'
85
86
  requirements: []
86
- rubygems_version: 3.3.3
87
+ rubygems_version: 3.3.26
87
88
  signing_key:
88
89
  specification_version: 4
89
90
  summary: HTML fragment & component rendering for Ruby using streamlined procs & heredocs.