erb 2.2.0 → 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +7 -2
- data/Gemfile +5 -3
- data/NEWS.md +5 -0
- data/README.md +6 -9
- data/Rakefile +6 -6
- data/erb.gemspec +22 -13
- data/lib/erb.rb +6 -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: '01739493c4f94b1cbd857610841a3624128b27169fa240f53e2330c2872f2529'
|
4
|
+
data.tar.gz: 7a2c9c412d89a60b667693430817954d51d64d847281abdfdf10e30744d667e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a41631d80b14792baec004808d717a404efce49af75e345527ebca67e30f2823c3a5afd5409f625865b616535ef18a205e9c26ecfeabe2693e251c252e360cf4
|
7
|
+
data.tar.gz: c40541520a0c5d1b74c6baa973eb85d77b13d06857081eadc0b9df703c7314b6f9f895c73cc50500dd1dc91b73e53f2b66828449c142e81b9001d64a16efc8e1
|
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
|
@@ -260,7 +261,7 @@ class ERB
|
|
260
261
|
|
261
262
|
# Returns revision information for the erb.rb module.
|
262
263
|
def self.version
|
263
|
-
"erb.rb [
|
264
|
+
"erb.rb [#{VERSION} #{ERB::Revision.split[1]}]"
|
264
265
|
end
|
265
266
|
end
|
266
267
|
|
@@ -809,14 +810,14 @@ class ERB
|
|
809
810
|
def initialize(str, safe_level=NOT_GIVEN, legacy_trim_mode=NOT_GIVEN, legacy_eoutvar=NOT_GIVEN, trim_mode: nil, eoutvar: '_erbout')
|
810
811
|
# Complex initializer for $SAFE deprecation at [Feature #14256]. Use keyword arguments to pass trim_mode or eoutvar.
|
811
812
|
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
|
813
|
+
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
814
|
end
|
814
815
|
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
|
816
|
+
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
817
|
trim_mode = legacy_trim_mode
|
817
818
|
end
|
818
819
|
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
|
820
|
+
warn 'Passing eoutvar with the 4th argument of ERB.new is deprecated. Use keyword argument like ERB.new(str, eoutvar: ...) instead.', uplevel: 1
|
820
821
|
eoutvar = legacy_eoutvar
|
821
822
|
end
|
822
823
|
|
@@ -829,8 +830,6 @@ class ERB
|
|
829
830
|
end
|
830
831
|
NOT_GIVEN = Object.new
|
831
832
|
private_constant :NOT_GIVEN
|
832
|
-
ZERO_SAFE_LEVELS = [0, nil]
|
833
|
-
private_constant :ZERO_SAFE_LEVELS
|
834
833
|
|
835
834
|
##
|
836
835
|
# 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.1
|
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.
|