dependabot-nuget 0.177.0 → 0.179.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: 388c30de2dc046315823859d5dc3c3ffbecabd00574c126a4cbaee87a88dbcec
4
- data.tar.gz: 3101800c102a6eccb3885f376e5305b152636604a7a334c68896d2f9ac602bc8
3
+ metadata.gz: 219488018533ab45c95ca01deb38111867d2695b0f3cac0585d8b7254bfff8ed
4
+ data.tar.gz: fdd0836b01b2ccbf1741cd55891242323777c6b5a9925b1d6814c40ce1a7b5ad
5
5
  SHA512:
6
- metadata.gz: 13aa6b7247bddca40ea6985ca27ac1087e9a3d778c34f7f386649d584cb024b882773637b4b2b02b7258c5783d7f5fca59d674d8adf569070fa510f11e5a6759
7
- data.tar.gz: 3b604d739ef41063bd9457ea6744304ad08d74cad543519cd975123876adc4f4fa8c06a7056621a499698e99c9bf7fd236a8bc608214f19ba3d40778449a8465
6
+ metadata.gz: f81ef1b38905e54a200b000b0e364c47fe238103a3f1a9f4aa015b7d7c8f7d79b68bd0cb816965908a7794c0a717fc0d9b1dacd20870ccf0ab9b6a82b613a097
7
+ data.tar.gz: 24a226d70f89fa0a29fca7b91087d88f550755781cd3b7a74b11254094e1d677189f150dbb3fa03921a7b3c92c185c756b88ff3b19e397926184771d1faae27b
@@ -55,6 +55,8 @@ module Dependabot
55
55
  end
56
56
 
57
57
  # rubocop:disable Metrics/PerceivedComplexity
58
+ # rubocop:disable Metrics/CyclomaticComplexity
59
+ # rubocop:disable Metrics/AbcSize
58
60
  def compare_prerelease_part(other)
59
61
  release_str = @version_string.split("-").first&.split("+")&.first || ""
60
62
  prerelease_string = @version_string.
@@ -74,11 +76,31 @@ module Dependabot
74
76
 
75
77
  return -1 if prerelease_string && !other_prerelease_string
76
78
  return 1 if !prerelease_string && other_prerelease_string
79
+ return 0 if !prerelease_string && !other_prerelease_string
77
80
 
78
- prerelease_string.<=>(other_prerelease_string)
81
+ split_prerelease_string = prerelease_string.split(".")
82
+ other_split_prerelease_string = other_prerelease_string.split(".")
83
+
84
+ split_prerelease_string.zip(other_split_prerelease_string).each do |lhs, rhs|
85
+ result = compare_dot_separated_part(lhs, rhs)
86
+ return result unless result.zero?
87
+ end
88
+
89
+ 0
79
90
  end
80
91
 
81
92
  # rubocop:enable Metrics/PerceivedComplexity
93
+ # rubocop:enable Metrics/CyclomaticComplexity
94
+ # rubocop:enable Metrics/AbcSize
95
+
96
+ def compare_dot_separated_part(lhs, rhs)
97
+ return -1 if lhs.nil?
98
+ return 1 if rhs.nil?
99
+
100
+ return lhs.to_i <=> rhs.to_i if lhs.match?(/^\d+$/) && rhs.match?(/^\d+$/)
101
+
102
+ lhs <=> rhs
103
+ end
82
104
 
83
105
  def compare_build_info(other)
84
106
  return build_info.nil? ? 0 : 1 unless other.is_a?(Nuget::Version)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dependabot-nuget
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.177.0
4
+ version: 0.179.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dependabot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-04 00:00:00.000000000 Z
11
+ date: 2022-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dependabot-common
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.177.0
19
+ version: 0.179.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.177.0
26
+ version: 0.179.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: debug
29
29
  requirement: !ruby/object:Gem::Requirement