[ruby/erb] Unify ERB version definitions
https://github.com/ruby/erb/commit/5df06b8473
This commit is contained in:
parent
084662dc9f
commit
5f7df72b56
@ -1,6 +1,13 @@
|
|||||||
|
begin
|
||||||
|
require_relative 'lib/erb/version'
|
||||||
|
rescue LoadError
|
||||||
|
# for Ruby core repository
|
||||||
|
require_relative 'version'
|
||||||
|
end
|
||||||
|
|
||||||
Gem::Specification.new do |spec|
|
Gem::Specification.new do |spec|
|
||||||
spec.name = 'erb'
|
spec.name = 'erb'
|
||||||
spec.version = '2.2.0'
|
spec.version = ERB.const_get(:VERSION, false)
|
||||||
spec.authors = ['Masatoshi SEKI']
|
spec.authors = ['Masatoshi SEKI']
|
||||||
spec.email = ['seki@ruby-lang.org']
|
spec.email = ['seki@ruby-lang.org']
|
||||||
|
|
||||||
|
@ -12,7 +12,8 @@
|
|||||||
#
|
#
|
||||||
# You can redistribute it and/or modify it under the same terms as Ruby.
|
# You can redistribute it and/or modify it under the same terms as Ruby.
|
||||||
|
|
||||||
require "cgi/util"
|
require 'cgi/util'
|
||||||
|
require 'erb/version'
|
||||||
|
|
||||||
#
|
#
|
||||||
# = ERB -- Ruby Templating
|
# = ERB -- Ruby Templating
|
||||||
@ -260,7 +261,7 @@ class ERB
|
|||||||
|
|
||||||
# Returns revision information for the erb.rb module.
|
# Returns revision information for the erb.rb module.
|
||||||
def self.version
|
def self.version
|
||||||
"erb.rb [2.2.0 #{ERB::Revision.split[1]}]"
|
"erb.rb [#{VERSION} #{ERB::Revision.split[1]}]"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
5
lib/erb/version.rb
Normal file
5
lib/erb/version.rb
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# frozen_string_literal: false
|
||||||
|
class ERB
|
||||||
|
VERSION = '2.2.0'
|
||||||
|
private_constant :VERSION
|
||||||
|
end
|
Loading…
x
Reference in New Issue
Block a user