license_matcher 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/license_matcher/rule_matcher.rb +1 -1
- data/lib/license_matcher/url_matcher.rb +2 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db8941d583278b86e45c9f1bfa8140b0ccdc9f40
|
4
|
+
data.tar.gz: 425454900a2b992ab6249a24a3ce3b56c012faa4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f2ca376c07e5b046f3f31eddaada02a47e14b1fdfb4fca39ce36cb1b8ce57c77532113627b4fe13eb378304959a20955c3635a9b45511d9583d8c4487a8ef31
|
7
|
+
data.tar.gz: 48ca3e8cb85dd8968eb20d77dfe0fc7851756b7e64f481cc64e529d24f45d23521fea2794c294a29e28c80431c38187c9ccff63f49935abd38a575760d479d65
|
@@ -1,4 +1,3 @@
|
|
1
|
-
|
2
1
|
module LicenseMatcher
|
3
2
|
class UrlMatcher
|
4
3
|
attr_reader :url_index
|
@@ -14,8 +13,8 @@ module LicenseMatcher
|
|
14
13
|
|
15
14
|
def match_text(url_txt, min_confidence = 0.0)
|
16
15
|
spdx_id, score = match_url url_txt.to_s.strip
|
17
|
-
if
|
18
|
-
Match.new(spdx_id, score.to_f)
|
16
|
+
if spdx_id
|
17
|
+
Match.new(spdx_id.to_s, score.to_f)
|
19
18
|
else
|
20
19
|
Match.new("", 0.0)
|
21
20
|
end
|