mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Extract version number from the source
"requiring version.rb" strategy has some issues. - cannot work when cross-compiling - often introduces wrong namespace - must know the superclasses - costs at each runtime than at build-time etc.
This commit is contained in:
parent
cfbae7dae0
commit
b2d96abb42
Notes:
git
2020-07-30 19:03:45 +09:00
53 changed files with 190 additions and 186 deletions
|
@ -288,6 +288,7 @@
|
|||
#
|
||||
|
||||
class CGI
|
||||
VERSION = "0.1.0"
|
||||
end
|
||||
|
||||
require 'cgi/core'
|
||||
|
|
|
@ -1,12 +1,15 @@
|
|||
begin
|
||||
require_relative "lib/cgi/version"
|
||||
rescue LoadError # Fallback to load version file in ruby core repository
|
||||
require_relative "version"
|
||||
# frozen_string_literal: true
|
||||
|
||||
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 = "cgi"
|
||||
spec.version = CGI::VERSION
|
||||
spec.name = name
|
||||
spec.version = version
|
||||
spec.authors = ["Yukihiro Matsumoto"]
|
||||
spec.email = ["matz@ruby-lang.org"]
|
||||
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
class CGI
|
||||
VERSION = "0.1.0"
|
||||
end
|
|
@ -39,6 +39,8 @@
|
|||
# Be advised, RDoc will not detect delegated methods.
|
||||
#
|
||||
class Delegator < BasicObject
|
||||
VERSION = "0.1.0"
|
||||
|
||||
kernel = ::Kernel.dup
|
||||
kernel.class_eval do
|
||||
alias __raise__ raise
|
||||
|
|
|
@ -1,12 +1,15 @@
|
|||
begin
|
||||
require_relative "lib/delegate/version"
|
||||
rescue LoadError # Fallback to load version file in ruby core repository
|
||||
require_relative "version"
|
||||
# frozen_string_literal: true
|
||||
|
||||
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 = "delegate"
|
||||
spec.version = Delegator::VERSION
|
||||
spec.name = name
|
||||
spec.version = version
|
||||
spec.authors = ["Yukihiro Matsumoto"]
|
||||
spec.email = ["matz@ruby-lang.org"]
|
||||
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
class Delegator < BasicObject
|
||||
VERSION = "0.1.0"
|
||||
end
|
|
@ -110,7 +110,10 @@
|
|||
#
|
||||
module Forwardable
|
||||
require 'forwardable/impl'
|
||||
require "forwardable/version"
|
||||
|
||||
# Version of +forwardable.rb+
|
||||
VERSION = "1.3.1"
|
||||
FORWARDABLE_VERSION = VERSION
|
||||
|
||||
@debug = nil
|
||||
class << self
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
begin
|
||||
require_relative "lib/forwardable/version"
|
||||
rescue LoadError
|
||||
# for Ruby core repository
|
||||
require_relative "version"
|
||||
# frozen_string_literal: true
|
||||
|
||||
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 = "forwardable"
|
||||
spec.version = Forwardable::VERSION
|
||||
spec.name = name
|
||||
spec.version = version
|
||||
spec.authors = ["Keiju ISHITSUKA"]
|
||||
spec.email = ["keiju@ruby-lang.org"]
|
||||
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
module Forwardable
|
||||
# Version of +forwardable.rb+
|
||||
VERSION = "1.3.1"
|
||||
FORWARDABLE_VERSION = VERSION
|
||||
end
|
|
@ -85,6 +85,9 @@
|
|||
# hello -n 6 --name -- /tmp
|
||||
#
|
||||
class GetoptLong
|
||||
# Version.
|
||||
VERSION = "0.1.0"
|
||||
|
||||
#
|
||||
# Orderings.
|
||||
#
|
||||
|
|
|
@ -1,12 +1,15 @@
|
|||
begin
|
||||
require_relative "lib/getoptlong/version"
|
||||
rescue LoadError # Fallback to load version file in ruby core repository
|
||||
require_relative "version"
|
||||
# frozen_string_literal: true
|
||||
|
||||
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 = "getoptlong"
|
||||
spec.version = GetoptLong::VERSION
|
||||
spec.name = name
|
||||
spec.version = version
|
||||
spec.authors = ["Yukihiro Matsumoto"]
|
||||
spec.email = ["matz@ruby-lang.org"]
|
||||
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
class GetoptLong
|
||||
VERSION = "0.1.0"
|
||||
end
|
|
@ -1,13 +1,14 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
name = File.basename(__FILE__, ".gemspec")
|
||||
version = nil
|
||||
["lib", "../.."].find do |dir|
|
||||
version = File.foreach(File.join(__dir__, dir, "#{name.tr('-', '/')}.rb")) do |line|
|
||||
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 = "net-ftp"
|
||||
spec.name = name
|
||||
spec.version = version
|
||||
spec.authors = ["Shugo Maeda"]
|
||||
spec.email = ["shugo@ruby-lang.org"]
|
||||
|
|
|
@ -388,6 +388,7 @@ module Net #:nodoc:
|
|||
class HTTP < Protocol
|
||||
|
||||
# :stopdoc:
|
||||
VERSION = "0.1.0"
|
||||
Revision = %q$Revision$.split[1]
|
||||
HTTPVersion = '1.1'
|
||||
begin
|
||||
|
|
|
@ -1,12 +1,15 @@
|
|||
begin
|
||||
require_relative "lib/net/http/version"
|
||||
rescue LoadError # Fallback to load version file in ruby core repository
|
||||
require_relative "version"
|
||||
# frozen_string_literal: true
|
||||
|
||||
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 = "net-http"
|
||||
spec.version = Net::Http::VERSION
|
||||
spec.name = name
|
||||
spec.version = version
|
||||
spec.authors = ["NARUSE, Yui"]
|
||||
spec.email = ["naruse@airemix.jp"]
|
||||
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
module Net
|
||||
module Http
|
||||
VERSION = "0.1.0"
|
||||
end
|
||||
end
|
|
@ -201,6 +201,8 @@ module Net
|
|||
# Unicode", RFC 2152, May 1997.
|
||||
#
|
||||
class IMAP < Protocol
|
||||
VERSION = "0.1.0"
|
||||
|
||||
include MonitorMixin
|
||||
if defined?(OpenSSL::SSL)
|
||||
include OpenSSL
|
||||
|
|
|
@ -1,12 +1,15 @@
|
|||
begin
|
||||
require_relative 'lib/net/imap/version'
|
||||
rescue LoadError # Fallback to load version file in ruby core repository
|
||||
require_relative "version"
|
||||
# frozen_string_literal: true
|
||||
|
||||
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 = "net-imap"
|
||||
spec.version = Net::Imap::VERSION
|
||||
spec.name = name
|
||||
spec.version = version
|
||||
spec.authors = ["Shugo Maeda"]
|
||||
spec.email = ["shugo@ruby-lang.org"]
|
||||
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
module Net
|
||||
module Imap
|
||||
VERSION = "0.1.0"
|
||||
end
|
||||
end
|
|
@ -194,9 +194,8 @@ module Net
|
|||
# String. Normally the unique-id is a hash of the message.
|
||||
#
|
||||
class POP3 < Protocol
|
||||
|
||||
# svn revision of this library
|
||||
Revision = %q$Revision$.split[1]
|
||||
# version of this library
|
||||
VERSION = "0.1.0"
|
||||
|
||||
#
|
||||
# Class Parameters
|
||||
|
|
|
@ -1,12 +1,15 @@
|
|||
begin
|
||||
require_relative "lib/net/pop/version"
|
||||
rescue LoadError # Fallback to load version file in ruby core repository
|
||||
require_relative "version"
|
||||
# frozen_string_literal: true
|
||||
|
||||
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 = "net-pop"
|
||||
spec.version = Net::POP3::VERSION
|
||||
spec.name = name
|
||||
spec.version = version
|
||||
spec.authors = ["Yukihiro Matsumoto"]
|
||||
spec.email = ["matz@ruby-lang.org"]
|
||||
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
module Net
|
||||
class Protocol; end
|
||||
class POP3 < Protocol
|
||||
VERSION = "0.1.0"
|
||||
end
|
||||
end
|
|
@ -26,6 +26,8 @@ require 'io/wait'
|
|||
module Net # :nodoc:
|
||||
|
||||
class Protocol #:nodoc: internal use only
|
||||
VERSION = "0.1.0"
|
||||
|
||||
private
|
||||
def Protocol.protocol_param(name, val)
|
||||
module_eval(<<-End, __FILE__, __LINE__ + 1)
|
||||
|
|
|
@ -1,12 +1,15 @@
|
|||
begin
|
||||
require_relative "lib/net/protocol/version"
|
||||
rescue LoadError # Fallback to load version file in ruby core repository
|
||||
require_relative "version"
|
||||
# frozen_string_literal: true
|
||||
|
||||
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 = "net-protocol"
|
||||
spec.version = Net::Protocol::VERSION
|
||||
spec.name = name
|
||||
spec.version = version
|
||||
spec.authors = ["Yukihiro Matsumoto"]
|
||||
spec.email = ["matz@ruby-lang.org"]
|
||||
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
module Net
|
||||
class Protocol
|
||||
VERSION = "0.1.0"
|
||||
end
|
||||
end
|
|
@ -168,6 +168,7 @@ module Net
|
|||
# 'Your Account', 'Your Password', :cram_md5)
|
||||
#
|
||||
class SMTP < Protocol
|
||||
VERSION = "0.1.0"
|
||||
|
||||
Revision = %q$Revision$.split[1]
|
||||
|
||||
|
|
|
@ -1,12 +1,15 @@
|
|||
begin
|
||||
require_relative "lib/net/smtp/version"
|
||||
rescue LoadError # Fallback to load version file in ruby core repository
|
||||
require_relative "version"
|
||||
# frozen_string_literal: true
|
||||
|
||||
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 = "net-smtp"
|
||||
spec.version = Net::SMTP::VERSION
|
||||
spec.name = name
|
||||
spec.version = version
|
||||
spec.authors = ["Yukihiro Matsumoto"]
|
||||
spec.email = ["matz@ruby-lang.org"]
|
||||
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
module Net
|
||||
class Protocol; end
|
||||
class SMTP < Protocol
|
||||
VERSION = "0.1.0"
|
||||
end
|
||||
end
|
|
@ -136,6 +136,7 @@
|
|||
# ticker.add_observer(warner, :call)
|
||||
# ticker.run
|
||||
module Observable
|
||||
VERSION = "0.1.0"
|
||||
|
||||
#
|
||||
# Add +observer+ as an observer on this object. So that it will receive
|
||||
|
|
|
@ -1,12 +1,15 @@
|
|||
begin
|
||||
require_relative "lib/observer/version"
|
||||
rescue LoadError # Fallback to load version file in ruby core repository
|
||||
require_relative "version"
|
||||
# frozen_string_literal: true
|
||||
|
||||
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 = "observer"
|
||||
spec.version = Observer::VERSION
|
||||
spec.name = name
|
||||
spec.version = version
|
||||
spec.authors = ["Yukihiro Matsumoto"]
|
||||
spec.email = ["matz@ruby-lang.org"]
|
||||
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
module Observer
|
||||
VERSION = "0.1.0"
|
||||
end
|
|
@ -30,6 +30,7 @@
|
|||
#
|
||||
|
||||
module Open3
|
||||
VERSION = "0.1.0"
|
||||
|
||||
# Open stdin, stdout, and stderr streams and start external executable.
|
||||
# In addition, a thread to wait for the started process is created.
|
||||
|
|
|
@ -1,12 +1,15 @@
|
|||
begin
|
||||
require_relative "lib/open3/version"
|
||||
rescue LoadError # Fallback to load version file in ruby core repository
|
||||
require_relative "version"
|
||||
# frozen_string_literal: true
|
||||
|
||||
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 = "open3"
|
||||
spec.version = Open3::VERSION
|
||||
spec.name = name
|
||||
spec.version = version
|
||||
spec.authors = ["Yukihiro Matsumoto"]
|
||||
spec.email = ["matz@ruby-lang.org"]
|
||||
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
module Open3
|
||||
VERSION = "0.1.0"
|
||||
end
|
|
@ -1,7 +1,8 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
name = File.basename(__FILE__, ".gemspec")
|
||||
version = nil
|
||||
["lib", ".."].find do |dir|
|
||||
version = File.foreach(File.join(__dir__, dir, "#{name}.rb")) do |line|
|
||||
version = ["lib", Array.new(name.count("-")+1, "..").join("/")].find do |dir|
|
||||
break File.foreach(File.join(__dir__, dir, "#{name.tr('-', '/')}.rb")) do |line|
|
||||
/^\s*OptionParser::Version\s*=\s*"(.*)"/ =~ line and break $1
|
||||
end rescue nil
|
||||
end
|
||||
|
|
|
@ -9,8 +9,6 @@
|
|||
# See OpenStruct for an example.
|
||||
#
|
||||
|
||||
require_relative 'ostruct/version'
|
||||
|
||||
#
|
||||
# An OpenStruct is a data structure, similar to a Hash, that allows the
|
||||
# definition of arbitrary attributes with their accompanying values. This is
|
||||
|
@ -75,6 +73,7 @@ require_relative 'ostruct/version'
|
|||
# of these properties compared to using a Hash or a Struct.
|
||||
#
|
||||
class OpenStruct
|
||||
VERSION = "0.2.0"
|
||||
|
||||
#
|
||||
# Creates a new OpenStruct object. By default, the resulting OpenStruct
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
begin
|
||||
require_relative "lib/ostruct/version"
|
||||
rescue LoadError
|
||||
# for Ruby core repository
|
||||
require_relative "version"
|
||||
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 = "ostruct"
|
||||
spec.version = OpenStruct::VERSION
|
||||
spec.name = name
|
||||
spec.version = version
|
||||
spec.authors = ["Marc-Andre Lafortune"]
|
||||
spec.email = ["ruby-core@marc-andre.ca"]
|
||||
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class OpenStruct
|
||||
VERSION = "0.2.0"
|
||||
end
|
|
@ -92,6 +92,8 @@ require "digest"
|
|||
# Needless to say, if you're storing valuable data with PStore, then you should
|
||||
# backup the PStore files from time to time.
|
||||
class PStore
|
||||
VERSION = "0.1.0"
|
||||
|
||||
RDWR_ACCESS = {mode: IO::RDWR | IO::CREAT | IO::BINARY, encoding: Encoding::ASCII_8BIT}.freeze
|
||||
RD_ACCESS = {mode: IO::RDONLY | IO::BINARY, encoding: Encoding::ASCII_8BIT}.freeze
|
||||
WR_ACCESS = {mode: IO::WRONLY | IO::CREAT | IO::TRUNC | IO::BINARY, encoding: Encoding::ASCII_8BIT}.freeze
|
||||
|
|
|
@ -1,12 +1,15 @@
|
|||
begin
|
||||
require_relative "lib/pstore/version"
|
||||
rescue LoadError # Fallback to load version file in ruby core repository
|
||||
require_relative "version"
|
||||
# frozen_string_literal: true
|
||||
|
||||
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 = "pstore"
|
||||
spec.version = PStore::VERSION
|
||||
spec.name = name
|
||||
spec.version = version
|
||||
spec.authors = ["Yukihiro Matsumoto"]
|
||||
spec.email = ["matz@ruby-lang.org"]
|
||||
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
class PStore
|
||||
VERSION = "0.1.0"
|
||||
end
|
|
@ -92,6 +92,8 @@
|
|||
# p a.strip # => nil
|
||||
#
|
||||
module Singleton
|
||||
VERSION = "0.1.0"
|
||||
|
||||
# Raises a TypeError to prevent cloning.
|
||||
def clone
|
||||
raise TypeError, "can't clone instance of singleton #{self.class}"
|
||||
|
|
|
@ -1,12 +1,15 @@
|
|||
begin
|
||||
require_relative "lib/singleton/version"
|
||||
rescue LoadError # Fallback to load version file in ruby core repository
|
||||
require_relative "version"
|
||||
# frozen_string_literal: true
|
||||
|
||||
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 = "singleton"
|
||||
spec.version = Singleton::VERSION
|
||||
spec.name = name
|
||||
spec.version = version
|
||||
spec.authors = ["Yukihiro Matsumoto"]
|
||||
spec.email = ["matz@ruby-lang.org"]
|
||||
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
module Singleton
|
||||
VERSION = "0.1.0"
|
||||
end
|
|
@ -23,6 +23,8 @@
|
|||
# Copyright:: (C) 2000 Information-technology Promotion Agency, Japan
|
||||
|
||||
module Timeout
|
||||
VERSION = "0.1.0"
|
||||
|
||||
# Raised by Timeout.timeout when the block times out.
|
||||
class Error < RuntimeError
|
||||
attr_reader :thread
|
||||
|
|
|
@ -1,12 +1,15 @@
|
|||
begin
|
||||
require_relative "lib/timeout/version"
|
||||
rescue LoadError # Fallback to load version file in ruby core repository
|
||||
require_relative "version"
|
||||
# frozen_string_literal: true
|
||||
|
||||
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 = "timeout"
|
||||
spec.version = Timeout::VERSION
|
||||
spec.name = name
|
||||
spec.version = version
|
||||
spec.authors = ["Yukihiro Matsumoto"]
|
||||
spec.email = ["matz@ruby-lang.org"]
|
||||
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
module Timeout
|
||||
VERSION = "0.1.0"
|
||||
end
|
|
@ -60,6 +60,7 @@
|
|||
# by Keiju ISHITSUKA(keiju@ishitsuka.com)
|
||||
#
|
||||
class Tracer
|
||||
VERSION = "0.1.0"
|
||||
|
||||
class << self
|
||||
# display additional debug information (defaults to false)
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
begin
|
||||
require_relative "lib/tracer/version"
|
||||
rescue LoadError
|
||||
# for Ruby core repository
|
||||
require_relative "version"
|
||||
# frozen_string_literal: true
|
||||
|
||||
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 = "tracer"
|
||||
spec.version = Tracer::VERSION
|
||||
spec.name = name
|
||||
spec.version = version
|
||||
spec.authors = ["Keiju ISHITSUKA"]
|
||||
spec.email = ["keiju@ruby-lang.org"]
|
||||
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Tracer
|
||||
VERSION = "0.1.0"
|
||||
end
|
|
@ -17,6 +17,7 @@ require "delegate"
|
|||
#
|
||||
|
||||
class WeakRef < Delegator
|
||||
VERSION = "0.1.0"
|
||||
|
||||
##
|
||||
# RefError is raised when a referenced object has been recycled by the
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
module Weakref
|
||||
VERSION = "0.1.0"
|
||||
end
|
|
@ -1,10 +1,15 @@
|
|||
lib = File.expand_path("lib", __dir__)
|
||||
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
||||
require "weakref/version"
|
||||
# frozen_string_literal: true
|
||||
|
||||
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 = "weakref"
|
||||
spec.version = Weakref::VERSION
|
||||
spec.name = name
|
||||
spec.version = version
|
||||
spec.authors = ["Yukihiro Matsumoto"]
|
||||
spec.email = ["matz@ruby-lang.org"]
|
||||
|
||||
|
|
Loading…
Reference in a new issue