semver_dialects 3.4.4 → 3.4.5

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: 155e773f43becb03ca24d66e5aef3db7c52a997e2ecbfe6e7d8c8405724fb8c8
4
- data.tar.gz: 8bdd87a9dcfc0ba226c6e9730ad736613088ffd502ae77a17ca98cc9cd5a7e2d
3
+ metadata.gz: f8bdc291086fe3045ad20dbcd66689632e3ade434df5083612deac04d9c70734
4
+ data.tar.gz: a0ad9e2453d852fb21302255ebd6396720c2a83e276a19e1732511bf09b67886
5
5
  SHA512:
6
- metadata.gz: d228adf7320bdfb6a418dfa8750305ab984c3abc2bbd992e2e027f942d16e983b2ba822d7504671be82ce0f5fe7ad8c51613233370965606b4b36b6d1d288971
7
- data.tar.gz: cae052e840d2763415d9d725edc30f03437e71778aed69e3659b9e632ed9ba0b8826f9aab0fdf72a9f610778dbd648845a0a90ebbb6377180b2ad9e92d18c763
6
+ metadata.gz: 2dc9a8c36935d003363114d308f4a2e62f32723e122c8c6259658f5ef1bd78baa4793930b716be4823e4e1567f01b10deebc33327a0f37451d376b2ba9b4155d
7
+ data.tar.gz: 4af84b590cbf953e99ad9ffb04e3e0cff6abcc1d4b32ed0be05b3b2e23cdd4f21116888156047c2aac6ffb992dba41ba451db3c8063cd0c69c47ca399952a73e
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SemverDialects
4
- VERSION = '3.4.4'
4
+ VERSION = '3.4.5'
5
5
  end
@@ -122,7 +122,7 @@ module SemverDialects # rubocop:todo Style/Documentation
122
122
 
123
123
  when 'npm'
124
124
  # npm follows Semver 2.0.0.
125
- Semver2::VersionParser.parse(raw_ver)
125
+ Semver2::VersionParser.parse(cleanup(raw_ver))
126
126
 
127
127
  when 'go'
128
128
  # Go follows Semver 2.0.0.
@@ -228,4 +228,9 @@ module SemverDialects # rubocop:todo Style/Documentation
228
228
  # Gem::Version.new raises an ArgumentError for invalid versions.
229
229
  raise InvalidVersionError, raw_ver
230
230
  end
231
+
232
+ # cleanup loose npm versions
233
+ def self.cleanup(raw_ver)
234
+ raw_ver.strip.gsub(/^[=v]/, '')
235
+ end
231
236
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: semver_dialects
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.4
4
+ version: 3.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julian Thome
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2024-10-30 00:00:00.000000000 Z
13
+ date: 2024-12-10 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: pastel