uri-urn 0.0.3 → 0.0.5
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 +5 -5
- data/CHANGELOG.markdown +18 -0
- data/lib/uri/urn.rb +9 -3
- data/test/uri/urn/test_uuid.rb +2 -1
- data/uri-urn.gemspec +1 -1
- metadata +4 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: dc9d575a09093ce61d68bb0be4dedc366eb9a5bed332484fda52521e96308bd3
|
4
|
+
data.tar.gz: 3f4f04301f5772b402d7c604e8ad2206150cfc355289706e580e9a5e52154754
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d231593d19519e15662e6b4baddd43874f2fa6e16e84918377deacf9c9d115272ed415f02fc1ecfdfdeb9fead54a23b4926aad848854b2c1fac63bf1fb00630
|
7
|
+
data.tar.gz: 426cf52d081eaec7123c8d9b0497961aff2efdcb000ce181347d73026a1660401339aac5d56ded3ba5f5ad25af8d546e29c6f523e958baeb6142ffaf43018ce8
|
data/CHANGELOG.markdown
CHANGED
@@ -1,6 +1,22 @@
|
|
1
1
|
URI::URN Changelog
|
2
2
|
==================
|
3
3
|
|
4
|
+
0.0.5
|
5
|
+
-----
|
6
|
+
|
7
|
+
* Fix fatal around nonexistent `URI::PATTERN` ([#1](https://gitlab.com/KitaitiMakoto/uri-urn/-/merge_requests/1) thanks [@doriantaylor][]!)
|
8
|
+
|
9
|
+
0.0.4
|
10
|
+
-----
|
11
|
+
|
12
|
+
* Follow URI's API change
|
13
|
+
|
14
|
+
0.0.3
|
15
|
+
-----
|
16
|
+
|
17
|
+
* Load uri/urn/isbn when loading uri/urn
|
18
|
+
* Fix a but that raises `NoMethodError` when `URI::URN.new`'s arguments is invalid
|
19
|
+
|
4
20
|
0.0.2
|
5
21
|
-----
|
6
22
|
|
@@ -10,3 +26,5 @@ URI::URN Changelog
|
|
10
26
|
-----
|
11
27
|
|
12
28
|
* Initial release
|
29
|
+
|
30
|
+
[@doriantaylor]: https://gitlab.com/doriantaylor
|
data/lib/uri/urn.rb
CHANGED
@@ -20,9 +20,11 @@ module URI
|
|
20
20
|
|
21
21
|
class Generic < Generic
|
22
22
|
COMPONENT = URN::COMPONENT
|
23
|
+
# this needs to be done after uri 1.x
|
24
|
+
PATTERN = URI::RFC2396_Parser::PATTERN
|
23
25
|
|
24
|
-
NID_PATTERN = '
|
25
|
-
URN_CHARS_PATTERN = "[\\w
|
26
|
+
NID_PATTERN = '\w[\w\-]{0,31}'.freeze
|
27
|
+
URN_CHARS_PATTERN = "[\\w()+,\\-.:=@;$!*%/?#]|#{PATTERN::ESCAPED}".freeze
|
26
28
|
NSS_PATTERN = "(?:#{URN_CHARS_PATTERN})+".freeze
|
27
29
|
URN_REGEXP = Regexp.new("\\A(?<nid>#{NID_PATTERN}):(?<nss>#{NSS_PATTERN})\\z").freeze
|
28
30
|
|
@@ -117,7 +119,11 @@ module URI
|
|
117
119
|
end
|
118
120
|
end
|
119
121
|
|
120
|
-
|
122
|
+
if respond_to? :register_scheme
|
123
|
+
register_scheme 'URN', URN
|
124
|
+
else
|
125
|
+
@@schemes['URN'] = URN
|
126
|
+
end
|
121
127
|
end
|
122
128
|
|
123
129
|
require 'uri/urn/uuid'
|
data/test/uri/urn/test_uuid.rb
CHANGED
@@ -53,7 +53,8 @@ class TestUUID < Test::Unit::TestCase
|
|
53
53
|
uri = UUID.generate
|
54
54
|
assert_equal 'urn', uri.scheme
|
55
55
|
assert_equal 'uuid', uri.nid
|
56
|
-
|
56
|
+
# use the explicit constructor so the test doesn't warn
|
57
|
+
assert_match Regexp.new("\\A#{UUID::NSS_PATTERN}\\z"), uri.uuid
|
57
58
|
end
|
58
59
|
end
|
59
60
|
|
data/uri-urn.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uri-urn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- KITAITI Makoto
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-03-28 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: rubygems-tasks
|
@@ -52,7 +51,6 @@ homepage: https://gitorious.org/uri-ext
|
|
52
51
|
licenses:
|
53
52
|
- Ruby
|
54
53
|
metadata: {}
|
55
|
-
post_install_message:
|
56
54
|
rdoc_options: []
|
57
55
|
require_paths:
|
58
56
|
- lib
|
@@ -67,12 +65,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
67
65
|
- !ruby/object:Gem::Version
|
68
66
|
version: '0'
|
69
67
|
requirements: []
|
70
|
-
|
71
|
-
rubygems_version: 2.5.1
|
72
|
-
signing_key:
|
68
|
+
rubygems_version: 3.6.6
|
73
69
|
specification_version: 4
|
74
70
|
summary: Adds URN Scheme support to URI lib.
|
75
71
|
test_files:
|
76
72
|
- test/uri/test_urn.rb
|
77
|
-
- test/uri/urn/test_uuid.rb
|
78
73
|
- test/uri/urn/test_isbn.rb
|
74
|
+
- test/uri/urn/test_uuid.rb
|