erb 2.2.0 → 2.2.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 +4 -4
- data/.github/workflows/test.yml +7 -2
- data/Gemfile +5 -3
- data/NEWS.md +9 -0
- data/README.md +6 -9
- data/Rakefile +6 -6
- data/erb.gemspec +22 -13
- data/lib/erb.rb +7 -7
- data/lib/erb/version.rb +5 -0
- metadata +20 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f3996670474a52bba08a0a8cdeba934a01d09fb7a45047ad14de049823cea90
|
4
|
+
data.tar.gz: e23035811fc69fb375930eb155ecbf47b67e7991ba7c96fd3c95d6f823e58b6b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '09a2991c267e42f6b46f9c629db1596c3238a711e409099c1b50874ded8752d1dd64a9828b6eaec79796b06dab92d402d408c97b24a06eda3e4b12bb8c9e49ac'
|
7
|
+
data.tar.gz: 4341ca9b16e9e646121dd7e2da710156c6ce71a15983b6c12daaad6fc43fec918b4c57b15b933ff7e6a94a32894e8a458f580f3371300253cb36aaf955b2e07c
|
data/.github/workflows/test.yml
CHANGED
@@ -7,8 +7,13 @@ jobs:
|
|
7
7
|
name: build (${{ matrix.ruby }} / ${{ matrix.os }})
|
8
8
|
strategy:
|
9
9
|
matrix:
|
10
|
-
ruby:
|
11
|
-
|
10
|
+
ruby:
|
11
|
+
- '2.5'
|
12
|
+
- '2.6'
|
13
|
+
- '2.7'
|
14
|
+
- '3.0'
|
15
|
+
- head
|
16
|
+
os: [ubuntu-latest]
|
12
17
|
runs-on: ${{ matrix.os }}
|
13
18
|
steps:
|
14
19
|
- uses: actions/checkout@master
|
data/Gemfile
CHANGED
data/NEWS.md
ADDED
data/README.md
CHANGED
@@ -1,8 +1,6 @@
|
|
1
|
-
#
|
1
|
+
# ERB
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
3
|
+
An easy to use but powerful templating system for Ruby.
|
6
4
|
|
7
5
|
## Installation
|
8
6
|
|
@@ -20,10 +18,6 @@ Or install it yourself as:
|
|
20
18
|
|
21
19
|
$ gem install erb
|
22
20
|
|
23
|
-
## Usage
|
24
|
-
|
25
|
-
TODO: Write usage instructions here
|
26
|
-
|
27
21
|
## Development
|
28
22
|
|
29
23
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
@@ -32,5 +26,8 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
32
26
|
|
33
27
|
## Contributing
|
34
28
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
29
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/ruby/erb.
|
30
|
+
|
31
|
+
## License
|
36
32
|
|
33
|
+
The gem is available as open source under the terms of the [2-Clause BSD License](https://opensource.org/licenses/BSD-2-Clause).
|
data/Rakefile
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
require
|
2
|
-
require
|
1
|
+
require 'bundler/gem_tasks'
|
2
|
+
require 'rake/testtask'
|
3
3
|
|
4
4
|
Rake::TestTask.new(:test) do |t|
|
5
|
-
t.libs <<
|
6
|
-
t.ruby_opts <<
|
7
|
-
t.test_files = FileList[
|
5
|
+
t.libs << 'test/lib'
|
6
|
+
t.ruby_opts << '-rhelper'
|
7
|
+
t.test_files = FileList['test/**/test_*.rb']
|
8
8
|
end
|
9
9
|
|
10
|
-
task :
|
10
|
+
task default: :test
|
data/erb.gemspec
CHANGED
@@ -1,22 +1,31 @@
|
|
1
|
+
begin
|
2
|
+
require_relative 'lib/erb/version'
|
3
|
+
rescue LoadError
|
4
|
+
# for Ruby core repository
|
5
|
+
require_relative 'erb/version'
|
6
|
+
end
|
7
|
+
|
1
8
|
Gem::Specification.new do |spec|
|
2
|
-
spec.name =
|
3
|
-
spec.version =
|
4
|
-
spec.authors = [
|
5
|
-
spec.email = [
|
9
|
+
spec.name = 'erb'
|
10
|
+
spec.version = ERB.const_get(:VERSION, false)
|
11
|
+
spec.authors = ['Masatoshi SEKI']
|
12
|
+
spec.email = ['seki@ruby-lang.org']
|
6
13
|
|
7
14
|
spec.summary = %q{An easy to use but powerful templating system for Ruby.}
|
8
15
|
spec.description = %q{An easy to use but powerful templating system for Ruby.}
|
9
|
-
spec.homepage =
|
10
|
-
spec.required_ruby_version = Gem::Requirement.new(
|
11
|
-
spec.licenses = [
|
16
|
+
spec.homepage = 'https://github.com/ruby/erb'
|
17
|
+
spec.required_ruby_version = Gem::Requirement.new('>= 2.3.0')
|
18
|
+
spec.licenses = ['Ruby', 'BSD-2-Clause']
|
12
19
|
|
13
|
-
spec.metadata[
|
14
|
-
spec.metadata[
|
20
|
+
spec.metadata['homepage_uri'] = spec.homepage
|
21
|
+
spec.metadata['source_code_uri'] = spec.homepage
|
15
22
|
|
16
|
-
spec.files = Dir.chdir(File.expand_path(
|
23
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
17
24
|
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
25
|
end
|
19
|
-
spec.bindir =
|
20
|
-
spec.executables = [
|
21
|
-
spec.require_paths = [
|
26
|
+
spec.bindir = 'libexec'
|
27
|
+
spec.executables = ['erb']
|
28
|
+
spec.require_paths = ['lib']
|
29
|
+
|
30
|
+
spec.add_dependency 'cgi'
|
22
31
|
end
|
data/lib/erb.rb
CHANGED
@@ -12,7 +12,8 @@
|
|
12
12
|
#
|
13
13
|
# You can redistribute it and/or modify it under the same terms as Ruby.
|
14
14
|
|
15
|
-
require
|
15
|
+
require 'cgi/util'
|
16
|
+
require 'erb/version'
|
16
17
|
|
17
18
|
#
|
18
19
|
# = ERB -- Ruby Templating
|
@@ -257,10 +258,11 @@ require "cgi/util"
|
|
257
258
|
#
|
258
259
|
class ERB
|
259
260
|
Revision = '$Date:: $' # :nodoc: #'
|
261
|
+
deprecate_constant :Revision
|
260
262
|
|
261
263
|
# Returns revision information for the erb.rb module.
|
262
264
|
def self.version
|
263
|
-
|
265
|
+
VERSION
|
264
266
|
end
|
265
267
|
end
|
266
268
|
|
@@ -809,14 +811,14 @@ class ERB
|
|
809
811
|
def initialize(str, safe_level=NOT_GIVEN, legacy_trim_mode=NOT_GIVEN, legacy_eoutvar=NOT_GIVEN, trim_mode: nil, eoutvar: '_erbout')
|
810
812
|
# Complex initializer for $SAFE deprecation at [Feature #14256]. Use keyword arguments to pass trim_mode or eoutvar.
|
811
813
|
if safe_level != NOT_GIVEN
|
812
|
-
warn 'Passing safe_level with the 2nd argument of ERB.new is deprecated. Do not use it, and specify other arguments as keyword arguments.', uplevel: 1
|
814
|
+
warn 'Passing safe_level with the 2nd argument of ERB.new is deprecated. Do not use it, and specify other arguments as keyword arguments.', uplevel: 1
|
813
815
|
end
|
814
816
|
if legacy_trim_mode != NOT_GIVEN
|
815
|
-
warn 'Passing trim_mode with the 3rd argument of ERB.new is deprecated. Use keyword argument like ERB.new(str, trim_mode: ...) instead.', uplevel: 1
|
817
|
+
warn 'Passing trim_mode with the 3rd argument of ERB.new is deprecated. Use keyword argument like ERB.new(str, trim_mode: ...) instead.', uplevel: 1
|
816
818
|
trim_mode = legacy_trim_mode
|
817
819
|
end
|
818
820
|
if legacy_eoutvar != NOT_GIVEN
|
819
|
-
warn 'Passing eoutvar with the 4th argument of ERB.new is deprecated. Use keyword argument like ERB.new(str, eoutvar: ...) instead.', uplevel: 1
|
821
|
+
warn 'Passing eoutvar with the 4th argument of ERB.new is deprecated. Use keyword argument like ERB.new(str, eoutvar: ...) instead.', uplevel: 1
|
820
822
|
eoutvar = legacy_eoutvar
|
821
823
|
end
|
822
824
|
|
@@ -829,8 +831,6 @@ class ERB
|
|
829
831
|
end
|
830
832
|
NOT_GIVEN = Object.new
|
831
833
|
private_constant :NOT_GIVEN
|
832
|
-
ZERO_SAFE_LEVELS = [0, nil]
|
833
|
-
private_constant :ZERO_SAFE_LEVELS
|
834
834
|
|
835
835
|
##
|
836
836
|
# Creates a new compiler for ERB. See ERB::Compiler.new for details
|
data/lib/erb/version.rb
ADDED
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: erb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masatoshi SEKI
|
8
8
|
autorequire:
|
9
9
|
bindir: libexec
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
12
|
-
dependencies:
|
11
|
+
date: 2021-01-21 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: cgi
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
13
27
|
description: An easy to use but powerful templating system for Ruby.
|
14
28
|
email:
|
15
29
|
- seki@ruby-lang.org
|
@@ -22,12 +36,14 @@ files:
|
|
22
36
|
- ".gitignore"
|
23
37
|
- Gemfile
|
24
38
|
- LICENSE.txt
|
39
|
+
- NEWS.md
|
25
40
|
- README.md
|
26
41
|
- Rakefile
|
27
42
|
- bin/console
|
28
43
|
- bin/setup
|
29
44
|
- erb.gemspec
|
30
45
|
- lib/erb.rb
|
46
|
+
- lib/erb/version.rb
|
31
47
|
- libexec/erb
|
32
48
|
homepage: https://github.com/ruby/erb
|
33
49
|
licenses:
|
@@ -51,7 +67,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
51
67
|
- !ruby/object:Gem::Version
|
52
68
|
version: '0'
|
53
69
|
requirements: []
|
54
|
-
rubygems_version: 3.
|
70
|
+
rubygems_version: 3.3.0.dev
|
55
71
|
signing_key:
|
56
72
|
specification_version: 4
|
57
73
|
summary: An easy to use but powerful templating system for Ruby.
|