diff --git a/doc/maintainers.rdoc b/doc/maintainers.rdoc index f486729f26..1f32b2dd6e 100644 --- a/doc/maintainers.rdoc +++ b/doc/maintainers.rdoc @@ -99,8 +99,6 @@ Zachary Scott (zzak) WATANABE Hirofumi (eban) [lib/unicode_normalize.rb, lib/unicode_normalize/*] Martin J. Dürst -[lib/uri.rb, lib/uri/*] - YAMADA, Akira (akira) [lib/weakref.rb] _unmaintained_ @@ -263,6 +261,9 @@ Zachary Scott (zzak) [lib/tracer.rb] Keiju ISHITSUKA (keiju) https://github.com/ruby/tracer +[lib/uri.rb, lib/uri/*] + YAMADA, Akira (akira) + https://github.com/ruby/uri [lib/webrick.rb, lib/webrick/*] Eric Wong (normalperson) https://bugs.ruby-lang.org/ diff --git a/doc/standard_library.rdoc b/doc/standard_library.rdoc index 4927ea1be8..b8b445acf0 100644 --- a/doc/standard_library.rdoc +++ b/doc/standard_library.rdoc @@ -37,7 +37,6 @@ Time:: Extends the Time class with methods for parsing and conversion tmpdir.rb:: Extends the Dir class to manage the OS temporary file path TSort:: Topological sorting using Tarjan's algorithm un.rb:: Utilities to replace common UNIX commands -URI:: A Ruby module providing support for Uniform Resource Identifiers WeakRef:: Allows a referenced object to be garbage-collected == Extensions @@ -86,6 +85,7 @@ RSS:: Family of libraries that support various formats of XML "feeds" Singleton:: Implementation of the Singleton pattern for Ruby Timeout:: Auto-terminate potentially long-running operations in Ruby Tracer:: Outputs a source level execution trace of a Ruby program +URI:: A Ruby module providing support for Uniform Resource Identifiers WEBrick:: An HTTP server toolkit for Ruby YAML:: Ruby client library for the Psych YAML implementation diff --git a/lib/uri.rb b/lib/uri.rb index 9b6bde91c0..ea8ea3e18c 100644 --- a/lib/uri.rb +++ b/lib/uri.rb @@ -90,13 +90,9 @@ # module URI - # :stopdoc: - VERSION_CODE = '001000'.freeze - VERSION = VERSION_CODE.scan(/../).collect{|n| n.to_i}.join('.').freeze - # :startdoc: - end +require 'uri/version' require 'uri/common' require 'uri/generic' require 'uri/file' diff --git a/lib/uri/uri.gemspec b/lib/uri/uri.gemspec new file mode 100644 index 0000000000..5c51721755 --- /dev/null +++ b/lib/uri/uri.gemspec @@ -0,0 +1,29 @@ +begin + require_relative "lib/uri/version" +rescue LoadError # Fallback to load version file in ruby core repository + require_relative "version" +end + +Gem::Specification.new do |spec| + spec.name = "uri" + spec.version = URI::VERSION + spec.authors = ["Akira Yamada"] + spec.email = ["akira@ruby-lang.org"] + + spec.summary = %q{URI is a module providing classes to handle Uniform Resource Identifiers} + spec.description = spec.summary + spec.homepage = "https://github.com/ruby/uri" + spec.license = "BSD-2-Clause" + + spec.metadata["homepage_uri"] = spec.homepage + spec.metadata["source_code_uri"] = spec.homepage + + # Specify which files should be added to the gem when it is released. + # The `git ls-files -z` loads the files in the RubyGem that have been added into git. + spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do + `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } + end + spec.bindir = "exe" + spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } + spec.require_paths = ["lib"] +end diff --git a/lib/uri/version.rb b/lib/uri/version.rb new file mode 100644 index 0000000000..4f54113393 --- /dev/null +++ b/lib/uri/version.rb @@ -0,0 +1,6 @@ +module URI + # :stopdoc: + VERSION_CODE = '001000'.freeze + VERSION = VERSION_CODE.scan(/../).collect{|n| n.to_i}.join('.').freeze + # :startdoc: +end diff --git a/tool/sync_default_gems.rb b/tool/sync_default_gems.rb index edebeb330f..81e687d336 100644 --- a/tool/sync_default_gems.rb +++ b/tool/sync_default_gems.rb @@ -47,6 +47,7 @@ # * https://github.com/ruby/observer # * https://github.com/ruby/timeout # * https://github.com/ruby/yaml +# * https://github.com/ruby/uri # require 'fileutils' @@ -101,6 +102,7 @@ $repositories = { observer: "ruby/observer", timeout: "ruby/timeout", yaml: "ruby/yaml", + uri: "ruby/uri", } def sync_default_gems(gem)