[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:
parent
da31900d9d
commit
7fb12be99f
@ -85,6 +85,7 @@ module Net
|
|||||||
end
|
end
|
||||||
|
|
||||||
# :stopdoc:
|
# :stopdoc:
|
||||||
|
VERSION = "0.1.0"
|
||||||
FTP_PORT = 21
|
FTP_PORT = 21
|
||||||
CRLF = "\r\n"
|
CRLF = "\r\n"
|
||||||
DEFAULT_BLOCKSIZE = BufferedIO::BUFSIZE
|
DEFAULT_BLOCKSIZE = BufferedIO::BUFSIZE
|
||||||
|
@ -1,12 +1,14 @@
|
|||||||
begin
|
name = File.basename(__FILE__, ".gemspec")
|
||||||
require_relative 'lib/net/ftp/version'
|
version = nil
|
||||||
rescue LoadError # Fallback to load version file in ruby core repository
|
["lib", "../.."].find do |dir|
|
||||||
require_relative "version"
|
version = File.foreach(File.join(__dir__, dir, "#{name.tr('-', '/')}.rb")) do |line|
|
||||||
|
/^\s*VERSION\s*=\s*"(.*)"/ =~ line and break $1
|
||||||
|
end rescue nil
|
||||||
end
|
end
|
||||||
|
|
||||||
Gem::Specification.new do |spec|
|
Gem::Specification.new do |spec|
|
||||||
spec.name = "net-ftp"
|
spec.name = "net-ftp"
|
||||||
spec.version = Net::Ftp::VERSION
|
spec.version = version
|
||||||
spec.authors = ["Shugo Maeda"]
|
spec.authors = ["Shugo Maeda"]
|
||||||
spec.email = ["shugo@ruby-lang.org"]
|
spec.email = ["shugo@ruby-lang.org"]
|
||||||
|
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
module Net
|
|
||||||
module Ftp
|
|
||||||
VERSION = "0.1.0"
|
|
||||||
end
|
|
||||||
end
|
|
Loading…
x
Reference in New Issue
Block a user