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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 59e65e447aa2698cab1c4f1f99322edabac2a8e480fb885c711529464f6842c8
4
- data.tar.gz: 72e69acb55471846d7d07240a4c1ff023d0a6719ed24d9564f029dfd97b81402
3
+ metadata.gz: '01739493c4f94b1cbd857610841a3624128b27169fa240f53e2330c2872f2529'
4
+ data.tar.gz: 7a2c9c412d89a60b667693430817954d51d64d847281abdfdf10e30744d667e5
5
5
  SHA512:
6
- metadata.gz: ea5447f6851f8752637b1b93aae084d58479808f65f11c3dd1d946e7f005cf4c0b1d607428f398ba2597b5ee48cc8c1e44bfdb6074eeb819b781d1c5d66dc927
7
- data.tar.gz: 17bede5cf619b2d9d5f8d983835e9664dcd901920727071b59ba37698a0cc1f31624eef8a6132f14de780975f1f49860381103d7f54b0ad325104e8111ab1e0a
6
+ metadata.gz: a41631d80b14792baec004808d717a404efce49af75e345527ebca67e30f2823c3a5afd5409f625865b616535ef18a205e9c26ecfeabe2693e251c252e360cf4
7
+ data.tar.gz: c40541520a0c5d1b74c6baa973eb85d77b13d06857081eadc0b9df703c7314b6f9f895c73cc50500dd1dc91b73e53f2b66828449c142e81b9001d64a16efc8e1
@@ -7,8 +7,13 @@ jobs:
7
7
  name: build (${{ matrix.ruby }} / ${{ matrix.os }})
8
8
  strategy:
9
9
  matrix:
10
- ruby: [ 2.7, 2.6, 2.5, head ]
11
- os: [ ubuntu-latest, macos-latest ]
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
@@ -1,4 +1,6 @@
1
- source "https://rubygems.org"
1
+ source 'https://rubygems.org'
2
2
 
3
- gem "rake"
4
- gem "test-unit"
3
+ gemspec
4
+
5
+ gem 'rake'
6
+ gem 'test-unit'
data/NEWS.md ADDED
@@ -0,0 +1,5 @@
1
+ # Change Log
2
+
3
+ ## 2.2.0
4
+
5
+ - Ruby 3.0 promoted ERB to a default gem
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
- # Erb
1
+ # ERB
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/erb`. To experiment with that code, run `bin/console` for an interactive prompt.
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/hsbt/erb.
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 "bundler/gem_tasks"
2
- require "rake/testtask"
1
+ require 'bundler/gem_tasks'
2
+ require 'rake/testtask'
3
3
 
4
4
  Rake::TestTask.new(:test) do |t|
5
- t.libs << "test/lib"
6
- t.ruby_opts << "-rhelper"
7
- t.test_files = FileList["test/**/test_*.rb"]
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 :default => :test
10
+ task default: :test
@@ -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 = "erb"
3
- spec.version = "2.2.0"
4
- spec.authors = ["Masatoshi SEKI"]
5
- spec.email = ["seki@ruby-lang.org"]
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 = "https://github.com/ruby/erb"
10
- spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
11
- spec.licenses = ["Ruby", "BSD-2-Clause"]
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["homepage_uri"] = spec.homepage
14
- spec.metadata["source_code_uri"] = spec.homepage
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("..", __FILE__)) do
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 = "libexec"
20
- spec.executables = ["erb"]
21
- spec.require_paths = ["lib"]
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 "cgi/util"
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 [2.2.0 #{ERB::Revision.split[1]}]"
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 if $VERBOSE || !ZERO_SAFE_LEVELS.include?(safe_level)
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 if $VERBOSE
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 if $VERBOSE
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
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+ class ERB
3
+ VERSION = '2.2.1'
4
+ private_constant :VERSION
5
+ end
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.0
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: 2020-09-18 00:00:00.000000000 Z
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.2.0.rc.1
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.