addressable 2.8.7 → 2.8.8

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.
@@ -2382,7 +2382,7 @@ module Addressable
2382
2382
  #
2383
2383
  # @return [String] The URI object's state, as a <code>String</code>.
2384
2384
  def inspect
2385
- sprintf("#<%s:%#0x URI:%s>", URI.to_s, self.object_id, self.to_s)
2385
+ sprintf("#<%s:%#0x URI:%s>", self.class.to_s, self.object_id, self.to_s)
2386
2386
  end
2387
2387
 
2388
2388
  ##
@@ -23,7 +23,7 @@ if !defined?(Addressable::VERSION)
23
23
  module VERSION
24
24
  MAJOR = 2
25
25
  MINOR = 8
26
- TINY = 7
26
+ TINY = 8
27
27
 
28
28
  STRING = [MAJOR, MINOR, TINY].join('.')
29
29
  end
@@ -1757,6 +1757,19 @@ describe Addressable::URI, "when parsed from " +
1757
1757
  expect(@uri.inspect).to include("%#0x" % @uri.object_id)
1758
1758
  end
1759
1759
 
1760
+ context "when Addressable::URI has been sub-classed" do
1761
+ class CustomURIClass < Addressable::URI
1762
+ end
1763
+
1764
+ before do
1765
+ @uri = CustomURIClass.parse("http://example.com")
1766
+ end
1767
+
1768
+ it "when inspected, should have the sub-classes name" do
1769
+ expect(@uri.inspect).to include("CustomURIClass")
1770
+ end
1771
+ end
1772
+
1760
1773
  it "should use the 'http' scheme" do
1761
1774
  expect(@uri.scheme).to eq("http")
1762
1775
  end
@@ -6803,9 +6816,10 @@ end
6803
6816
  describe Addressable::URI, "when initialized in a non-main `Ractor`" do
6804
6817
  it "should have the same value as if used in the main `Ractor`" do
6805
6818
  pending("Ruby 3.0+ for `Ractor` support") unless defined?(Ractor)
6819
+ value_method = RUBY_VERSION >= "3.5.0" ? :value : :take # see https://github.com/ruby/ruby/pull/13445
6806
6820
  main = Addressable::URI.parse("http://example.com")
6807
6821
  expect(
6808
- Ractor.new { Addressable::URI.parse("http://example.com") }.take
6822
+ Ractor.new { Addressable::URI.parse("http://example.com") }.public_send(value_method)
6809
6823
  ).to eq(main)
6810
6824
  end
6811
6825
  end
data/tasks/gem.rake CHANGED
@@ -21,7 +21,7 @@ namespace :gem do
21
21
 
22
22
  s.required_ruby_version = ">= 2.2"
23
23
 
24
- s.add_runtime_dependency "public_suffix", ">= 2.0.2", "< 7.0"
24
+ s.add_runtime_dependency "public_suffix", ">= 2.0.2", "< 8.0"
25
25
  s.add_development_dependency "bundler", ">= 1.0", "< 3.0"
26
26
 
27
27
  s.require_path = "lib"
@@ -43,6 +43,11 @@ namespace :gem do
43
43
 
44
44
  desc "Generates .gemspec file"
45
45
  task :gemspec do
46
+ # ensure correct date in gemspec
47
+ # https://github.com/ruby/rubygems/pull/8568
48
+ # https://github.com/ruby/rubygems/issues/8679
49
+ ENV["SOURCE_DATE_EPOCH"] ||= Time.now.to_i.to_s
50
+
46
51
  spec_string = GEM_SPEC.to_ruby
47
52
  File.open("#{GEM_SPEC.name}.gemspec", "w") do |file|
48
53
  file.write spec_string
data/tasks/profile.rake CHANGED
@@ -20,7 +20,7 @@ namespace :profile do
20
20
  puts "\n\n"
21
21
 
22
22
  if ENV["CI"]
23
- report.pretty_print(print_options)
23
+ report.pretty_print(**print_options)
24
24
  else
25
25
  t_allocated = report.scale_bytes(report.total_allocated_memsize)
26
26
  t_retained = report.scale_bytes(report.total_retained_memsize)
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: addressable
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.7
4
+ version: 2.8.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bob Aman
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-06-21 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: public_suffix
@@ -19,7 +18,7 @@ dependencies:
19
18
  version: 2.0.2
20
19
  - - "<"
21
20
  - !ruby/object:Gem::Version
22
- version: '7.0'
21
+ version: '8.0'
23
22
  type: :runtime
24
23
  prerelease: false
25
24
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +28,7 @@ dependencies:
29
28
  version: 2.0.2
30
29
  - - "<"
31
30
  - !ruby/object:Gem::Version
32
- version: '7.0'
31
+ version: '8.0'
33
32
  - !ruby/object:Gem::Dependency
34
33
  name: bundler
35
34
  requirement: !ruby/object:Gem::Requirement
@@ -66,7 +65,6 @@ files:
66
65
  - README.md
67
66
  - Rakefile
68
67
  - addressable.gemspec
69
- - data/unicode.data
70
68
  - lib/addressable.rb
71
69
  - lib/addressable/idna.rb
72
70
  - lib/addressable/idna/native.rb
@@ -91,8 +89,7 @@ homepage: https://github.com/sporkmonger/addressable
91
89
  licenses:
92
90
  - Apache-2.0
93
91
  metadata:
94
- changelog_uri: https://github.com/sporkmonger/addressable/blob/main/CHANGELOG.md#v2.8.7
95
- post_install_message:
92
+ changelog_uri: https://github.com/sporkmonger/addressable/blob/main/CHANGELOG.md#v2.8.8
96
93
  rdoc_options:
97
94
  - "--main"
98
95
  - README.md
@@ -109,8 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
109
106
  - !ruby/object:Gem::Version
110
107
  version: '0'
111
108
  requirements: []
112
- rubygems_version: 3.5.11
113
- signing_key:
109
+ rubygems_version: 3.6.9
114
110
  specification_version: 4
115
111
  summary: URI Implementation
116
112
  test_files: []
data/data/unicode.data DELETED
Binary file