readmeExtractor 0.1.9 → 0.1.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/readmeExtractor/version.rb +1 -1
- data/lib/readmeExtractor.rb +4 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f85581ebbae1684e8d66ff121f24acf8d60345360f19046c402b707dc6098fc
|
4
|
+
data.tar.gz: 69979fa0d289eb5c07e06293792cdcb0ad947de986d89ca7a69a96aba38cbfd4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 314085771278e6d091eabb827ab582c30d89b933a0896c14b60437ea0fd2a8f14daef3ed2141c34f03bf5ae3e58a2c14ff09188955f89554811a3568c72f0f71
|
7
|
+
data.tar.gz: eeee17fb787386f161895a30063501d05b70032534016421df3036dcff0f1b3b9221ed61bd2148aa94e61138c77e807c8edf88e0fff46070aac0250be68a62cd
|
data/lib/readmeExtractor.rb
CHANGED
@@ -28,7 +28,9 @@ class ReadmeExtractor
|
|
28
28
|
gems = {}
|
29
29
|
gem_paths.each do |gem_path|
|
30
30
|
basename = File.basename gem_path
|
31
|
+
|
31
32
|
match = basename.match(/(?<name>.*?)-(?<version>\d+(?:\.\d+)*)(?:-(?<platform>[^.]+))?.gem/)
|
33
|
+
|
32
34
|
unless match && match[:name] && match[:version]
|
33
35
|
puts "#{basename} does not match the expected format."
|
34
36
|
next
|
@@ -40,6 +42,8 @@ class ReadmeExtractor
|
|
40
42
|
if Gem::Version.new(version) > Gem::Version.new(gems[name][:version])
|
41
43
|
gems[name] = { version:, gem_path: }
|
42
44
|
end
|
45
|
+
rescue Encoding::CompatibilityError => e
|
46
|
+
puts "Encoding::CompatibilityError #{e.message}"
|
43
47
|
end
|
44
48
|
gems
|
45
49
|
end
|