dependabot-common 0.117.10 → 0.117.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: a2a9d6ee089d6bb1c3e08a6858d924b995e13bfa7238746ccd8c55d217517185
4
- data.tar.gz: 67048f550cf7595808e21d0cdf4864bf662140706261b3843f19bc480028c5c6
3
+ metadata.gz: f9bf01da8e85f311c5f744d9fccec69f131a2bc551bdff723bdb88765ad5f4bb
4
+ data.tar.gz: 43dda42e7d00f2fe38a615d5a43ac348db776aa8d4ffa2b1bb7b5cb4eda89b88
5
5
  SHA512:
6
- metadata.gz: e3211d6c6f5da2b379377cf28552d5173ccda7285bad50e1a85c433a0202655cd414ca21d80b521f925092faa22d1eb64ddb9066d91384f8d19e5399b9c8fcc7
7
- data.tar.gz: '087ea4164b328bb0ed195b8a4f44c0c92358b1e763d186f22008f704097a59d16403c8d304cd503c1697631f5c022c7b143d69d10f27ccd458f384050199907c'
6
+ metadata.gz: 648649bb88adb63afd732801a7701fbc93ae2193a5ff60cf3f6435f04cd5d52c95f7023ff576ea4f3d6d4a5f0f30c9291934867fdff47a036df7460b4a79afc2
7
+ data.tar.gz: dc88d883d3f19d9c8e0fde81913abf884438fa4d9ecea31a0e1d8c000e3a6fcfd6c7073ec86fb0bf8b0d47f5a86c4be047a55421f989daba1463385fdae5c379
@@ -25,7 +25,7 @@ module Dependabot
25
25
  class OutOfMemory < DependabotError; end
26
26
 
27
27
  #####################
28
- # Repo leval errors #
28
+ # Repo level errors #
29
29
  #####################
30
30
 
31
31
  class BranchNotFound < DependabotError
@@ -191,4 +191,7 @@ module Dependabot
191
191
  super(msg)
192
192
  end
193
193
  end
194
+
195
+ # Raised by UpdateChecker if all candidate updates are ignored
196
+ class AllVersionsIgnored < DependabotError; end
194
197
  end
@@ -21,11 +21,13 @@ module Dependabot
21
21
  )$
22
22
  /ix.freeze
23
23
 
24
- def initialize(dependency:, credentials:, ignored_versions: [],
24
+ def initialize(dependency:, credentials:,
25
+ ignored_versions: [], raise_on_ignored: false,
25
26
  requirement_class: nil, version_class: nil)
26
27
  @dependency = dependency
27
28
  @credentials = credentials
28
29
  @ignored_versions = ignored_versions
30
+ @raise_on_ignored = raise_on_ignored
29
31
  @requirement_class = requirement_class
30
32
  @version_class = version_class
31
33
  end
@@ -85,15 +87,22 @@ module Dependabot
85
87
  end
86
88
 
87
89
  def local_tag_for_latest_version
88
- tag =
90
+ tags =
89
91
  local_tags.
90
- select { |t| version_tag?(t.name) && matches_existing_prefix?(t.name) }.
91
- reject { |t| tag_included_in_ignore_reqs?(t) }.
92
- reject { |t| tag_is_prerelease?(t) && !wants_prerelease? }.
93
- max_by do |t|
94
- version = t.name.match(VERSION_REGEX).named_captures.fetch("version")
95
- version_class.new(version)
96
- end
92
+ select { |t| version_tag?(t.name) && matches_existing_prefix?(t.name) }
93
+ filtered = tags.
94
+ reject { |t| tag_included_in_ignore_reqs?(t) }
95
+ if @raise_on_ignored && tags.any? && filtered.empty?
96
+ raise Dependabot::AllVersionsIgnored
97
+ end
98
+
99
+ tag = filtered.
100
+ reject { |t| tag_is_prerelease?(t) && !wants_prerelease? }.
101
+ max_by do |t|
102
+ version = t.name.match(VERSION_REGEX).named_captures.
103
+ fetch("version")
104
+ version_class.new(version)
105
+ end
97
106
 
98
107
  return unless tag
99
108
 
@@ -8,17 +8,19 @@ module Dependabot
8
8
  module UpdateCheckers
9
9
  class Base
10
10
  attr_reader :dependency, :dependency_files, :credentials,
11
- :ignored_versions, :security_advisories,
12
- :requirements_update_strategy
11
+ :ignored_versions, :raise_on_ignored,
12
+ :security_advisories, :requirements_update_strategy
13
13
 
14
14
  def initialize(dependency:, dependency_files:, credentials:,
15
- ignored_versions: [], security_advisories: [],
15
+ ignored_versions: [], raise_on_ignored: false,
16
+ security_advisories: [],
16
17
  requirements_update_strategy: nil)
17
18
  @dependency = dependency
18
19
  @dependency_files = dependency_files
19
20
  @credentials = credentials
20
21
  @requirements_update_strategy = requirements_update_strategy
21
22
  @ignored_versions = ignored_versions
23
+ @raise_on_ignored = raise_on_ignored
22
24
  @security_advisories = security_advisories
23
25
  end
24
26
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dependabot
4
- VERSION = "0.117.10"
4
+ VERSION = "0.117.11"
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.117.10
4
+ version: 0.117.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dependabot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-21 00:00:00.000000000 Z
11
+ date: 2020-05-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-codecommit