uri-ni 0.2.5 → 0.2.6
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 +4 -4
- data/lib/uri/ni/version.rb +1 -1
- data/lib/uri/ni.rb +7 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7cbe676431b1f91e98bed13314dffd05357aa058e3e1b11efc3e19ee904ea927
|
|
4
|
+
data.tar.gz: 012f7ebfc11314f307437d7a531d92f7ad08e2dd19e251b1ab40fc71c985f103
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a3b20a2fddaa8ec8b047215438afdd3dd54be09a4d91b3deb6fd6885bf9a7da7e3791ec126926f4f5853203943bda9a5eeb49d1aa6580d6b7d232131fbcc789a
|
|
7
|
+
data.tar.gz: ab5cf0c7504eac666b0a909fedaada251890d47ac0de45c9924de7c07ca584f0da8be0588345283d34ae08dae9d24c296b9dc3bc82ce9c383b3c74abba028035
|
data/lib/uri/ni/version.rb
CHANGED
data/lib/uri/ni.rb
CHANGED
|
@@ -289,7 +289,7 @@ class URI::NI < URI::Generic
|
|
|
289
289
|
blocksize: blocksize, authority: authority, query: query, &block
|
|
290
290
|
end
|
|
291
291
|
|
|
292
|
-
# Return a Digest::Instance
|
|
292
|
+
# Return a {Digest::Instance} for a supported algorithm.
|
|
293
293
|
# @param [#to_s, #to_sym] The algorithm
|
|
294
294
|
# @return [Digest:Instance] The digest context
|
|
295
295
|
# @raise [ArgumentError] if the algorithm is unrecognized
|
|
@@ -402,6 +402,12 @@ class URI::NI < URI::Generic
|
|
|
402
402
|
a.to_sym if a
|
|
403
403
|
end
|
|
404
404
|
|
|
405
|
+
# Return a `Hash` mapping algorithms to their lengths
|
|
406
|
+
#
|
|
407
|
+
def self.lengths truncated: false
|
|
408
|
+
LENGTHS.slice *algorithms(truncated: truncated)
|
|
409
|
+
end
|
|
410
|
+
|
|
405
411
|
# Obtain the authority (userinfo@host:port) if present.
|
|
406
412
|
#
|
|
407
413
|
# @return [String, nil] the authority
|