dependabot-nuget 0.98.10 → 0.98.11

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: 19b9f8f51bf9b5911ec72da7263d67b32f575d3c57b5f354a378f6e0b2214a51
4
- data.tar.gz: 2c68a64586a267708581f8588ae0c8497531331d26733d791e1a5b3fc262852f
3
+ metadata.gz: d2e7b4bf350760cae1e265e8d536f9d64675dfbc840bae464cbdfcd3da46d5fe
4
+ data.tar.gz: dffb11612594b123135550b598213eb25a7e702fd1f150d6f9a44c10dbc58b7f
5
5
  SHA512:
6
- metadata.gz: 192b24661e47cccd06beeb9063e9b005c9c5ac4c8816196431e9f3cc7c8cee775b800547c7c134515779b8feb6518dd9c7d2c2f38b02077bb179ebd75ebb9bac
7
- data.tar.gz: b20e6485ff5fcf75c3793cbd3103de92d7a574c3d6b219a8d900bc15363ee53e3150478f7eb4f8180c3beca5e2dfea2bb1843a0cc5086bef7d1464d2648cbcae
6
+ metadata.gz: 9ffecb770d054ec0f331ae800060e41c236765892514e570e720ab65d386f26910ced6a9e9fb23287c944d18f3f7efc21c81f2aa31a04b25d91b0195014636c7
7
+ data.tar.gz: f43528ec54850b2ec610580845d7d013199c6bbc6543294c0e19be6370b3c4983c41ce8e6e90e9aa9e35899eb3a44212ef02aec53d020c20a6b867280b4f8a93
@@ -26,8 +26,9 @@ module Dependabot
26
26
  @latest_version_details ||=
27
27
  begin
28
28
  tmp_versions = versions
29
- unless wants_prerelease?
30
- tmp_versions.reject! { |d| d.fetch(:version).prerelease? }
29
+ tmp_versions.reject! do |d|
30
+ version = d.fetch(:version)
31
+ version.prerelease? && !related_to_current_pre?(version)
31
32
  end
32
33
  tmp_versions.reject! do |hash|
33
34
  ignore_reqs.any? { |r| r.satisfied_by?(hash.fetch(:version)) }
@@ -105,18 +106,32 @@ module Dependabot
105
106
  }
106
107
  end
107
108
 
108
- def wants_prerelease?
109
- if dependency.version &&
110
- version_class.correct?(dependency.version) &&
111
- version_class.new(dependency.version).prerelease?
109
+ # rubocop:disable Metrics/CyclomaticComplexity
110
+ # rubocop:disable Metrics/PerceivedComplexity
111
+ def related_to_current_pre?(version)
112
+ current_version = dependency.version
113
+ if current_version &&
114
+ version_class.correct?(current_version) &&
115
+ version_class.new(current_version).prerelease? &&
116
+ version_class.new(current_version).release == version.release
112
117
  return true
113
118
  end
114
119
 
115
120
  dependency.requirements.any? do |req|
116
121
  reqs = (req.fetch(:requirement) || "").split(",").map(&:strip)
117
- reqs.any? { |r| r.include?("-") }
122
+ next unless reqs.any? { |r| r.include?("-") }
123
+
124
+ requirement_class.
125
+ requirements_array(req.fetch(:requirement)).
126
+ any? do |r|
127
+ r.requirements.any? { |a| a.last.release == version.release }
128
+ end
129
+ rescue Gem::Requirement::BadRequirementError
130
+ false
118
131
  end
119
132
  end
133
+ # rubocop:enable Metrics/CyclomaticComplexity
134
+ # rubocop:enable Metrics/PerceivedComplexity
120
135
 
121
136
  def v3_nuget_listings
122
137
  return @v3_nuget_listings unless @v3_nuget_listings.nil?
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.98.10
4
+ version: 0.98.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dependabot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-18 00:00:00.000000000 Z
11
+ date: 2019-03-19 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.98.10
19
+ version: 0.98.11
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.98.10
26
+ version: 0.98.11
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: byebug
29
29
  requirement: !ruby/object:Gem::Requirement