librariesio-url-parser 1.0.4 → 1.0.5
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 +7 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b7678a02447f9ecb298aca33105ed4a0a686258b39e1dbbf6069cadcc8bb5ee9
|
4
|
+
data.tar.gz: f5c7d4fa5dca4858e46f7740b33f4e54f67230e2801a2e2cfb00bfae7f1aad6a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 940d8eccc878fe614347f7e18f381825f531cf2f14a0f22834bbd342e8ebf6be13e4daeb5c07e2627446ba5d5df76af8b634285731479ce6fe4d38807fb29326
|
7
|
+
data.tar.gz: 928daf9d94eeed789e059e099dd6346e7c6d1b4cbaee1f788d8d36dc2420fdd232c74a7ed68f051aa91efa26d1d6636107d89deee06e082d0fd7c2f6398b90ca
|
data/Gemfile.lock
CHANGED
data/lib/url_parser.rb
CHANGED
@@ -65,7 +65,12 @@ class URLParser
|
|
65
65
|
remove_auth_user
|
66
66
|
remove_equals_sign
|
67
67
|
remove_scheme
|
68
|
-
|
68
|
+
|
69
|
+
unless includes_domain?
|
70
|
+
self.url = nil
|
71
|
+
return nil
|
72
|
+
end
|
73
|
+
|
69
74
|
remove_subdomain
|
70
75
|
remove_domain
|
71
76
|
remove_git_extension
|
@@ -74,6 +79,7 @@ class URLParser
|
|
74
79
|
end
|
75
80
|
|
76
81
|
def format_url
|
82
|
+
return nil if url.nil?
|
77
83
|
return nil unless url.length == 2
|
78
84
|
|
79
85
|
url.join('/')
|
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.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Pace
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-08-
|
11
|
+
date: 2022-08-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|