зеркало из https://github.com/github/ruby.git
[ruby/time] Expose Time::VERSION
https://github.com/ruby/time/commit/32793b56b7
This commit is contained in:
Родитель
cf77f7b5e7
Коммит
f09638fe25
|
@ -1,6 +1,13 @@
|
|||
name = File.basename(__FILE__, ".gemspec")
|
||||
version = ["lib", Array.new(name.count("-")+1).join("/")].find do |dir|
|
||||
break File.foreach(File.join(__dir__, dir, "#{name.tr('-', '/')}.rb")) do |line|
|
||||
/^\s*VERSION\s*=\s*"(.*)"/ =~ line and break $1
|
||||
end rescue nil
|
||||
end
|
||||
|
||||
Gem::Specification.new do |spec|
|
||||
spec.name = "time"
|
||||
spec.version = "0.2.2"
|
||||
spec.name = name
|
||||
spec.version = version
|
||||
spec.authors = ["Tanaka Akira"]
|
||||
spec.email = ["akr@fsij.org"]
|
||||
|
||||
|
|
|
@ -25,6 +25,9 @@ require 'date'
|
|||
# :startdoc:
|
||||
|
||||
class Time
|
||||
|
||||
VERSION = "0.2.2"
|
||||
|
||||
class << Time
|
||||
|
||||
#
|
||||
|
|
Загрузка…
Ссылка в новой задаче