dependabot-common 0.118.4 → 0.118.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: 845830fad18e1ab13ddd0595967f4b92e669ba13c45f4a682bad0591cb7864d0
4
- data.tar.gz: 3ded0bc265a44c5d15492a7dbe51f323d99232ff752c12e261f6e094d6912d28
3
+ metadata.gz: a6f61e2bbd9d3064a50b6ca908f2f251e5a67ff1ecc7430697d6bf8216c97ecf
4
+ data.tar.gz: 0fe6d7c7a4fbcc20ed5e0e4940a18284a6f4f8ed9871f0eaaf6e205535702421
5
5
  SHA512:
6
- metadata.gz: ca234ac529c0ae36d5fd0283bf3b4e30d5d6a63e1fb544a7cf60d471065619cd8e45a53095b2af1e7d8ef5df200f667770887210d58f79595812234080f8470a
7
- data.tar.gz: c25caa46c1ffd80d407471e6027907a31b63868c3c04476c1f3659b90f754e1c30ff82b6c5e79ca447430b99b4a0bbaa187492b04284670901257957fe6da05c
6
+ metadata.gz: 76911b025d47ca297fee442f64c253b2678f02eca39cad85aea38df78697edc1f975fe5a8829166f0c7c5e53d3cee9252ad87a32aaf73a80759aef6b394c5a84
7
+ data.tar.gz: 1232cf6994b1823a0937b6f26744c3c4b857fbd9cda04f0980b82124ad92d54715592e2ae07856909edc3928e0b1ef8b6b2afe2316043d9805b4b42f99a27dd2
@@ -89,21 +89,9 @@ module Dependabot
89
89
  @automerge_candidate
90
90
  end
91
91
 
92
- # rubocop:disable Metrics/PerceivedComplexity
93
92
  def update_type
94
93
  return unless dependencies.any?(&:previous_version)
95
94
 
96
- precision = dependencies.map do |dep|
97
- new_version_parts = version(dep).split(".")
98
- old_version_parts = previous_version(dep)&.split(".") || []
99
- all_parts = new_version_parts.first(3) + old_version_parts.first(3)
100
- next 0 unless all_parts.all? { |part| part.to_i.to_s == part }
101
- next 1 if new_version_parts[0] != old_version_parts[0]
102
- next 2 if new_version_parts[1] != old_version_parts[1]
103
-
104
- 3
105
- end.min
106
-
107
95
  case precision
108
96
  when 0 then "non-semver"
109
97
  when 1 then "major"
@@ -112,7 +100,18 @@ module Dependabot
112
100
  end
113
101
  end
114
102
 
115
- # rubocop:enable Metrics/PerceivedComplexity
103
+ def precision
104
+ dependencies.map do |dep|
105
+ new_version_parts = version(dep).split(/[.+]/)
106
+ old_version_parts = previous_version(dep)&.split(/[.+]/) || []
107
+ all_parts = new_version_parts.first(3) + old_version_parts.first(3)
108
+ next 0 unless all_parts.all? { |part| part.to_i.to_s == part }
109
+ next 1 if new_version_parts[0] != old_version_parts[0]
110
+ next 2 if new_version_parts[1] != old_version_parts[1]
111
+
112
+ 3
113
+ end.min
114
+ end
116
115
 
117
116
  def version(dep)
118
117
  return dep.version if version_class.correct?(dep.version)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dependabot
4
- VERSION = "0.118.4"
4
+ VERSION = "0.118.5"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dependabot-common
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.118.4
4
+ version: 0.118.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dependabot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-19 00:00:00.000000000 Z
11
+ date: 2020-06-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-codecommit