[ruby/find] Expose Find::VERSION
https://github.com/ruby/find/commit/a24124a08a
This commit is contained in:
parent
2f1586f6f2
commit
a70653ca7f
@ -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 = "find"
|
spec.name = name
|
||||||
spec.version = "0.1.1"
|
spec.version = version
|
||||||
spec.authors = ['Kazuki Tsujimoto']
|
spec.authors = ['Kazuki Tsujimoto']
|
||||||
spec.email = ['kazuki@callcc.net']
|
spec.email = ['kazuki@callcc.net']
|
||||||
|
|
||||||
|
@ -27,6 +27,8 @@
|
|||||||
#
|
#
|
||||||
module Find
|
module Find
|
||||||
|
|
||||||
|
VERSION = "0.1.1"
|
||||||
|
|
||||||
#
|
#
|
||||||
# Calls the associated block with the name of every file and directory listed
|
# Calls the associated block with the name of every file and directory listed
|
||||||
# as arguments, then recursively on their subdirectories, and so on.
|
# as arguments, then recursively on their subdirectories, and so on.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user