зеркало из https://github.com/github/ruby.git
[ruby/resolv] Expose Resolv::VERSION
https://github.com/ruby/resolv/commit/6ab2385e89
This commit is contained in:
Родитель
ebe620def6
Коммит
652f273308
|
@ -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 = "resolv"
|
||||
spec.version = "0.2.2"
|
||||
spec.name = name
|
||||
spec.version = version
|
||||
spec.authors = ["Tanaka Akira"]
|
||||
spec.email = ["akr@fsij.org"]
|
||||
|
||||
|
|
|
@ -37,6 +37,8 @@ end
|
|||
|
||||
class Resolv
|
||||
|
||||
VERSION = "0.2.2"
|
||||
|
||||
##
|
||||
# Looks up the first IP address for +name+.
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче