[ruby/tsort] Expose TSort::VERSION

https://github.com/ruby/tsort/commit/09f2275958
This commit is contained in:
Hiroshi SHIBATA 2023-03-30 14:17:44 +09:00 committed by git
parent a70653ca7f
commit 6dcd399976
2 changed files with 12 additions and 2 deletions

View File

@ -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 = "tsort"
spec.version = "0.1.1"
spec.name = name
spec.version = version
spec.authors = ["Tanaka Akira"]
spec.email = ["akr@fsij.org"]

View File

@ -122,6 +122,9 @@
#
module TSort
VERSION = "0.1.1"
class Cyclic < StandardError
end