erb 4.0.0 → 4.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +6 -0
- data/.github/workflows/test.yml +1 -1
- data/NEWS.md +6 -2
- data/Rakefile +4 -1
- data/ext/erb/escape/extconf.rb +6 -1
- data/lib/erb/compiler.rb +1 -1
- data/lib/erb/util.rb +6 -3
- data/lib/erb/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 675c468f525ff93b95dce4365f40d238bed3c247a2f46d116312f32933e88070
|
4
|
+
data.tar.gz: '0909f701d87673867c5ba63e5d74d5cdc09538ca821af6a9f46943169e9b2ada'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f96aa045940fdd84702ff12ce46eb243fa95f0e6e912bb3f32873e3513588b8c7db94d83873f8ce8b19187b1187ac27bea00c38d9ccc479d92e222c304a8305f
|
7
|
+
data.tar.gz: ef97afccd0201e81ad6660e643b1c7e2d3449e75069bae06e595099cbe1f9c913710c9a7553234b40ee5834932d9d0bbf8d679a76416cc39e28df30138a8b97e
|
data/.github/workflows/test.yml
CHANGED
data/NEWS.md
CHANGED
@@ -1,12 +1,16 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## 4.0.1
|
4
|
+
|
5
|
+
* Stop building the C extension for TruffleRuby [#39](https://github.com/ruby/erb/pull/39)
|
6
|
+
|
3
7
|
## 4.0.0
|
4
8
|
|
5
|
-
* Optimize `ERB::Util.html_escape`
|
9
|
+
* Optimize `ERB::Util.html_escape` [#27](https://github.com/ruby/erb/pull/27)
|
6
10
|
* No longer duplicate an argument string when nothing is escaped.
|
7
11
|
* This makes `ERB::Util.html_escape` faster than `CGI.escapeHTML` in no-escape cases.
|
8
12
|
* It skips calling `#to_s` when an argument is already a String.
|
9
|
-
* Define `ERB::Escape.html_escape` as an alias to `ERB::Util.html_escape`
|
13
|
+
* Define `ERB::Escape.html_escape` as an alias to `ERB::Util.html_escape` [#38](https://github.com/ruby/erb/pull/38)
|
10
14
|
* `ERB::Util.html_escape` is known to be monkey-patched by Rails.
|
11
15
|
`ERB::Escape.html_escape` is useful when you want a non-monkey-patched version.
|
12
16
|
* Drop deprecated `-S` option from `erb` command
|
data/Rakefile
CHANGED
@@ -7,7 +7,10 @@ Rake::TestTask.new(:test) do |t|
|
|
7
7
|
t.test_files = FileList['test/**/test_*.rb']
|
8
8
|
end
|
9
9
|
|
10
|
-
|
10
|
+
case RUBY_ENGINE
|
11
|
+
when 'jruby', 'truffleruby'
|
12
|
+
# not using C extension
|
13
|
+
else
|
11
14
|
require 'rake/extensiontask'
|
12
15
|
Rake::ExtensionTask.new('erb/escape')
|
13
16
|
task test: :compile
|
data/ext/erb/escape/extconf.rb
CHANGED
data/lib/erb/compiler.rb
CHANGED
data/lib/erb/util.rb
CHANGED
@@ -4,10 +4,13 @@
|
|
4
4
|
# A subset of ERB::Util. Unlike ERB::Util#html_escape, we expect/hope
|
5
5
|
# Rails will not monkey-patch ERB::Escape#html_escape.
|
6
6
|
begin
|
7
|
-
|
8
|
-
|
7
|
+
# We don't build the C extension for JRuby, TruffleRuby, and WASM
|
8
|
+
if $LOAD_PATH.resolve_feature_path('erb/escape')
|
9
|
+
require 'erb/escape'
|
10
|
+
end
|
11
|
+
rescue LoadError # resolve_feature_path raises LoadError on TruffleRuby 22.3.0
|
9
12
|
end
|
10
|
-
unless defined?(ERB::Escape)
|
13
|
+
unless defined?(ERB::Escape)
|
11
14
|
module ERB::Escape
|
12
15
|
def html_escape(s)
|
13
16
|
CGI.escapeHTML(s.to_s)
|
data/lib/erb/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: erb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masatoshi SEKI
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: libexec
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-11-
|
12
|
+
date: 2022-11-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: cgi
|
@@ -35,6 +35,7 @@ extensions:
|
|
35
35
|
- ext/erb/escape/extconf.rb
|
36
36
|
extra_rdoc_files: []
|
37
37
|
files:
|
38
|
+
- ".github/dependabot.yml"
|
38
39
|
- ".github/workflows/test.yml"
|
39
40
|
- ".gitignore"
|
40
41
|
- Gemfile
|
@@ -75,7 +76,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
75
76
|
- !ruby/object:Gem::Version
|
76
77
|
version: '0'
|
77
78
|
requirements: []
|
78
|
-
rubygems_version: 3.
|
79
|
+
rubygems_version: 3.4.0.dev
|
79
80
|
signing_key:
|
80
81
|
specification_version: 4
|
81
82
|
summary: An easy to use but powerful templating system for Ruby.
|