erb 4.0.1 → 4.0.3
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 +6 -9
- data/NEWS.md +8 -0
- data/erb.gemspec +1 -1
- data/lib/erb/compiler.rb +2 -1
- data/lib/erb/def_method.rb +1 -0
- data/lib/erb/util.rb +1 -0
- data/lib/erb/version.rb +1 -1
- data/lib/erb.rb +2 -2
- metadata +8 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 51688d85f42f0fc6fbabe6838a4edbe30119643ecd0b9ea127ceed8e2d4716f1
|
4
|
+
data.tar.gz: af32f3a73ad45d09a04063d88c653918a75146cdc7db8583bb86906195830ac0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a08d1ed7ec973b65fd614a665aac2c884a00d5487f37461adad7e78c67fe51fe289ca1046503fdd7c627f10074114abe8b0cd59e3615e3e5f401ddc600996d3e
|
7
|
+
data.tar.gz: 4e7f5ff584f103a9a4c04c7d45b01f831375e5ec9f111b1beb714096c5fbbdf36b874728c051072a72e810bc39f755205e216fea4d5cca7f30ac0938be8012a7
|
data/.github/workflows/test.yml
CHANGED
@@ -8,14 +8,11 @@ on:
|
|
8
8
|
|
9
9
|
jobs:
|
10
10
|
ruby-versions:
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
run: |
|
17
|
-
versions=$(curl -s 'https://cache.ruby-lang.org/pub/misc/ci_versions/cruby.json' | jq -c '. + ["jruby", "truffleruby-head"]')
|
18
|
-
echo "::set-output name=value::${versions}"
|
11
|
+
uses: ruby/actions/.github/workflows/ruby_versions.yml@master
|
12
|
+
with:
|
13
|
+
engine: cruby
|
14
|
+
versions: '["jruby", "truffleruby-head"]'
|
15
|
+
|
19
16
|
test:
|
20
17
|
needs: ruby-versions
|
21
18
|
name: build (${{ matrix.ruby }} / ${{ matrix.os }})
|
@@ -26,7 +23,7 @@ jobs:
|
|
26
23
|
fail-fast: false
|
27
24
|
runs-on: ${{ matrix.os }}
|
28
25
|
steps:
|
29
|
-
- uses: actions/checkout@
|
26
|
+
- uses: actions/checkout@v3
|
30
27
|
- name: Set up Ruby
|
31
28
|
uses: ruby/setup-ruby@v1
|
32
29
|
with:
|
data/NEWS.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## 4.0.3
|
4
|
+
|
5
|
+
* Enable `frozen_string_literal` in all files [#49](https://github.com/ruby/erb/pull/49)
|
6
|
+
|
7
|
+
## 4.0.2
|
8
|
+
|
9
|
+
* Fix line numbers after multi-line `<%#` [#42](https://github.com/ruby/erb/pull/42)
|
10
|
+
|
3
11
|
## 4.0.1
|
4
12
|
|
5
13
|
* Stop building the C extension for TruffleRuby [#39](https://github.com/ruby/erb/pull/39)
|
data/erb.gemspec
CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.name = 'erb'
|
10
10
|
spec.version = ERB.const_get(:VERSION, false)
|
11
11
|
spec.authors = ['Masatoshi SEKI', 'Takashi Kokubun']
|
12
|
-
spec.email = ['seki@ruby-lang.org', '
|
12
|
+
spec.email = ['seki@ruby-lang.org', 'k0kubun@ruby-lang.org']
|
13
13
|
|
14
14
|
spec.summary = %q{An easy to use but powerful templating system for Ruby.}
|
15
15
|
spec.description = %q{An easy to use but powerful templating system for Ruby.}
|
data/lib/erb/compiler.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
#--
|
2
3
|
# ERB::Compiler
|
3
4
|
#
|
@@ -384,7 +385,7 @@ class ERB::Compiler # :nodoc:
|
|
384
385
|
when '<%='
|
385
386
|
add_insert_cmd(out, content)
|
386
387
|
when '<%#'
|
387
|
-
#
|
388
|
+
out.push("\n" * content.count("\n")) # only adjust lineno
|
388
389
|
end
|
389
390
|
end
|
390
391
|
|
data/lib/erb/def_method.rb
CHANGED
data/lib/erb/util.rb
CHANGED
data/lib/erb/version.rb
CHANGED
data/lib/erb.rb
CHANGED
@@ -307,11 +307,11 @@ class ERB
|
|
307
307
|
# def build
|
308
308
|
# b = binding
|
309
309
|
# # create and run templates, filling member data variables
|
310
|
-
# ERB.new(
|
310
|
+
# ERB.new(<<~'END_PRODUCT', trim_mode: "", eoutvar: "@product").result b
|
311
311
|
# <%= PRODUCT[:name] %>
|
312
312
|
# <%= PRODUCT[:desc] %>
|
313
313
|
# END_PRODUCT
|
314
|
-
# ERB.new(
|
314
|
+
# ERB.new(<<~'END_PRICE', trim_mode: "", eoutvar: "@price").result b
|
315
315
|
# <%= PRODUCT[:name] %> -- <%= PRODUCT[:cost] %>
|
316
316
|
# <%= PRODUCT[:desc] %>
|
317
317
|
# END_PRICE
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
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.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masatoshi SEKI
|
8
8
|
- Takashi Kokubun
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: libexec
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2023-08-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: cgi
|
@@ -28,13 +28,14 @@ dependencies:
|
|
28
28
|
description: An easy to use but powerful templating system for Ruby.
|
29
29
|
email:
|
30
30
|
- seki@ruby-lang.org
|
31
|
-
-
|
31
|
+
- k0kubun@ruby-lang.org
|
32
32
|
executables:
|
33
33
|
- erb
|
34
34
|
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
|
@@ -60,7 +61,7 @@ licenses:
|
|
60
61
|
metadata:
|
61
62
|
homepage_uri: https://github.com/ruby/erb
|
62
63
|
source_code_uri: https://github.com/ruby/erb
|
63
|
-
post_install_message:
|
64
|
+
post_install_message:
|
64
65
|
rdoc_options: []
|
65
66
|
require_paths:
|
66
67
|
- lib
|
@@ -75,8 +76,8 @@ 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
|
-
signing_key:
|
79
|
+
rubygems_version: 3.4.6
|
80
|
+
signing_key:
|
80
81
|
specification_version: 4
|
81
82
|
summary: An easy to use but powerful templating system for Ruby.
|
82
83
|
test_files: []
|