dependabot-common 0.122.0 → 0.122.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of dependabot-common might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0cb8d42beb59f598224b8eeabe01953e3feb92f61e63231ae2e6842f1d848269
4
- data.tar.gz: 5a89adfdc3206b73f54a7fc3d72dcb04c18524d6becdb910f9de5f89bbcb8ae3
3
+ metadata.gz: 86a9ccf63224238e2e7f39527f062c1f24f393d321adef7fb79a6723f943baa2
4
+ data.tar.gz: fac6a851e46d4be8107ca182e24beaea98849a59ab8bd3881e4149646e9f7e13
5
5
  SHA512:
6
- metadata.gz: e97880807e925c059b3b48c9835f70981536b49b82a2e912c8d288fc19d46cb3e705c23a43cd31b3db626249f3383e95bbb334512cc4a7c834b625047c5d6640
7
- data.tar.gz: 2f257b6b8e0344bd3992695fb6594702ec6df167f41043f450e22a6719907042286c0fb5f55cf8071d067f705aa4f24a57a9387c0937ea7f9e9f9754ab043f2f
6
+ metadata.gz: 7cbc55bfba0ad3fe380e192fa93fa1b789ca03a997357656a226b671b80425d5a84d4e769a2df9b7571659e8a218427573e7a139fc8a01956cb940a4e5028769
7
+ data.tar.gz: dbf7ee136e1f93f7fa27a5495c70e6dcc6c0107728000f386c1605e621ab3a287a62d00fd60fd4debe1967e611b4e64aa7e25a7451fe55520eea5107841bec14
@@ -5,35 +5,6 @@ require "dependabot/dependency_file"
5
5
  module Dependabot
6
6
  module FileUpdaters
7
7
  class VendorUpdater
8
- # notable filenames without a reliable extension:
9
- TEXT_FILE_NAMES = [
10
- "README",
11
- "LICENSE",
12
- "Gemfile",
13
- "Gemfile.lock",
14
- ".bundlecache",
15
- ".gitignore"
16
- ].freeze
17
-
18
- TEXT_FILE_EXTS = [
19
- # code
20
- ".rb",
21
- ".erb",
22
- ".gemspec",
23
- ".js",
24
- ".html",
25
- # config
26
- ".json",
27
- ".xml",
28
- ".toml",
29
- ".yaml",
30
- ".yml",
31
- # docs
32
- ".md",
33
- ".txt",
34
- ".go"
35
- ].freeze
36
-
37
8
  def initialize(repo_contents_path:, vendor_dir:)
38
9
  @repo_contents_path = repo_contents_path
39
10
  @vendor_dir = vendor_dir
@@ -73,13 +44,16 @@ module Dependabot
73
44
 
74
45
  private
75
46
 
47
+ BINARY_ENCODINGS = %w(application/x-tarbinary binary).freeze
48
+
76
49
  attr_reader :repo_contents_path, :vendor_dir
77
50
 
78
51
  def binary_file?(path)
79
- return false if TEXT_FILE_NAMES.include?(File.basename(path))
80
- return false if TEXT_FILE_EXTS.include?(File.extname(path))
52
+ return false unless File.exist?(path)
53
+
54
+ encoding = `file -b --mime-encoding #{path}`.strip
81
55
 
82
- true
56
+ BINARY_ENCODINGS.include?(encoding)
83
57
  end
84
58
  end
85
59
  end
@@ -173,6 +173,9 @@ module Dependabot
173
173
  end
174
174
 
175
175
  def self.configure_git_to_use_https_with_credentials(credentials)
176
+ File.open(GIT_CONFIG_GLOBAL_PATH, "w") do |file|
177
+ file << "# Generated by dependabot/dependabot-core"
178
+ end
176
179
  configure_git_to_use_https
177
180
  configure_git_credentials(credentials)
178
181
  end
@@ -258,7 +261,10 @@ module Dependabot
258
261
  end
259
262
 
260
263
  def self.reset_global_git_config(backup_path)
261
- return if backup_path.nil?
264
+ if backup_path.nil?
265
+ FileUtils.rm(GIT_CONFIG_GLOBAL_PATH)
266
+ return
267
+ end
262
268
  return unless File.exist?(backup_path)
263
269
 
264
270
  FileUtils.mv(backup_path, GIT_CONFIG_GLOBAL_PATH)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dependabot
4
- VERSION = "0.122.0"
4
+ VERSION = "0.122.1"
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.122.0
4
+ version: 0.122.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dependabot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-07 00:00:00.000000000 Z
11
+ date: 2020-10-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-codecommit
@@ -292,14 +292,14 @@ dependencies:
292
292
  requirements:
293
293
  - - "~>"
294
294
  - !ruby/object:Gem::Version
295
- version: 0.92.0
295
+ version: 0.93.0
296
296
  type: :development
297
297
  prerelease: false
298
298
  version_requirements: !ruby/object:Gem::Requirement
299
299
  requirements:
300
300
  - - "~>"
301
301
  - !ruby/object:Gem::Version
302
- version: 0.92.0
302
+ version: 0.93.0
303
303
  - !ruby/object:Gem::Dependency
304
304
  name: simplecov
305
305
  requirement: !ruby/object:Gem::Requirement