[ruby/net-ftp] Moved Net::Ftp::Version to Net::FTP

On case-insensitive filesystem, generated Net/FTP.html is
overwritten by Net/Ftp.html.

https://github.com/ruby/net-ftp/commit/14a6ff5134
This commit is contained in:
Nobuyoshi Nakada 2020-07-27 15:52:42 +09:00
parent da31900d9d
commit 7fb12be99f
3 changed files with 8 additions and 10 deletions

View File

@ -85,6 +85,7 @@ module Net
end
# :stopdoc:
VERSION = "0.1.0"
FTP_PORT = 21
CRLF = "\r\n"
DEFAULT_BLOCKSIZE = BufferedIO::BUFSIZE

View File

@ -1,12 +1,14 @@
begin
require_relative 'lib/net/ftp/version'
rescue LoadError # Fallback to load version file in ruby core repository
require_relative "version"
name = File.basename(__FILE__, ".gemspec")
version = nil
["lib", "../.."].find do |dir|
version = 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 = "net-ftp"
spec.version = Net::Ftp::VERSION
spec.version = version
spec.authors = ["Shugo Maeda"]
spec.email = ["shugo@ruby-lang.org"]

View File

@ -1,5 +0,0 @@
module Net
module Ftp
VERSION = "0.1.0"
end
end