readmeExtractor 0.1.8 → 0.1.10

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