librariesio-url-parser 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/librariesio-url-parser.rb +1 -1
- data/lib/url_parser.rb +14 -7
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 26ec3df36120630b6729b1d5a9b7d854acfeadede419ab34e895d0e00619fb7c
|
4
|
+
data.tar.gz: 7bf32628de41c3a243b08ee3b8aa8489e5dfbfef5fe673e7f68390a6f942dbd0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bbe57df347aafc5b82046f13a5e20d7c6deaf66cb67590540d122701d79bd516bb0b015b0b41f72d144e7c963f45e1ef7f67da61328aa819b8712c58d029b9af
|
7
|
+
data.tar.gz: c942042bb95db767107b91aa136c61cdd8408c11cfef763038abab07e0bdc515ee032cf8979e27040988aca8ce0b879214fae367511b1cf36a48a0f5e4415071
|
data/Gemfile.lock
CHANGED
data/lib/url_parser.rb
CHANGED
@@ -162,13 +162,20 @@ class URLParser
|
|
162
162
|
url.gsub!(/\s/, '')
|
163
163
|
end
|
164
164
|
|
165
|
+
# This computation is memoized because it is expensive. This prevents use cases which require using
|
166
|
+
# .try_all in a tight loop. However, if this class is required directly (without requiring any subparsers),
|
167
|
+
# this method will memoize an empty array. It is recommended to simply require librariesio-url-parser.rb directly.
|
168
|
+
# This is the default behavior when installing this gem.
|
165
169
|
private_class_method def self.descendants
|
166
|
-
descendants
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
170
|
+
@descendants ||=
|
171
|
+
begin
|
172
|
+
descendants = []
|
173
|
+
ObjectSpace.each_object(singleton_class) do |k|
|
174
|
+
next if k.singleton_class?
|
175
|
+
|
176
|
+
descendants.unshift k unless k == self
|
177
|
+
end
|
178
|
+
descendants
|
179
|
+
end
|
173
180
|
end
|
174
181
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: librariesio-url-parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Pace
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-08-
|
11
|
+
date: 2022-08-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -66,7 +66,7 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 0.14.1
|
69
|
-
description:
|
69
|
+
description:
|
70
70
|
email:
|
71
71
|
- matt.pace@tidelift.com
|
72
72
|
executables: []
|
@@ -98,7 +98,7 @@ licenses:
|
|
98
98
|
- AGPL-3.0
|
99
99
|
metadata:
|
100
100
|
rubygems_mfa_required: 'true'
|
101
|
-
post_install_message:
|
101
|
+
post_install_message:
|
102
102
|
rdoc_options: []
|
103
103
|
require_paths:
|
104
104
|
- lib
|
@@ -113,8 +113,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
113
113
|
- !ruby/object:Gem::Version
|
114
114
|
version: '0'
|
115
115
|
requirements: []
|
116
|
-
rubygems_version: 3.0.
|
117
|
-
signing_key:
|
116
|
+
rubygems_version: 3.0.9
|
117
|
+
signing_key:
|
118
118
|
specification_version: 4
|
119
119
|
summary: Parse the URL for various repositories tracked by libraries.io
|
120
120
|
test_files: []
|