dependabot-nuget 0.179.0 → 0.180.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/dependabot/nuget/version.rb +7 -27
  3. metadata +10 -10
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 219488018533ab45c95ca01deb38111867d2695b0f3cac0585d8b7254bfff8ed
4
- data.tar.gz: fdd0836b01b2ccbf1741cd55891242323777c6b5a9925b1d6814c40ce1a7b5ad
3
+ metadata.gz: fa7f4707ff2bd85caba19edbeb990e90450ae3ab8aa87e51b140282bbb9d66a4
4
+ data.tar.gz: d1c1f1b2a853c6f4c4c0bb7b47181f4511ad2625616342b070e717a766d6f6d1
5
5
  SHA512:
6
- metadata.gz: f81ef1b38905e54a200b000b0e364c47fe238103a3f1a9f4aa015b7d7c8f7d79b68bd0cb816965908a7794c0a717fc0d9b1dacd20870ccf0ab9b6a82b613a097
7
- data.tar.gz: 24a226d70f89fa0a29fca7b91087d88f550755781cd3b7a74b11254094e1d677189f150dbb3fa03921a7b3c92c185c756b88ff3b19e397926184771d1faae27b
6
+ metadata.gz: 6cfe081a473fa10e046bde9cf00df43bf6c58edfdfe48f1d89ff0aed387a21d167078e802eae83781c889fd3a10f74de31de0d9a054f711b1d976df0fc883558
7
+ data.tar.gz: ccdb34331f44de8b120422af9f032dbf80c33b278a8a7256629557cf673c34272fc0d6d8041d372d124b49cceb47989f34925cd15cefa1802e86f80de86b8f9b
@@ -10,8 +10,6 @@ require "rubygems_version_patch"
10
10
  module Dependabot
11
11
  module Nuget
12
12
  class Version < Gem::Version
13
- attr_reader :build_info
14
-
15
13
  VERSION_PATTERN = Gem::Version::VERSION_PATTERN + '(\+[0-9a-zA-Z\-.]+)?'
16
14
  ANCHORED_VERSION_PATTERN = /\A\s*(#{VERSION_PATTERN})?\s*\z/.freeze
17
15
 
@@ -24,7 +22,7 @@ module Dependabot
24
22
  def initialize(version)
25
23
  @version_string = version.to_s
26
24
 
27
- version, @build_info = version.to_s.split("+") if version.to_s.include?("+")
25
+ version = version.to_s.split("+").first if version.to_s.include?("+")
28
26
 
29
27
  super
30
28
  end
@@ -41,10 +39,7 @@ module Dependabot
41
39
  version_comparison = compare_release(other)
42
40
  return version_comparison unless version_comparison.zero?
43
41
 
44
- version_comparison = compare_prerelease_part(other)
45
- return version_comparison unless version_comparison.zero?
46
-
47
- compare_build_info(other)
42
+ compare_prerelease_part(other)
48
43
  end
49
44
 
50
45
  def compare_release(other)
@@ -81,7 +76,10 @@ module Dependabot
81
76
  split_prerelease_string = prerelease_string.split(".")
82
77
  other_split_prerelease_string = other_prerelease_string.split(".")
83
78
 
84
- split_prerelease_string.zip(other_split_prerelease_string).each do |lhs, rhs|
79
+ length = [split_prerelease_string.length, other_split_prerelease_string.length].max - 1
80
+ (0..length).to_a.each do |index|
81
+ lhs = split_prerelease_string[index]
82
+ rhs = other_split_prerelease_string[index]
85
83
  result = compare_dot_separated_part(lhs, rhs)
86
84
  return result unless result.zero?
87
85
  end
@@ -99,25 +97,7 @@ module Dependabot
99
97
 
100
98
  return lhs.to_i <=> rhs.to_i if lhs.match?(/^\d+$/) && rhs.match?(/^\d+$/)
101
99
 
102
- lhs <=> rhs
103
- end
104
-
105
- def compare_build_info(other)
106
- return build_info.nil? ? 0 : 1 unless other.is_a?(Nuget::Version)
107
-
108
- # Build information comparison
109
- lhsegments = build_info.to_s.split(".").map(&:downcase)
110
- rhsegments = other.build_info.to_s.split(".").map(&:downcase)
111
- limit = [lhsegments.count, rhsegments.count].min
112
-
113
- lhs = ["1", *lhsegments.first(limit)].join(".")
114
- rhs = ["1", *rhsegments.first(limit)].join(".")
115
-
116
- local_comparison = Gem::Version.new(lhs) <=> Gem::Version.new(rhs)
117
-
118
- return local_comparison unless local_comparison.zero?
119
-
120
- lhsegments.count <=> rhsegments.count
100
+ lhs.upcase <=> rhs.upcase
121
101
  end
122
102
  end
123
103
  end
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.179.0
4
+ version: 0.180.2
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-16 00:00:00.000000000 Z
11
+ date: 2022-03-28 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.179.0
19
+ version: 0.180.2
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.179.0
26
+ version: 0.180.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: debug
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -100,14 +100,14 @@ dependencies:
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 1.23.0
103
+ version: 1.26.0
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: 1.23.0
110
+ version: 1.26.0
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: simplecov
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -156,14 +156,14 @@ dependencies:
156
156
  requirements:
157
157
  - - '='
158
158
  - !ruby/object:Gem::Version
159
- version: 6.0.0
159
+ version: 6.1.0
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - '='
165
165
  - !ruby/object:Gem::Version
166
- version: 6.0.0
166
+ version: 6.1.0
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: webmock
169
169
  requirement: !ruby/object:Gem::Requirement
@@ -218,12 +218,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
218
218
  requirements:
219
219
  - - ">="
220
220
  - !ruby/object:Gem::Version
221
- version: 2.5.0
221
+ version: 2.7.0
222
222
  required_rubygems_version: !ruby/object:Gem::Requirement
223
223
  requirements:
224
224
  - - ">="
225
225
  - !ruby/object:Gem::Version
226
- version: 2.5.0
226
+ version: 2.7.0
227
227
  requirements: []
228
228
  rubygems_version: 3.2.32
229
229
  signing_key: