librariesio-url-parser 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -0
- data/Gemfile.lock +7 -1
- data/lib/bitbucket_url_parser.rb +3 -1
- data/lib/github_url_parser.rb +3 -1
- data/lib/gitlab_url_parser.rb +3 -1
- data/lib/librariesio-url-parser.rb +1 -1
- 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: df16d2958656fa866177551cb6c6275e6b8303c40d41d3baeb639aff567aad07
|
4
|
+
data.tar.gz: ec4443d5e407716d312746c7157d698a21b9c10eaeea208f42101b42688f4b47
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ca1db0935515b6fe9d0f2dc5c27e8af36bb8cd4b652dc70d4f5194a27edd1cd4257144bd83b4b9c7fb4ae6dc333a37789021e852a1bc34cdf4000a61a27b86f
|
7
|
+
data.tar.gz: f253083f04c93d8eff970002d9bcc02ce0ffb362167149371a6a5576dd4ed1ee9dbe2c760841695873487749cab40d121447fdf48f74d429b46be930322db683
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,12 +1,17 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
librariesio-url-parser (1.0.
|
4
|
+
librariesio-url-parser (1.0.1)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
|
+
coderay (1.1.3)
|
9
10
|
diff-lcs (1.5.0)
|
11
|
+
method_source (1.0.0)
|
12
|
+
pry (0.14.1)
|
13
|
+
coderay (~> 1.1)
|
14
|
+
method_source (~> 1.0)
|
10
15
|
rake (12.3.3)
|
11
16
|
rspec (3.11.0)
|
12
17
|
rspec-core (~> 3.11.0)
|
@@ -29,6 +34,7 @@ PLATFORMS
|
|
29
34
|
|
30
35
|
DEPENDENCIES
|
31
36
|
librariesio-url-parser!
|
37
|
+
pry (~> 0.14.1)
|
32
38
|
rake (~> 12.0)
|
33
39
|
rspec (~> 3.0)
|
34
40
|
rspec_junit_formatter (~> 0.5)
|
data/lib/bitbucket_url_parser.rb
CHANGED
@@ -15,6 +15,8 @@ class BitbucketURLParser < URLParser
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def remove_domain
|
18
|
-
url
|
18
|
+
# find the matches for any github domain characters in the url string
|
19
|
+
# and replace only the first match incase we find a repo with something like github.com as the name
|
20
|
+
url.sub!(/(bitbucket\.com|bitbucket\.org)+?(:|\/)?/i, '')
|
19
21
|
end
|
20
22
|
end
|
data/lib/github_url_parser.rb
CHANGED
@@ -15,6 +15,8 @@ class GithubURLParser < URLParser
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def remove_domain
|
18
|
-
|
18
|
+
# find the matches for any github domain characters in the url string
|
19
|
+
# and replace only the first match incase we find a repo with something like github.com as the name
|
20
|
+
url.sub!(/(github\.io|github\.com|github\.org|raw\.githubusercontent\.com)+?(:|\/)?/i, '')
|
19
21
|
end
|
20
22
|
end
|
data/lib/gitlab_url_parser.rb
CHANGED
@@ -15,6 +15,8 @@ class GitlabURLParser < URLParser
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def remove_domain
|
18
|
-
url
|
18
|
+
# find the matches for any github domain characters in the url string
|
19
|
+
# and replace only the first match incase we find a repo with something like github.com as the name
|
20
|
+
url.sub!(/(gitlab\.com)+?(:|\/)?/i, '')
|
19
21
|
end
|
20
22
|
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.1
|
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-
|
11
|
+
date: 2022-07-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -52,7 +52,7 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0.5'
|
55
|
-
description:
|
55
|
+
description:
|
56
56
|
email:
|
57
57
|
- matt.pace@tidelift.com
|
58
58
|
executables: []
|
@@ -76,7 +76,7 @@ licenses:
|
|
76
76
|
- AGPL-3.0
|
77
77
|
metadata:
|
78
78
|
rubygems_mfa_required: 'true'
|
79
|
-
post_install_message:
|
79
|
+
post_install_message:
|
80
80
|
rdoc_options: []
|
81
81
|
require_paths:
|
82
82
|
- lib
|
@@ -91,8 +91,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
91
91
|
- !ruby/object:Gem::Version
|
92
92
|
version: '0'
|
93
93
|
requirements: []
|
94
|
-
rubygems_version: 3.0.
|
95
|
-
signing_key:
|
94
|
+
rubygems_version: 3.0.3
|
95
|
+
signing_key:
|
96
96
|
specification_version: 4
|
97
97
|
summary: Parse the URL for various repositories tracked by libraries.io
|
98
98
|
test_files: []
|