uri 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7745ca16bcb1296a3d31816a6c93f6f75487e9fc25b354e31d1ac426e90205ca
4
- data.tar.gz: 1fa45ab9c8cf8d169a04966e736eba693f4f92e08fa9d3d56940c05fa5169541
3
+ metadata.gz: 5e32cdbfcc4ace0d2d7725f91df557f0f63cd09eedbacd13134457b5d6186b6b
4
+ data.tar.gz: a8afae357ba17c192629c04a27c615baac982d83659ed0ad56ec248e53eec823
5
5
  SHA512:
6
- metadata.gz: c7c73e1f12f5bb4a668a3c57d11b3fcf6b0ae0ed59eb40a33e6d1e6cf5f34919e965c6e4f9302d65d06faaf1f04f038246a87fd6b7d3df754bc3f10f245e102e
7
- data.tar.gz: f725b0282712bdb74d5643e0e1444a208f8430cf5d8a3149f705bd1b8808d32df52ce428fcf04857f156c041f81571250037bff9b20757bb56bce5f2877f6439
6
+ metadata.gz: 5fd294d6b44511a930257f6422525c100c8f5bb3cf9ecc9a8c2afbcda6bd2c863a0ece45450dc0bcb611de7815f8e5dcf398fa1c44f88dfb5df34fc111ffa98a
7
+ data.tar.gz: 022475711eb79ff13b44b19efdba281d50729f5517d01e68da2a6943192546ed2d2cacea17f7b01774e1b4ce8765dbdb79f81390f69f7cbc8d3935947755eca9
data/.document ADDED
@@ -0,0 +1,5 @@
1
+ BSDL
2
+ COPYING
3
+ README.md
4
+ docs/
5
+ lib/
data/.rdoc_options ADDED
@@ -0,0 +1,4 @@
1
+ main_page: README.md
2
+ op_dir: _site
3
+ warn_missing_rdoc_ref: true
4
+ title: URI Documentation
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  [![CI](https://github.com/ruby/uri/actions/workflows/test.yml/badge.svg)](https://github.com/ruby/uri/actions/workflows/test.yml)
4
4
  [![Yard Docs](https://img.shields.io/badge/docs-exist-blue.svg)](https://ruby.github.io/uri/)
5
5
 
6
- URI is a module providing classes to handle Uniform Resource Identifiers [RFC2396](http://tools.ietf.org/html/rfc2396).
6
+ URI is a module providing classes to handle Uniform Resource Identifiers [RFC3986](http://tools.ietf.org/html/rfc3986).
7
7
 
8
8
  ## Features
9
9
 
data/docs/kernel.rb ADDED
@@ -0,0 +1,2 @@
1
+ # :stopdoc:
2
+ module Kernel end
data/lib/uri/common.rb CHANGED
@@ -13,15 +13,19 @@ require_relative "rfc2396_parser"
13
13
  require_relative "rfc3986_parser"
14
14
 
15
15
  module URI
16
+ # The default parser instance for RFC 2396.
16
17
  RFC2396_PARSER = RFC2396_Parser.new
17
18
  Ractor.make_shareable(RFC2396_PARSER) if defined?(Ractor)
18
19
 
20
+ # The default parser instance for RFC 3986.
19
21
  RFC3986_PARSER = RFC3986_Parser.new
20
22
  Ractor.make_shareable(RFC3986_PARSER) if defined?(Ractor)
21
23
 
24
+ # The default parser instance.
22
25
  DEFAULT_PARSER = RFC3986_PARSER
23
26
  Ractor.make_shareable(DEFAULT_PARSER) if defined?(Ractor)
24
27
 
28
+ # Set the default parser instance.
25
29
  def self.parser=(parser = RFC3986_PARSER)
26
30
  remove_const(:Parser) if defined?(::URI::Parser)
27
31
  const_set("Parser", parser.class)
@@ -40,7 +44,7 @@ module URI
40
44
  end
41
45
  self.parser = RFC3986_PARSER
42
46
 
43
- def self.const_missing(const)
47
+ def self.const_missing(const) # :nodoc:
44
48
  if const == :REGEXP
45
49
  warn "URI::REGEXP is obsolete. Use URI::RFC2396_REGEXP explicitly.", uplevel: 1 if $VERBOSE
46
50
  URI::RFC2396_REGEXP
@@ -87,7 +91,7 @@ module URI
87
91
  module_function :make_components_hash
88
92
  end
89
93
 
90
- module Schemes
94
+ module Schemes # :nodoc:
91
95
  end
92
96
  private_constant :Schemes
93
97
 
@@ -305,7 +309,7 @@ module URI
305
309
  256.times do |i|
306
310
  TBLENCWWWCOMP_[-i.chr] = -('%%%02X' % i)
307
311
  end
308
- TBLENCURICOMP_ = TBLENCWWWCOMP_.dup.freeze
312
+ TBLENCURICOMP_ = TBLENCWWWCOMP_.dup.freeze # :nodoc:
309
313
  TBLENCWWWCOMP_[' '] = '+'
310
314
  TBLENCWWWCOMP_.freeze
311
315
  TBLDECWWWCOMP_ = {} # :nodoc:
data/lib/uri/generic.rb CHANGED
@@ -737,12 +737,12 @@ module URI
737
737
  end
738
738
  private :check_registry
739
739
 
740
- def set_registry(v) #:nodoc:
740
+ def set_registry(v) # :nodoc:
741
741
  raise InvalidURIError, "cannot set registry"
742
742
  end
743
743
  protected :set_registry
744
744
 
745
- def registry=(v)
745
+ def registry=(v) # :nodoc:
746
746
  raise InvalidURIError, "cannot set registry"
747
747
  end
748
748
 
@@ -1133,17 +1133,16 @@ module URI
1133
1133
  base.fragment=(nil)
1134
1134
 
1135
1135
  # RFC2396, Section 5.2, 4)
1136
- if !authority
1137
- base.set_path(merge_path(base.path, rel.path)) if base.path && rel.path
1138
- else
1139
- # RFC2396, Section 5.2, 4)
1140
- base.set_path(rel.path) if rel.path
1136
+ if authority
1137
+ base.set_userinfo(rel.userinfo)
1138
+ base.set_host(rel.host)
1139
+ base.set_port(rel.port || base.default_port)
1140
+ base.set_path(rel.path)
1141
+ elsif base.path && rel.path
1142
+ base.set_path(merge_path(base.path, rel.path))
1141
1143
  end
1142
1144
 
1143
1145
  # RFC2396, Section 5.2, 7)
1144
- base.set_userinfo(rel.userinfo) if rel.userinfo
1145
- base.set_host(rel.host) if rel.host
1146
- base.set_port(rel.port) if rel.port
1147
1146
  base.query = rel.query if rel.query
1148
1147
  base.fragment=(rel.fragment) if rel.fragment
1149
1148
 
@@ -1392,10 +1391,12 @@ module URI
1392
1391
  end
1393
1392
  end
1394
1393
 
1394
+ # Returns the hash value.
1395
1395
  def hash
1396
1396
  self.component_ary.hash
1397
1397
  end
1398
1398
 
1399
+ # Compares with _oth_ for Hash.
1399
1400
  def eql?(oth)
1400
1401
  self.class == oth.class &&
1401
1402
  parser == oth.parser &&
@@ -1438,7 +1439,7 @@ module URI
1438
1439
  end
1439
1440
  end
1440
1441
 
1441
- def inspect
1442
+ def inspect # :nodoc:
1442
1443
  "#<#{self.class} #{self}>"
1443
1444
  end
1444
1445
 
@@ -321,14 +321,14 @@ module URI
321
321
  str.gsub(escaped) { [$&[1, 2]].pack('H2').force_encoding(enc) }
322
322
  end
323
323
 
324
- @@to_s = Kernel.instance_method(:to_s)
325
- if @@to_s.respond_to?(:bind_call)
326
- def inspect
327
- @@to_s.bind_call(self)
324
+ TO_S = Kernel.instance_method(:to_s) # :nodoc:
325
+ if TO_S.respond_to?(:bind_call)
326
+ def inspect # :nodoc:
327
+ TO_S.bind_call(self)
328
328
  end
329
329
  else
330
- def inspect
331
- @@to_s.bind(self).call
330
+ def inspect # :nodoc:
331
+ TO_S.bind(self).call
332
332
  end
333
333
  end
334
334
 
data/lib/uri/version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module URI
2
2
  # :stopdoc:
3
- VERSION_CODE = '010002'.freeze
3
+ VERSION_CODE = '010003'.freeze
4
4
  VERSION = VERSION_CODE.scan(/../).collect{|n| n.to_i}.join('.').freeze
5
5
  # :startdoc:
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uri
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Akira Yamada
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-11-14 00:00:00.000000000 Z
11
+ date: 2025-02-26 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: URI is a module providing classes to handle Uniform Resource Identifiers
14
14
  email:
@@ -17,9 +17,12 @@ executables: []
17
17
  extensions: []
18
18
  extra_rdoc_files: []
19
19
  files:
20
+ - ".document"
21
+ - ".rdoc_options"
20
22
  - BSDL
21
23
  - COPYING
22
24
  - README.md
25
+ - docs/kernel.rb
23
26
  - lib/uri.rb
24
27
  - lib/uri/common.rb
25
28
  - lib/uri/file.rb
@@ -45,7 +48,7 @@ metadata:
45
48
  documentation_uri: https://ruby.github.io/uri/
46
49
  homepage_uri: https://github.com/ruby/uri
47
50
  source_code_uri: https://github.com/ruby/uri
48
- post_install_message:
51
+ post_install_message:
49
52
  rdoc_options: []
50
53
  require_paths:
51
54
  - lib
@@ -61,7 +64,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
61
64
  version: '0'
62
65
  requirements: []
63
66
  rubygems_version: 3.5.11
64
- signing_key:
67
+ signing_key:
65
68
  specification_version: 4
66
69
  summary: URI is a module providing classes to handle Uniform Resource Identifiers
67
70
  test_files: []