uri-urn 0.0.4 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 454f72d95de454f71d199373af9904ea1f760fb9628f6aa82c86c6db232cef12
4
- data.tar.gz: 10b4bdeef3bcad966b9029599cd2dcd3918a2ebea3286e8c82910766c98b28a3
3
+ metadata.gz: dc9d575a09093ce61d68bb0be4dedc366eb9a5bed332484fda52521e96308bd3
4
+ data.tar.gz: 3f4f04301f5772b402d7c604e8ad2206150cfc355289706e580e9a5e52154754
5
5
  SHA512:
6
- metadata.gz: 7216deacd54537f4a8eedb5997af46aa56e5d9cffb8bf55f9d132f429ed3ee6902c39f5bdd132a0afbdd1291818a98f4d9cb0579c31f00c4b51c8a2f3c72e9eb
7
- data.tar.gz: 1ce14d116d313fc5a202915c696092283b0cf3c574393f45299dba52700ac1b6ace296f8f796f05b3e553bbe7c4abeed157542b0ac295f5cad5ce8facd1224c2
6
+ metadata.gz: 3d231593d19519e15662e6b4baddd43874f2fa6e16e84918377deacf9c9d115272ed415f02fc1ecfdfdeb9fead54a23b4926aad848854b2c1fac63bf1fb00630
7
+ data.tar.gz: 426cf52d081eaec7123c8d9b0497961aff2efdcb000ce181347d73026a1660401339aac5d56ded3ba5f5ad25af8d546e29c6f523e958baeb6142ffaf43018ce8
data/CHANGELOG.markdown CHANGED
@@ -1,6 +1,11 @@
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
+
4
9
  0.0.4
5
10
  -----
6
11
 
@@ -21,3 +26,5 @@ URI::URN Changelog
21
26
  -----
22
27
 
23
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 = '[\w\d][\w\d\-]{0,31}'.freeze
25
- URN_CHARS_PATTERN = "[\\w\\d()+,\\-.:=@;$_!*%/?#]|#{URI::PATTERN::ESCAPED}".freeze
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
 
@@ -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
- assert_match /\A#{UUID::NSS_PATTERN}\z/, uri.uuid
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
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "uri-urn"
3
- spec.version = '0.0.4'
3
+ spec.version = '0.0.5'
4
4
  spec.authors = ["KITAITI Makoto"]
5
5
  spec.email = ["KitaitiMakoto@gmail.com"]
6
6
  spec.summary = %q{Adds URN Scheme support to URI lib.}
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
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: 2023-01-17 00:00:00.000000000 Z
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,8 +65,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
67
65
  - !ruby/object:Gem::Version
68
66
  version: '0'
69
67
  requirements: []
70
- rubygems_version: 3.4.1
71
- signing_key:
68
+ rubygems_version: 3.6.6
72
69
  specification_version: 4
73
70
  summary: Adds URN Scheme support to URI lib.
74
71
  test_files: