[ruby/abbrev] Expose Abbrev::VERSION
https://github.com/ruby/abbrev/commit/255ca681c3
This commit is contained in:
parent
85ed226cca
commit
8b9b075b83
@ -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|
|
Gem::Specification.new do |spec|
|
||||||
spec.name = "abbrev"
|
spec.name = name
|
||||||
spec.version = "0.1.1"
|
spec.version = version
|
||||||
spec.authors = ["Akinori MUSHA"]
|
spec.authors = ["Akinori MUSHA"]
|
||||||
spec.email = ["knu@idaemons.org"]
|
spec.email = ["knu@idaemons.org"]
|
||||||
|
|
||||||
|
@ -48,6 +48,8 @@
|
|||||||
|
|
||||||
module Abbrev
|
module Abbrev
|
||||||
|
|
||||||
|
VERSION = "0.1.1"
|
||||||
|
|
||||||
# Given a set of strings, calculate the set of unambiguous abbreviations for
|
# Given a set of strings, calculate the set of unambiguous abbreviations for
|
||||||
# those strings, and return a hash where the keys are all the possible
|
# those strings, and return a hash where the keys are all the possible
|
||||||
# abbreviations and the values are the full strings.
|
# abbreviations and the values are the full strings.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user