streamlined 0.5.2 → 0.6.0

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: 64c3e44e98c33631cefb78810cd8aff9b92847b0a8a4ef7c858c4bc06f3475a7
4
- data.tar.gz: d97b35a710c00a1965f5e0f7cfedc53417b951eef53afcf70d3410e0b2892921
3
+ metadata.gz: f997f37e68f2febf5c8b7b73366cd75cdccae74942b55cef25ed133748086c29
4
+ data.tar.gz: 22a5a7db25b97311c38892f675a52dcbfd29e971a95da94b2aec24909e270920
5
5
  SHA512:
6
- metadata.gz: 701443af9bddfeb173d728631918854bde0b32f00cf9dce963220ac9624490564fa613d4f2199b9011f9dc1cd3e75dea8e8039269028c40e37b93bc58b2a3fcc
7
- data.tar.gz: 5c2030736d89340f207944ce0ea1db48990310eed4a6c3146f840d55ff89c6d51cd0219fb8872095a830d133203cd27f6ae0c6227f0f89b2c625d710bc8fbe96
6
+ metadata.gz: 7b1708ddd3a081021f4d31aef3d6e63ede1f4f6b10325a31f58ad72d5ca7bb1bc9a48d19c58900bd82e866649cac6bd232061d4875f0a0af0f2b421e759cecc2
7
+ data.tar.gz: bc0e305ea12bf8858d4a75e081154511fef321ae8a80acb670cd0a80e1ea90d8011e3a34c9c95849347ee10dbd8cc041d1a02b4cfe3781951dc87f36bdad3b6d
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.6.0] - 2024-09-07
6
+
7
+ - Use much faster `CGI.escapeHTML` for escaping text
8
+
5
9
  ## [0.5.2] - 2024-04-06
6
10
 
7
11
  - And we need that same fix for `text` too
data/Gemfile.lock CHANGED
@@ -1,97 +1,98 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- streamlined (0.5.2)
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.3.2)
11
+ activesupport (7.2.1)
12
12
  base64
13
13
  bigdecimal
14
- concurrent-ruby (~> 1.0, >= 1.0.2)
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
- mutex_m
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.7)
27
- builder (3.2.4)
28
- concurrent-ruby (1.2.3)
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.12.0)
34
- i18n (1.14.4)
34
+ erubi (1.13.0)
35
+ i18n (1.14.5)
35
36
  concurrent-ruby (~> 1.0)
36
- jaro_winkler (1.5.6)
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
- minitest (5.22.3)
44
- minitest-reporters (1.6.1)
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
- mutex_m (0.2.0)
50
- nokogiri (1.16.3-arm64-darwin)
51
+ nokogiri (1.16.7-arm64-darwin)
51
52
  racc (~> 1.4)
52
- nokogiri (1.16.3-x86_64-linux)
53
+ nokogiri (1.16.7-x86_64-linux)
53
54
  racc (~> 1.4)
54
- parallel (1.24.0)
55
- parser (3.3.0.5)
55
+ parallel (1.26.3)
56
+ parser (3.3.5.0)
56
57
  ast (~> 2.4.1)
57
58
  racc
58
- racc (1.7.3)
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.0)
65
+ rake (13.2.1)
65
66
  rbs (2.8.4)
66
- regexp_parser (2.9.0)
67
+ regexp_parser (2.9.2)
67
68
  reverse_markdown (2.1.1)
68
69
  nokogiri
69
- rexml (3.2.6)
70
- rubocop (1.62.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 (>= 1.8, < 3.0)
77
- rexml (>= 3.2.5, < 4.0)
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.31.2)
82
- parser (>= 3.3.0.4)
83
- rubocop-bridgetown (0.4.1)
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.0)
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
- serbea (2.1.0)
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.1)
114
- tilt (2.3.0)
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.36)
119
- zeitwerk (2.6.13)
119
+ yard (0.9.37)
120
+ zeitwerk (2.6.18)
120
121
 
121
122
  PLATFORMS
122
123
  arm64-darwin-21
@@ -81,7 +81,7 @@ module Streamlined
81
81
  # @param value [String] the attribute value
82
82
  # @return [String]
83
83
  def attribute_segment(attr, value)
84
- "#{attr}=#{value.to_s.encode(xml: :attr)}"
84
+ "#{attr}=\"#{CGI.escapeHTML(value.to_s)}\""
85
85
  end
86
86
 
87
87
  def text(callback, piping = nil)
@@ -90,7 +90,7 @@ module Streamlined
90
90
  (callback.is_a?(Proc) ? callback.touch : callback).to_s.then do |str|
91
91
  next str if str.html_safe?
92
92
 
93
- str.encode(xml: :attr).gsub(%r{\A"|"\Z}, "")
93
+ CGI.escapeHTML(str)
94
94
  end
95
95
  end
96
96
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Streamlined
4
- VERSION = "0.5.2"
4
+ VERSION = "0.6.0"
5
5
  end
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.5.2
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-04-06 00:00:00.000000000 Z
11
+ date: 2024-09-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: serbea