[ruby/tempfile] Expose Tempfile::VERSION
https://github.com/ruby/tempfile/commit/6aa1f37dc4
This commit is contained in:
parent
84d11498c2
commit
8b924ebdf2
@ -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 = "tempfile"
|
||||
spec.version = "0.1.3"
|
||||
spec.name = name
|
||||
spec.version = version
|
||||
spec.authors = ["Yukihiro Matsumoto"]
|
||||
spec.email = ["matz@ruby-lang.org"]
|
||||
|
||||
|
@ -88,6 +88,8 @@ require 'tmpdir'
|
||||
# mutex.
|
||||
class Tempfile < DelegateClass(File)
|
||||
|
||||
VERSION = "0.1.3"
|
||||
|
||||
# Creates a file in the underlying file system;
|
||||
# returns a new \Tempfile object based on that file.
|
||||
#
|
||||
|
Loading…
x
Reference in New Issue
Block a user