addressable 2.8.1 → 2.9.0

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.
@@ -22,8 +22,8 @@ if !defined?(Addressable::VERSION)
22
22
  module Addressable
23
23
  module VERSION
24
24
  MAJOR = 2
25
- MINOR = 8
26
- TINY = 1
25
+ MINOR = 9
26
+ TINY = 0
27
27
 
28
28
  STRING = [MAJOR, MINOR, TINY].join('.')
29
29
  end
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.1
4
+ version: 2.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bob Aman
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2022-08-19 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: '6.0'
21
+ version: '8.0'
23
22
  type: :runtime
24
23
  prerelease: false
25
24
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,27 +28,7 @@ dependencies:
29
28
  version: 2.0.2
30
29
  - - "<"
31
30
  - !ruby/object:Gem::Version
32
- version: '6.0'
33
- - !ruby/object:Gem::Dependency
34
- name: bundler
35
- requirement: !ruby/object:Gem::Requirement
36
- requirements:
37
- - - ">="
38
- - !ruby/object:Gem::Version
39
- version: '1.0'
40
- - - "<"
41
- - !ruby/object:Gem::Version
42
- version: '3.0'
43
- type: :development
44
- prerelease: false
45
- version_requirements: !ruby/object:Gem::Requirement
46
- requirements:
47
- - - ">="
48
- - !ruby/object:Gem::Version
49
- version: '1.0'
50
- - - "<"
51
- - !ruby/object:Gem::Version
52
- version: '3.0'
31
+ version: '8.0'
53
32
  description: |
54
33
  Addressable is an alternative implementation to the URI implementation that is
55
34
  part of Ruby's standard library. It is flexible, offers heuristic parsing, and
@@ -61,11 +40,8 @@ extra_rdoc_files:
61
40
  - README.md
62
41
  files:
63
42
  - CHANGELOG.md
64
- - Gemfile
65
43
  - LICENSE.txt
66
44
  - README.md
67
- - Rakefile
68
- - data/unicode.data
69
45
  - lib/addressable.rb
70
46
  - lib/addressable/idna.rb
71
47
  - lib/addressable/idna/native.rb
@@ -73,25 +49,11 @@ files:
73
49
  - lib/addressable/template.rb
74
50
  - lib/addressable/uri.rb
75
51
  - lib/addressable/version.rb
76
- - spec/addressable/idna_spec.rb
77
- - spec/addressable/net_http_compat_spec.rb
78
- - spec/addressable/security_spec.rb
79
- - spec/addressable/template_spec.rb
80
- - spec/addressable/uri_spec.rb
81
- - spec/spec_helper.rb
82
- - tasks/clobber.rake
83
- - tasks/gem.rake
84
- - tasks/git.rake
85
- - tasks/metrics.rake
86
- - tasks/profile.rake
87
- - tasks/rspec.rake
88
- - tasks/yard.rake
89
52
  homepage: https://github.com/sporkmonger/addressable
90
53
  licenses:
91
54
  - Apache-2.0
92
55
  metadata:
93
- changelog_uri: https://github.com/sporkmonger/addressable/blob/main/CHANGELOG.md
94
- post_install_message:
56
+ changelog_uri: https://github.com/sporkmonger/addressable/blob/main/CHANGELOG.md#v2.9.0
95
57
  rdoc_options:
96
58
  - "--main"
97
59
  - README.md
@@ -108,8 +70,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
108
70
  - !ruby/object:Gem::Version
109
71
  version: '0'
110
72
  requirements: []
111
- rubygems_version: 3.3.7
112
- signing_key:
73
+ rubygems_version: 4.0.6
113
74
  specification_version: 4
114
75
  summary: URI Implementation
115
76
  test_files: []
data/Gemfile DELETED
@@ -1,30 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- source 'https://rubygems.org'
4
-
5
- gemspec
6
-
7
- group :test do
8
- gem 'rspec', '~> 3.8'
9
- gem 'rspec-its', '~> 1.3'
10
- end
11
-
12
- group :coverage do
13
- gem "coveralls", "> 0.7", require: false, platforms: :mri
14
- gem "simplecov", require: false
15
- end
16
-
17
- group :development do
18
- gem 'launchy', '~> 2.4', '>= 2.4.3'
19
- gem 'redcarpet', :platform => :mri_19
20
- gem 'yard'
21
- end
22
-
23
- group :test, :development do
24
- gem 'memory_profiler'
25
- gem "rake", ">= 12.3.3"
26
- end
27
-
28
- unless ENV["IDNA_MODE"] == "pure"
29
- gem "idn-ruby", platform: :mri
30
- end
data/Rakefile DELETED
@@ -1,34 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'rubygems'
4
- require 'rake'
5
-
6
- require File.join(File.dirname(__FILE__), 'lib', 'addressable', 'version')
7
-
8
- PKG_DISPLAY_NAME = 'Addressable'
9
- PKG_NAME = PKG_DISPLAY_NAME.downcase
10
- PKG_VERSION = Addressable::VERSION::STRING
11
- PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
12
-
13
- RELEASE_NAME = "REL #{PKG_VERSION}"
14
-
15
- PKG_SUMMARY = "URI Implementation"
16
- PKG_DESCRIPTION = <<-TEXT
17
- Addressable is an alternative implementation to the URI implementation that is
18
- part of Ruby's standard library. It is flexible, offers heuristic parsing, and
19
- additionally provides extensive support for IRIs and URI templates.
20
- TEXT
21
-
22
- PKG_FILES = FileList[
23
- "lib/**/*", "spec/**/*", "vendor/**/*", "data/**/*",
24
- "tasks/**/*",
25
- "[A-Z]*", "Rakefile"
26
- ].exclude(/pkg/).exclude(/database\.yml/).
27
- exclude(/Gemfile\.lock/).exclude(/[_\.]git$/)
28
-
29
- task :default => "spec"
30
-
31
- WINDOWS = (RUBY_PLATFORM =~ /mswin|win32|mingw|bccwin|cygwin/) rescue false
32
- SUDO = WINDOWS ? '' : ('sudo' unless ENV['SUDOLESS'])
33
-
34
- Dir['tasks/**/*.rake'].each { |rake| load rake }
data/data/unicode.data DELETED
Binary file
@@ -1,301 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Copyright (C) Bob Aman
4
- #
5
- # Licensed under the Apache License, Version 2.0 (the "License");
6
- # you may not use this file except in compliance with the License.
7
- # You may obtain a copy of the License at
8
- #
9
- # http://www.apache.org/licenses/LICENSE-2.0
10
- #
11
- # Unless required by applicable law or agreed to in writing, software
12
- # distributed under the License is distributed on an "AS IS" BASIS,
13
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- # See the License for the specific language governing permissions and
15
- # limitations under the License.
16
-
17
-
18
- require "spec_helper"
19
-
20
- # Have to use RubyGems to load the idn gem.
21
- require "rubygems"
22
-
23
- require "addressable/idna"
24
-
25
- shared_examples_for "converting from unicode to ASCII" do
26
- it "should convert 'www.google.com' correctly" do
27
- expect(Addressable::IDNA.to_ascii("www.google.com")).to eq("www.google.com")
28
- end
29
-
30
- long = 'AcinusFallumTrompetumNullunCreditumVisumEstAtCuadLongumEtCefallum.com'
31
- it "should convert '#{long}' correctly" do
32
- expect(Addressable::IDNA.to_ascii(long)).to eq(long)
33
- end
34
-
35
- it "should convert 'www.詹姆斯.com' correctly" do
36
- expect(Addressable::IDNA.to_ascii(
37
- "www.詹姆斯.com"
38
- )).to eq("www.xn--8ws00zhy3a.com")
39
- end
40
-
41
- it "should convert 'www.Iñtërnâtiônàlizætiøn.com' correctly" do
42
- "www.Iñtërnâtiônàlizætiøn.com"
43
- expect(Addressable::IDNA.to_ascii(
44
- "www.I\xC3\xB1t\xC3\xABrn\xC3\xA2ti\xC3\xB4" +
45
- "n\xC3\xA0liz\xC3\xA6ti\xC3\xB8n.com"
46
- )).to eq("www.xn--itrntinliztin-vdb0a5exd8ewcye.com")
47
- end
48
-
49
- it "should convert 'www.Iñtërnâtiônàlizætiøn.com' correctly" do
50
- expect(Addressable::IDNA.to_ascii(
51
- "www.In\xCC\x83te\xCC\x88rna\xCC\x82tio\xCC\x82n" +
52
- "a\xCC\x80liz\xC3\xA6ti\xC3\xB8n.com"
53
- )).to eq("www.xn--itrntinliztin-vdb0a5exd8ewcye.com")
54
- end
55
-
56
- it "should convert " +
57
- "'www.ほんとうにながいわけのわからないどめいんめいのらべるまだながくしないとたりない.w3.mag.keio.ac.jp' " +
58
- "correctly" do
59
- expect(Addressable::IDNA.to_ascii(
60
- "www.\343\201\273\343\202\223\343\201\250\343\201\206\343\201\253\343" +
61
- "\201\252\343\201\214\343\201\204\343\202\217\343\201\221\343\201\256" +
62
- "\343\202\217\343\201\213\343\202\211\343\201\252\343\201\204\343\201" +
63
- "\251\343\202\201\343\201\204\343\202\223\343\202\201\343\201\204\343" +
64
- "\201\256\343\202\211\343\201\271\343\202\213\343\201\276\343\201\240" +
65
- "\343\201\252\343\201\214\343\201\217\343\201\227\343\201\252\343\201" +
66
- "\204\343\201\250\343\201\237\343\202\212\343\201\252\343\201\204." +
67
- "w3.mag.keio.ac.jp"
68
- )).to eq(
69
- "www.xn--n8jaaaaai5bhf7as8fsfk3jnknefdde3" +
70
- "fg11amb5gzdb4wi9bya3kc6lra.w3.mag.keio.ac.jp"
71
- )
72
- end
73
-
74
- it "should convert " +
75
- "'www.ほんとうにながいわけのわからないどめいんめいのらべるまだながくしないとたりない.w3.mag.keio.ac.jp' " +
76
- "correctly" do
77
- expect(Addressable::IDNA.to_ascii(
78
- "www.\343\201\273\343\202\223\343\201\250\343\201\206\343\201\253\343" +
79
- "\201\252\343\201\213\343\202\231\343\201\204\343\202\217\343\201\221" +
80
- "\343\201\256\343\202\217\343\201\213\343\202\211\343\201\252\343\201" +
81
- "\204\343\201\250\343\202\231\343\202\201\343\201\204\343\202\223\343" +
82
- "\202\201\343\201\204\343\201\256\343\202\211\343\201\270\343\202\231" +
83
- "\343\202\213\343\201\276\343\201\237\343\202\231\343\201\252\343\201" +
84
- "\213\343\202\231\343\201\217\343\201\227\343\201\252\343\201\204\343" +
85
- "\201\250\343\201\237\343\202\212\343\201\252\343\201\204." +
86
- "w3.mag.keio.ac.jp"
87
- )).to eq(
88
- "www.xn--n8jaaaaai5bhf7as8fsfk3jnknefdde3" +
89
- "fg11amb5gzdb4wi9bya3kc6lra.w3.mag.keio.ac.jp"
90
- )
91
- end
92
-
93
- it "should convert '点心和烤鸭.w3.mag.keio.ac.jp' correctly" do
94
- expect(Addressable::IDNA.to_ascii(
95
- "点心和烤鸭.w3.mag.keio.ac.jp"
96
- )).to eq("xn--0trv4xfvn8el34t.w3.mag.keio.ac.jp")
97
- end
98
-
99
- it "should convert '가각갂갃간갅갆갇갈갉힢힣.com' correctly" do
100
- expect(Addressable::IDNA.to_ascii(
101
- "가각갂갃간갅갆갇갈갉힢힣.com"
102
- )).to eq("xn--o39acdefghijk5883jma.com")
103
- end
104
-
105
- it "should convert " +
106
- "'\347\242\274\346\250\231\346\272\226\350" +
107
- "\220\254\345\234\213\347\242\274.com' correctly" do
108
- expect(Addressable::IDNA.to_ascii(
109
- "\347\242\274\346\250\231\346\272\226\350" +
110
- "\220\254\345\234\213\347\242\274.com"
111
- )).to eq("xn--9cs565brid46mda086o.com")
112
- end
113
-
114
- it "should convert 'リ宠퐱〹.com' correctly" do
115
- expect(Addressable::IDNA.to_ascii(
116
- "\357\276\230\345\256\240\355\220\261\343\200\271.com"
117
- )).to eq("xn--eek174hoxfpr4k.com")
118
- end
119
-
120
- it "should convert 'リ宠퐱卄.com' correctly" do
121
- expect(Addressable::IDNA.to_ascii(
122
- "\343\203\252\345\256\240\355\220\261\345\215\204.com"
123
- )).to eq("xn--eek174hoxfpr4k.com")
124
- end
125
-
126
- it "should convert 'ᆵ' correctly" do
127
- expect(Addressable::IDNA.to_ascii(
128
- "\341\206\265"
129
- )).to eq("xn--4ud")
130
- end
131
-
132
- it "should convert 'ᆵ' correctly" do
133
- expect(Addressable::IDNA.to_ascii(
134
- "\357\276\257"
135
- )).to eq("xn--4ud")
136
- end
137
-
138
- it "should convert '🌹🌹🌹.ws' correctly" do
139
- expect(Addressable::IDNA.to_ascii(
140
- "\360\237\214\271\360\237\214\271\360\237\214\271.ws"
141
- )).to eq("xn--2h8haa.ws")
142
- end
143
-
144
- it "should handle two adjacent '.'s correctly" do
145
- expect(Addressable::IDNA.to_ascii(
146
- "example..host"
147
- )).to eq("example..host")
148
- end
149
- end
150
-
151
- shared_examples_for "converting from ASCII to unicode" do
152
- long = 'AcinusFallumTrompetumNullunCreditumVisumEstAtCuadLongumEtCefallum.com'
153
- it "should convert '#{long}' correctly" do
154
- expect(Addressable::IDNA.to_unicode(long)).to eq(long)
155
- end
156
-
157
- it "should return the identity conversion when punycode decode fails" do
158
- expect(Addressable::IDNA.to_unicode("xn--zckp1cyg1.sblo.jp")).to eq(
159
- "xn--zckp1cyg1.sblo.jp")
160
- end
161
-
162
- it "should return the identity conversion when the ACE prefix has no suffix" do
163
- expect(Addressable::IDNA.to_unicode("xn--...-")).to eq("xn--...-")
164
- end
165
-
166
- it "should convert 'www.google.com' correctly" do
167
- expect(Addressable::IDNA.to_unicode("www.google.com")).to eq(
168
- "www.google.com")
169
- end
170
-
171
- it "should convert 'www.詹姆斯.com' correctly" do
172
- expect(Addressable::IDNA.to_unicode(
173
- "www.xn--8ws00zhy3a.com"
174
- )).to eq("www.詹姆斯.com")
175
- end
176
-
177
- it "should convert '詹姆斯.com' correctly" do
178
- expect(Addressable::IDNA.to_unicode(
179
- "xn--8ws00zhy3a.com"
180
- )).to eq("詹姆斯.com")
181
- end
182
-
183
- it "should convert 'www.iñtërnâtiônàlizætiøn.com' correctly" do
184
- expect(Addressable::IDNA.to_unicode(
185
- "www.xn--itrntinliztin-vdb0a5exd8ewcye.com"
186
- )).to eq("www.iñtërnâtiônàlizætiøn.com")
187
- end
188
-
189
- it "should convert 'iñtërnâtiônàlizætiøn.com' correctly" do
190
- expect(Addressable::IDNA.to_unicode(
191
- "xn--itrntinliztin-vdb0a5exd8ewcye.com"
192
- )).to eq("iñtërnâtiônàlizætiøn.com")
193
- end
194
-
195
- it "should convert " +
196
- "'www.ほんとうにながいわけのわからないどめいんめいのらべるまだながくしないとたりない.w3.mag.keio.ac.jp' " +
197
- "correctly" do
198
- expect(Addressable::IDNA.to_unicode(
199
- "www.xn--n8jaaaaai5bhf7as8fsfk3jnknefdde3" +
200
- "fg11amb5gzdb4wi9bya3kc6lra.w3.mag.keio.ac.jp"
201
- )).to eq(
202
- "www.ほんとうにながいわけのわからないどめいんめいのらべるまだながくしないとたりない.w3.mag.keio.ac.jp"
203
- )
204
- end
205
-
206
- it "should convert '点心和烤鸭.w3.mag.keio.ac.jp' correctly" do
207
- expect(Addressable::IDNA.to_unicode(
208
- "xn--0trv4xfvn8el34t.w3.mag.keio.ac.jp"
209
- )).to eq("点心和烤鸭.w3.mag.keio.ac.jp")
210
- end
211
-
212
- it "should convert '가각갂갃간갅갆갇갈갉힢힣.com' correctly" do
213
- expect(Addressable::IDNA.to_unicode(
214
- "xn--o39acdefghijk5883jma.com"
215
- )).to eq("가각갂갃간갅갆갇갈갉힢힣.com")
216
- end
217
-
218
- it "should convert " +
219
- "'\347\242\274\346\250\231\346\272\226\350" +
220
- "\220\254\345\234\213\347\242\274.com' correctly" do
221
- expect(Addressable::IDNA.to_unicode(
222
- "xn--9cs565brid46mda086o.com"
223
- )).to eq(
224
- "\347\242\274\346\250\231\346\272\226\350" +
225
- "\220\254\345\234\213\347\242\274.com"
226
- )
227
- end
228
-
229
- it "should convert 'リ宠퐱卄.com' correctly" do
230
- expect(Addressable::IDNA.to_unicode(
231
- "xn--eek174hoxfpr4k.com"
232
- )).to eq("\343\203\252\345\256\240\355\220\261\345\215\204.com")
233
- end
234
-
235
- it "should convert 'ᆵ' correctly" do
236
- expect(Addressable::IDNA.to_unicode(
237
- "xn--4ud"
238
- )).to eq("\341\206\265")
239
- end
240
-
241
- it "should convert '🌹🌹🌹.ws' correctly" do
242
- expect(Addressable::IDNA.to_unicode(
243
- "xn--2h8haa.ws"
244
- )).to eq("\360\237\214\271\360\237\214\271\360\237\214\271.ws")
245
- end
246
-
247
- it "should handle two adjacent '.'s correctly" do
248
- expect(Addressable::IDNA.to_unicode(
249
- "example..host"
250
- )).to eq("example..host")
251
- end
252
-
253
- it "should normalize 'string' correctly" do
254
- expect(Addressable::IDNA.unicode_normalize_kc(:'string')).to eq("string")
255
- expect(Addressable::IDNA.unicode_normalize_kc("string")).to eq("string")
256
- end
257
- end
258
-
259
- describe Addressable::IDNA, "when using the pure-Ruby implementation" do
260
- before do
261
- Addressable.send(:remove_const, :IDNA)
262
- load "addressable/idna/pure.rb"
263
- end
264
-
265
- it_should_behave_like "converting from unicode to ASCII"
266
- it_should_behave_like "converting from ASCII to unicode"
267
-
268
- begin
269
- require "fiber"
270
-
271
- it "should not blow up inside fibers" do
272
- f = Fiber.new do
273
- Addressable.send(:remove_const, :IDNA)
274
- load "addressable/idna/pure.rb"
275
- end
276
- f.resume
277
- end
278
- rescue LoadError
279
- # Fibers aren't supported in this version of Ruby, skip this test.
280
- warn('Fibers unsupported.')
281
- end
282
- end
283
-
284
- begin
285
- require "idn"
286
-
287
- describe Addressable::IDNA, "when using the native-code implementation" do
288
- before do
289
- Addressable.send(:remove_const, :IDNA)
290
- load "addressable/idna/native.rb"
291
- end
292
-
293
- it_should_behave_like "converting from unicode to ASCII"
294
- it_should_behave_like "converting from ASCII to unicode"
295
- end
296
- rescue LoadError => error
297
- raise error if ENV["CI"] && TestHelper.native_supported?
298
-
299
- # Cannot test the native implementation without libidn support.
300
- warn('Could not load native IDN implementation.')
301
- end
@@ -1,29 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Copyright (C) Bob Aman
4
- #
5
- # Licensed under the Apache License, Version 2.0 (the "License");
6
- # you may not use this file except in compliance with the License.
7
- # You may obtain a copy of the License at
8
- #
9
- # http://www.apache.org/licenses/LICENSE-2.0
10
- #
11
- # Unless required by applicable law or agreed to in writing, software
12
- # distributed under the License is distributed on an "AS IS" BASIS,
13
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- # See the License for the specific language governing permissions and
15
- # limitations under the License.
16
-
17
-
18
- require "spec_helper"
19
-
20
- require "addressable/uri"
21
- require "net/http"
22
-
23
- describe Net::HTTP do
24
- it "should be compatible with Addressable" do
25
- response_body =
26
- Net::HTTP.get(Addressable::URI.parse('http://www.google.com/'))
27
- expect(response_body).not_to be_nil
28
- end
29
- end
@@ -1,58 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Copyright (C) Bob Aman
4
- #
5
- # Licensed under the Apache License, Version 2.0 (the "License");
6
- # you may not use this file except in compliance with the License.
7
- # You may obtain a copy of the License at
8
- #
9
- # http://www.apache.org/licenses/LICENSE-2.0
10
- #
11
- # Unless required by applicable law or agreed to in writing, software
12
- # distributed under the License is distributed on an "AS IS" BASIS,
13
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- # See the License for the specific language governing permissions and
15
- # limitations under the License.
16
-
17
-
18
- require "spec_helper"
19
-
20
- require "addressable/uri"
21
-
22
- describe Addressable::URI, "when created with a URI known to cause crashes " +
23
- "in certain browsers" do
24
- it "should parse correctly" do
25
- uri = Addressable::URI.parse('%%30%30')
26
- expect(uri.path).to eq('%%30%30')
27
- expect(uri.normalize.path).to eq('%2500')
28
- end
29
-
30
- it "should parse correctly as a full URI" do
31
- uri = Addressable::URI.parse('http://www.example.com/%%30%30')
32
- expect(uri.path).to eq('/%%30%30')
33
- expect(uri.normalize.path).to eq('/%2500')
34
- end
35
- end
36
-
37
- describe Addressable::URI, "when created with a URI known to cause crashes " +
38
- "in certain browsers" do
39
- it "should parse correctly" do
40
- uri = Addressable::URI.parse('لُصّبُلُلصّبُررً ॣ ॣh ॣ ॣ 冗')
41
- expect(uri.path).to eq('لُصّبُلُلصّبُررً ॣ ॣh ॣ ॣ 冗')
42
- expect(uri.normalize.path).to eq(
43
- '%D9%84%D9%8F%D8%B5%D9%91%D8%A8%D9%8F%D9%84%D9%8F%D9%84%D8%B5%D9%91' +
44
- '%D8%A8%D9%8F%D8%B1%D8%B1%D9%8B%20%E0%A5%A3%20%E0%A5%A3h%20%E0%A5' +
45
- '%A3%20%E0%A5%A3%20%E5%86%97'
46
- )
47
- end
48
-
49
- it "should parse correctly as a full URI" do
50
- uri = Addressable::URI.parse('http://www.example.com/لُصّبُلُلصّبُررً ॣ ॣh ॣ ॣ 冗')
51
- expect(uri.path).to eq('/لُصّبُلُلصّبُررً ॣ ॣh ॣ ॣ 冗')
52
- expect(uri.normalize.path).to eq(
53
- '/%D9%84%D9%8F%D8%B5%D9%91%D8%A8%D9%8F%D9%84%D9%8F%D9%84%D8%B5%D9%91' +
54
- '%D8%A8%D9%8F%D8%B1%D8%B1%D9%8B%20%E0%A5%A3%20%E0%A5%A3h%20%E0%A5' +
55
- '%A3%20%E0%A5%A3%20%E5%86%97'
56
- )
57
- end
58
- end