semver_dialects 1.2.0 → 1.3.0

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: a938aaa5511fcad164d08c5bc8b5ae657f439d8919b72da84f306a5550fc3fb6
4
- data.tar.gz: 43b8e0ed3dd90acd8e41c6e25795dacc309a7121ebcbef433c543349c4812b5d
3
+ metadata.gz: ddcbb054210cd867508c853d05b58c492e24f5019eb53498d2bbce338d4b5312
4
+ data.tar.gz: 6461b277cd0ddb886b96f23c9a57ab2a20cf4ebaa3fb11f49af54cf59a943ddf
5
5
  SHA512:
6
- metadata.gz: fca2d478f9e855e3c987566cc4e45d86260ea129c63af4cdc59e689a15261fb5d3b5e6983be7b21f55b330de46e2a9e3553042dc0235678e7b3e3b3005385041
7
- data.tar.gz: 19960826b3a1fc2d336dcb3394c2c2668bc0e863dec05d630b7859366f1a0d44590af4a14eed8872fd083ca4d5a78fe60f98a72e12ffdae102cf5c2df32d73b2
6
+ metadata.gz: b44765a7c9500082e3298b2ee34d1d9020b642ca5467c617944c42f57c7e76c0b3c8f34d3cac3058262edb14fb5cc885040e7277016c446277c02e12626e9fed
7
+ data.tar.gz: 6a7fa2d8043611fe4ff0a44abd5a1f67765f99a356c83be8343f6b1cb367127feb51cfd879021c623062477b2b538051405129280aa4079f46fdaf2bdf282d3c
@@ -124,7 +124,7 @@ module VersionTranslator
124
124
  end
125
125
 
126
126
  args = content.split(',')
127
- first_non_empty_arg = args.find(&:present?)
127
+ first_non_empty_arg = args.find(&:range_present?)
128
128
 
129
129
  if content.start_with?(',')
130
130
  # {,y}
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SemverDialects
4
- VERSION = '1.2.0'
4
+ VERSION = '1.3.0'
5
5
  end
@@ -34,15 +34,15 @@ module SemverDialects
34
34
  when 'packagist'
35
35
  VersionTranslator.translate_packagist(version_string)
36
36
  else
37
- raise SemverDialects::Error, 'unsupported package type'
37
+ raise SemverDialects::Error, "unsupported package type '#{typ}'"
38
38
  end
39
39
  end
40
40
 
41
41
  def self.version_sat?(typ, raw_ver, raw_constraint)
42
42
  version_constraint = version_translate(typ, raw_constraint)
43
- version = VersionParser.parse('=' + raw_ver)
44
-
45
43
  raise SemverDialects::Error, 'malformed constraint' if version_constraint.nil? || version_constraint.empty?
44
+
45
+ version = VersionParser.parse('=' + raw_ver)
46
46
  raise SemverDialects::Error, 'malformed constraint' if version.nil? || version.empty?
47
47
 
48
48
  constraint = VersionRange.new
data/lib/utils.rb CHANGED
@@ -9,7 +9,7 @@ class String
9
9
  s
10
10
  end
11
11
 
12
- def present?
12
+ def range_present?
13
13
  !empty?
14
14
  end
15
15
 
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: 1.2.0
4
+ version: 1.3.0
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: 2023-04-11 00:00:00.000000000 Z
13
+ date: 2023-05-23 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: pastel
@@ -60,14 +60,14 @@ dependencies:
60
60
  requirements:
61
61
  - - "~>"
62
62
  - !ruby/object:Gem::Version
63
- version: '1.17'
63
+ version: 2.4.9
64
64
  type: :development
65
65
  prerelease: false
66
66
  version_requirements: !ruby/object:Gem::Requirement
67
67
  requirements:
68
68
  - - "~>"
69
69
  - !ruby/object:Gem::Version
70
- version: '1.17'
70
+ version: 2.4.9
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: rake
73
73
  requirement: !ruby/object:Gem::Requirement