erb 5.0.2-java → 5.0.3-java
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/.github/dependabot.yml +1 -1
- data/.github/workflows/dependabot_automerge.yml +30 -0
- data/.github/workflows/sync-ruby.yml +33 -0
- data/.github/workflows/test.yml +4 -1
- data/Gemfile +1 -0
- data/NEWS.md +4 -0
- data/README.md +64 -221
- data/_doc/erb_executable.md +240 -0
- data/lib/erb/util.rb +12 -12
- data/lib/erb/version.rb +2 -1
- data/lib/erb.rb +994 -278
- data/libexec/erb +35 -15
- metadata +6 -3
data/libexec/erb
CHANGED
@@ -90,29 +90,49 @@ class ERB
|
|
90
90
|
when '-P'
|
91
91
|
disable_percent = true
|
92
92
|
when '--help'
|
93
|
-
raise
|
93
|
+
raise ''
|
94
94
|
when /\A-/
|
95
|
-
raise "
|
95
|
+
raise "Unknown switch: #{switch.dump}"
|
96
96
|
else
|
97
97
|
var, val = *switch.split('=', 2)
|
98
98
|
(variables ||= {})[var] = val
|
99
99
|
end
|
100
100
|
end
|
101
101
|
rescue # usage
|
102
|
-
|
103
|
-
STDERR.puts
|
104
|
-
|
102
|
+
message = $!.to_s
|
103
|
+
STDERR.puts message unless message.empty?
|
104
|
+
STDERR.puts 'Usage:'
|
105
|
+
STDERR.puts " #{File.basename($0)} [options] [filepaths]"
|
105
106
|
STDERR.puts <<EOU
|
106
|
-
|
107
|
-
|
108
|
-
-
|
109
|
-
-
|
110
|
-
|
111
|
-
-
|
112
|
-
-
|
113
|
-
|
114
|
-
-P
|
115
|
-
|
107
|
+
|
108
|
+
Options:
|
109
|
+
-d --debug Set $DEBUG to enable debugging.
|
110
|
+
-E ex[:in] --encoding ex[:in]
|
111
|
+
Set default external and internal encodings.
|
112
|
+
-h --help Print this text and exit.
|
113
|
+
-n Print generated Ruby source code with line numbers;
|
114
|
+
ignored if given without option -x.
|
115
|
+
-P Disable execution tag shorthand (for lines beginning with '%').
|
116
|
+
-r library Load the named library.
|
117
|
+
-T trim_mode Specify trim_mode:
|
118
|
+
'0' means '%'; '1' means '%>'; '2' means '<>'; '-' means '%-'.
|
119
|
+
-U Set default encoding to UTF-8.
|
120
|
+
-v Set $VERBOSE to enable debugging,
|
121
|
+
--version Print ERB version string and exit.
|
122
|
+
-x Print generated Ruby source code.
|
123
|
+
-- Treat all following words as filepaths (not options).
|
124
|
+
name=value Set the variable named name to the given string value.
|
125
|
+
|
126
|
+
Filepaths:
|
127
|
+
The erb program reads the text from all files at the filepaths as a single ERB template:
|
128
|
+
plain text, possibly with embedded ERB tags;
|
129
|
+
filepaths may be repeated.
|
130
|
+
|
131
|
+
The pseudo-filepath '-' (hyphen character) specifies the standard input.
|
132
|
+
|
133
|
+
If no filepaths are given, the sole input is the standard input.
|
134
|
+
|
135
|
+
See details and examples at https://docs.ruby-lang.org/en/master/erb_executable_md.html
|
116
136
|
EOU
|
117
137
|
exit 1
|
118
138
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: erb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.3
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Masatoshi SEKI
|
8
8
|
- Takashi Kokubun
|
9
9
|
bindir: libexec
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-10-06 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: An easy to use but powerful templating system for Ruby.
|
14
14
|
email:
|
@@ -21,6 +21,8 @@ extra_rdoc_files: []
|
|
21
21
|
files:
|
22
22
|
- ".document"
|
23
23
|
- ".github/dependabot.yml"
|
24
|
+
- ".github/workflows/dependabot_automerge.yml"
|
25
|
+
- ".github/workflows/sync-ruby.yml"
|
24
26
|
- ".github/workflows/test.yml"
|
25
27
|
- ".gitignore"
|
26
28
|
- ".rdoc_options"
|
@@ -32,6 +34,7 @@ files:
|
|
32
34
|
- README.md
|
33
35
|
- Rakefile
|
34
36
|
- _doc/cgi.rb
|
37
|
+
- _doc/erb_executable.md
|
35
38
|
- bin/console
|
36
39
|
- bin/setup
|
37
40
|
- erb.gemspec
|
@@ -64,7 +67,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
64
67
|
- !ruby/object:Gem::Version
|
65
68
|
version: '0'
|
66
69
|
requirements: []
|
67
|
-
rubygems_version: 3.6.
|
70
|
+
rubygems_version: 3.6.3
|
68
71
|
specification_version: 4
|
69
72
|
summary: An easy to use but powerful templating system for Ruby.
|
70
73
|
test_files: []
|