gems-license-finder 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gems-license-finder.rb +2 -1
- data/lib/gems-license-finder/version.rb +1 -1
- 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: f24622267d82c32a72bf410472550cfedee46c72
|
4
|
+
data.tar.gz: f63ead7eabb922ec6de5e8f5623b67366789c2b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 840b18a430c3f4a8ac7eeb2cdc309ba331f665f5416db65634486b3247dafb2ba4d1bd4f95a19a67c0ea986e77f1a41d0c52c0b1b8a0dcb8c9cd700bd370e4cf
|
7
|
+
data.tar.gz: 082b39f2780df416a8270310b0a869d2c24bebc82d16e01f6d41be3ac15eeb2f3fa140bca36b0d516b651e3c5d2f07c94956db0b71822f83e57c3c066e8d6f35
|
data/lib/gems-license-finder.rb
CHANGED
@@ -5,6 +5,7 @@ require 'open-uri'
|
|
5
5
|
require 'uri'
|
6
6
|
require 'github/markup'
|
7
7
|
require 'gems-license-finder/version'
|
8
|
+
require 'cgi'
|
8
9
|
|
9
10
|
module GemsLicenseFinder
|
10
11
|
GemNotFound = Class.new(StandardError)
|
@@ -59,7 +60,7 @@ module GemsLicenseFinder
|
|
59
60
|
info = Hash[content.scan(/<a href="(.*?)" rel.*>(.*?)</)].invert
|
60
61
|
type, url = normalize_licence(
|
61
62
|
(utf8_match(content,'<h5>Licenses<\/h5>.*?<p>(.*?)<')[1] rescue ""))
|
62
|
-
description = (utf8_match(content,'gem__desc.*?<p>(.*?)<')[1].
|
63
|
+
description = (CGI.unescapeHTML utf8_match(content,'gem__desc.*?<p>(.*?)<')[1].
|
63
64
|
strip.squeeze(" ").gsub(/\n/,"") rescue nil)
|
64
65
|
|
65
66
|
info.merge({ license_type: type, license_url: url, description: description })
|