dependabot-common 0.266.0 → 0.268.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: cd4978cb1971e267084db00cc1d4d4a69a0ffffa5337bd8d61039ba8240f537a
4
- data.tar.gz: d3b2ff619afff82aade103995ff62c8e5e1111834dd186acf328071a325c4362
3
+ metadata.gz: 8a779b1e8846b2da28c43d76739abf60349292ab1431d7730d6cead756430f0f
4
+ data.tar.gz: 9a7c408205325753e02fca44a016e01b0791405d86de1326fd8bed4bbbd6ef8e
5
5
  SHA512:
6
- metadata.gz: 8d90fcd1793af90f3552a542e6176ed06d55612a40680ca30c16e1e3c508d8025ca2b162840433027d99c9946cae89e19c2637141757c58b3138a4ad053fb7e7
7
- data.tar.gz: e9ce0c2eb12245518865405046cf403696b3acae3953936a5a93650f390396a70f5208727f0dd93ba385ae35353d0170e3ba9c05bacbee33b0539473df03a837
6
+ metadata.gz: 4469cf86037989c421a56b6469d5636c5d39b464e123f0b751ddba42033a927581c1ea98f3ed3eee33ff9f7ef7a7c66e96c231da3205d873de31797116b7a466
7
+ data.tar.gz: f795dc174aa6c603accb4b0a97da729608f7fd4eaaada087f1b151f696b7a5b215e0b4621fbedea8535febd43be7e3703d9b1e570c0ecb35575bcd713ab1599c
@@ -213,7 +213,8 @@ module Dependabot
213
213
  {
214
214
  "error-type": "missing_environment_variable",
215
215
  "error-detail": {
216
- "environment-variable": error.environment_variable
216
+ "environment-variable": error.environment_variable,
217
+ "error-message": error.message
217
218
  }
218
219
  }
219
220
  when Dependabot::GoModulePathMismatch
@@ -550,10 +551,15 @@ module Dependabot
550
551
  sig { returns(String) }
551
552
  attr_reader :environment_variable
552
553
 
553
- sig { params(environment_variable: String).void }
554
- def initialize(environment_variable)
554
+ sig { returns(String) }
555
+ attr_reader :message
556
+
557
+ sig { params(environment_variable: String, message: String).void }
558
+ def initialize(environment_variable, message = "")
555
559
  @environment_variable = environment_variable
556
- super("Missing environment variable #{@environment_variable}")
560
+ @message = message
561
+
562
+ super("Missing environment variable #{@environment_variable}. #{@message}")
557
563
  end
558
564
  end
559
565
 
@@ -198,6 +198,7 @@ module Dependabot
198
198
 
199
199
  sig { params(uri: String).returns(String) }
200
200
  def service_pack_uri(uri)
201
+ uri = uri_sanitize(uri)
201
202
  service_pack_uri = uri_with_auth(uri)
202
203
  service_pack_uri = service_pack_uri.gsub(%r{/$}, "")
203
204
  service_pack_uri += ".git" unless service_pack_uri.end_with?(".git") || skip_git_suffix(uri)
@@ -216,6 +217,7 @@ module Dependabot
216
217
  # (GitHub, GitLab, BitBucket) work with or without the suffix.
217
218
  # That change has other ramifications, so it'd be better if Azure started supporting ".git"
218
219
  # like all the other providers.
220
+ uri = uri_sanitize(uri)
219
221
  uri = SharedHelpers.scp_to_standard(uri)
220
222
  uri = URI(uri)
221
223
  hostname = uri.hostname.to_s
@@ -242,6 +244,12 @@ module Dependabot
242
244
  uri.to_s
243
245
  end
244
246
 
247
+ sig { params(uri: String).returns(String) }
248
+ def uri_sanitize(uri)
249
+ uri = uri.strip
250
+ uri.to_s
251
+ end
252
+
245
253
  sig { params(line: String).returns(String) }
246
254
  def sha_for_update_pack_line(line)
247
255
  T.must(line.split.first).chars.last(40).join
data/lib/dependabot.rb CHANGED
@@ -2,5 +2,5 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Dependabot
5
- VERSION = "0.266.0"
5
+ VERSION = "0.268.0"
6
6
  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.266.0
4
+ version: 0.268.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dependabot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-18 00:00:00.000000000 Z
11
+ date: 2024-08-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-codecommit
@@ -597,7 +597,7 @@ licenses:
597
597
  - MIT
598
598
  metadata:
599
599
  bug_tracker_uri: https://github.com/dependabot/dependabot-core/issues
600
- changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.266.0
600
+ changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.268.0
601
601
  post_install_message:
602
602
  rdoc_options: []
603
603
  require_paths: