dependabot-bundler 0.258.0 → 0.260.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: c05e36a108ee23327e96a2d23aa12c70539d40817036e5f06d173145a7bcca22
4
- data.tar.gz: a71ba498133687bec52f73cfa49047526026bbfe9dbe6d1c91b5180613c19c90
3
+ metadata.gz: c9538499869166af66a0f2a6659e4e98a79e315448a80829ab14e92b28957594
4
+ data.tar.gz: c7b99137ddf893896b49fcb90e33144d5dd4b25cf2f1e423bfb5c93a3659e896
5
5
  SHA512:
6
- metadata.gz: 319e8308114b8d774ce11e62d85c1937e71d7f6090f0c53d01af71df2d555cbdd297a0bf02e7da8d26b2a32ca8e696fac79077882d6c7eeb20e822e34d543402
7
- data.tar.gz: c60531c805a0624d8c24a105d91abfc5724482ba1f904bd5f5ea2d428d788bac09204e868daba3896ce67c55221b5319b712341ee1d07bf2555a6427a9d5b26c
6
+ metadata.gz: 1ae19b8684f6edd8021bfe9ea83b9e434c97a76718d5c7acb510fb063473c0537492cfad227edd1b1d7fdd5260dea1256df3cae09dfc8b0573945f0ce39a13c9
7
+ data.tar.gz: 7feb5e67e67b9740b465371bbc38cb5f2796c0b07f38b0bf34a18ea3c6939dca58e577ead93168ed35947a8a0e2810364e93dbed3c72efc345d84072b87aa393
@@ -36,7 +36,7 @@ RSpec.describe Functions::ConflictingDependencyResolver do
36
36
  )
37
37
  end
38
38
 
39
- context "with nested transitive dependencies" do
39
+ context "when dealing with nested transitive dependencies" do
40
40
  let(:project_name) { "transitive_blocking" }
41
41
  let(:dependency_name) { "activesupport" }
42
42
  let(:target_version) { "6.0.0" }
@@ -47,7 +47,7 @@ RSpec.describe Functions::DependencySource do
47
47
  ])
48
48
  end
49
49
 
50
- context "with specified as the default source" do
50
+ context "when specified as the default source" do
51
51
  let(:project_name) { "specified_default_source_no_lockfile" }
52
52
 
53
53
  it "returns all versions from the private source" do
@@ -59,7 +59,7 @@ RSpec.describe Functions::DependencySource do
59
59
  end
60
60
  end
61
61
 
62
- context "when that we don't have authentication details for" do
62
+ context "when we don't have authentication details for" do
63
63
  before do
64
64
  stub_request(:get, registry_url + "versions")
65
65
  .with(basic_auth: ["SECRET_CODES", ""])
@@ -83,7 +83,7 @@ RSpec.describe Functions::DependencySource do
83
83
  end
84
84
  end
85
85
 
86
- context "when that we have bad authentication details for" do
86
+ context "when we have bad authentication details" do
87
87
  before do
88
88
  stub_request(:get, registry_url + "versions")
89
89
  .with(basic_auth: ["SECRET_CODES", ""])
@@ -107,7 +107,7 @@ RSpec.describe Functions::DependencySource do
107
107
  end
108
108
  end
109
109
 
110
- context "when that bad-requested, but was a private repo" do
110
+ context "when bad-requested, but is a private repo" do
111
111
  before do
112
112
  stub_request(:get, registry_url + "versions")
113
113
  .with(basic_auth: ["SECRET_CODES", ""])
@@ -130,7 +130,7 @@ RSpec.describe Functions::DependencySource do
130
130
  end
131
131
  end
132
132
 
133
- context "when that doesn't have details of the gem" do
133
+ context "when it doesn't have details of the gem" do
134
134
  before do
135
135
  stub_request(:get, gemfury_business_url)
136
136
  .with(basic_auth: ["SECRET_CODES", ""])
@@ -152,7 +152,7 @@ RSpec.describe Functions::DependencySource do
152
152
  it { is_expected.to be_empty }
153
153
  end
154
154
 
155
- context "when that only implements the old Bundler index format..." do
155
+ context "when it only implements the old Bundler index format" do
156
156
  let(:project_name) { "sidekiq_pro" }
157
157
  let(:dependency_name) { "sidekiq-pro" }
158
158
  let(:registry_url) { "https://gems.contribsys.com/" }
@@ -179,7 +179,7 @@ RSpec.describe Functions::DependencySource do
179
179
  end
180
180
 
181
181
  it "returns all versions from the private source" do
182
- expect(private_registry_versions.length).to eql(70)
182
+ expect(private_registry_versions.length).to be(70)
183
183
  expect(private_registry_versions.min).to eql(Gem::Version.new("1.0.0"))
184
184
  expect(private_registry_versions.max).to eql(Gem::Version.new("3.5.2"))
185
185
  end
@@ -14,14 +14,14 @@ RSpec.describe Functions::FileParser do
14
14
  end
15
15
 
16
16
  describe "#parsed_gemfile" do
17
- let(:project_name) { "gemfile" }
18
-
19
17
  subject(:parsed_gemfile) do
20
18
  in_tmp_folder do
21
19
  dependency_source.parsed_gemfile(gemfile_name: "Gemfile")
22
20
  end
23
21
  end
24
22
 
23
+ let(:project_name) { "gemfile" }
24
+
25
25
  it "parses gemfile" do
26
26
  parsed_gemfile = [
27
27
  {
@@ -44,14 +44,14 @@ RSpec.describe Functions::FileParser do
44
44
  end
45
45
 
46
46
  describe "#parsed_gemspec" do
47
- let(:project_name) { "gemfile_exact" }
48
-
49
47
  subject(:parsed_gemspec) do
50
48
  in_tmp_folder do |_tmp_path|
51
49
  dependency_source.parsed_gemspec(gemspec_name: "example.gemspec")
52
50
  end
53
51
  end
54
52
 
53
+ let(:project_name) { "gemfile_exact" }
54
+
55
55
  it "parses gemspec" do
56
56
  parsed_gemspec = [
57
57
  {
@@ -6,7 +6,7 @@ require "shared_contexts"
6
6
 
7
7
  RSpec.describe Functions::ForceUpdater do
8
8
  include_context "when in a temporary bundler directory"
9
- include_context "when stub rubygems compact index"
9
+ include_context "when stubbing rubygems compact index"
10
10
 
11
11
  let(:force_updater) do
12
12
  described_class.new(
@@ -6,7 +6,7 @@ require "shared_contexts"
6
6
 
7
7
  RSpec.describe Functions::VersionResolver do
8
8
  include_context "when in a temporary bundler directory"
9
- include_context "when stub rubygems compact index"
9
+ include_context "when stubbing rubygems compact index"
10
10
 
11
11
  let(:version_resolver) do
12
12
  described_class.new(
@@ -43,7 +43,7 @@ RSpec.describe Functions::VersionResolver do
43
43
  its([:fetcher]) { is_expected.to eq("Bundler::Fetcher::CompactIndex") }
44
44
 
45
45
  context "with a private gemserver source" do
46
- include_context "when stub rubygems compact index"
46
+ include_context "when stubbing rubygems compact index"
47
47
 
48
48
  let(:project_name) { "specified_source" }
49
49
  let(:requirement_string) { ">= 0" }
@@ -34,7 +34,7 @@ RSpec.shared_context "without caching rubygems" do
34
34
  end
35
35
  end
36
36
 
37
- RSpec.shared_context "when stub rubygems compact index" do
37
+ RSpec.shared_context "when stubbing rubygems compact index" do
38
38
  include_context "without caching rubygems"
39
39
 
40
40
  before do
@@ -189,7 +189,7 @@ module Functions
189
189
  # if those sub-deps are top-level dependencies. We only want true
190
190
  # subdeps unlocked, like they were in the UpdateChecker, so we
191
191
  # mutate the unlocked gems array.
192
- unlocked = defn.instance_variable_get(:@unlock).fetch(:gems)
192
+ unlocked = defn.instance_variable_get(:@gems_to_unlock)
193
193
  must_not_unlock = defn.dependencies.map { |x| x.name.to_s } -
194
194
  dependencies_to_unlock
195
195
  unlocked.reject! { |n| must_not_unlock.include?(n) }
@@ -36,7 +36,7 @@ RSpec.describe Functions::ConflictingDependencyResolver do
36
36
  )
37
37
  end
38
38
 
39
- context "with nested transitive dependencies" do
39
+ context "when dealing with nested transitive dependencies" do
40
40
  let(:project_name) { "transitive_blocking" }
41
41
  let(:dependency_name) { "activesupport" }
42
42
  let(:target_version) { "6.0.0" }
@@ -47,7 +47,7 @@ RSpec.describe Functions::DependencySource do
47
47
  ])
48
48
  end
49
49
 
50
- context "with specified as the default source" do
50
+ context "when specified as the default source" do
51
51
  let(:project_name) { "specified_default_source_no_lockfile" }
52
52
 
53
53
  it "returns all versions from the private source" do
@@ -59,7 +59,7 @@ RSpec.describe Functions::DependencySource do
59
59
  end
60
60
  end
61
61
 
62
- context "when that we don't have authentication details for" do
62
+ context "when we don't have authentication details" do
63
63
  before do
64
64
  stub_request(:get, registry_url + "versions")
65
65
  .with(basic_auth: ["SECRET_CODES", ""])
@@ -82,7 +82,7 @@ RSpec.describe Functions::DependencySource do
82
82
  end
83
83
  end
84
84
 
85
- context "when that we have bad authentication details for" do
85
+ context "when we have bad authentication details" do
86
86
  before do
87
87
  stub_request(:get, registry_url + "versions")
88
88
  .with(basic_auth: ["SECRET_CODES", ""])
@@ -105,7 +105,7 @@ RSpec.describe Functions::DependencySource do
105
105
  end
106
106
  end
107
107
 
108
- context "when that bad-requested, but was a private repo" do
108
+ context "when there is a bad request but it's a private repo" do
109
109
  before do
110
110
  stub_request(:get, registry_url + "versions")
111
111
  .with(basic_auth: ["SECRET_CODES", ""])
@@ -131,7 +131,7 @@ RSpec.describe Functions::DependencySource do
131
131
  end
132
132
  end
133
133
 
134
- context "when that doesn't have details of the gem" do
134
+ context "when the gem details are not available" do
135
135
  before do
136
136
  stub_request(:get, gemfury_business_url)
137
137
  .with(basic_auth: ["SECRET_CODES", ""])
@@ -153,7 +153,7 @@ RSpec.describe Functions::DependencySource do
153
153
  it { is_expected.to be_empty }
154
154
  end
155
155
 
156
- context "when that only implements the old Bundler index format..." do
156
+ context "when only the old Bundler index format is implemented" do
157
157
  let(:project_name) { "sidekiq_pro" }
158
158
  let(:dependency_name) { "sidekiq-pro" }
159
159
  let(:registry_url) { "https://gems.contribsys.com/" }
@@ -180,7 +180,7 @@ RSpec.describe Functions::DependencySource do
180
180
  end
181
181
 
182
182
  it "returns all versions from the private source" do
183
- expect(private_registry_versions.length).to eql(70)
183
+ expect(private_registry_versions.length).to be(70)
184
184
  expect(private_registry_versions.min).to eql(Gem::Version.new("1.0.0"))
185
185
  expect(private_registry_versions.max).to eql(Gem::Version.new("3.5.2"))
186
186
  end
@@ -14,14 +14,14 @@ RSpec.describe Functions::FileParser do
14
14
  end
15
15
 
16
16
  describe "#parsed_gemfile" do
17
- let(:project_name) { "gemfile" }
18
-
19
17
  subject(:parsed_gemfile) do
20
18
  in_tmp_folder do
21
19
  dependency_source.parsed_gemfile(gemfile_name: "Gemfile")
22
20
  end
23
21
  end
24
22
 
23
+ let(:project_name) { "gemfile" }
24
+
25
25
  it "parses gemfile" do
26
26
  parsed_gemfile = [
27
27
  {
@@ -109,14 +109,14 @@ RSpec.describe Functions::FileParser do
109
109
  end
110
110
 
111
111
  describe "#parsed_gemspec" do
112
- let(:project_name) { "gemfile_exact" }
113
-
114
112
  subject(:parsed_gemspec) do
115
113
  in_tmp_folder do |_tmp_path|
116
114
  dependency_source.parsed_gemspec(gemspec_name: "example.gemspec")
117
115
  end
118
116
  end
119
117
 
118
+ let(:project_name) { "gemfile_exact" }
119
+
120
120
  it "parses gemspec" do
121
121
  parsed_gemspec = [
122
122
  {
@@ -6,7 +6,7 @@ require "shared_contexts"
6
6
 
7
7
  RSpec.describe Functions::ForceUpdater do
8
8
  include_context "when in a temporary bundler directory"
9
- include_context "when stub rubygems compact index"
9
+ include_context "when stubbing rubygems compact index"
10
10
 
11
11
  let(:force_updater) do
12
12
  described_class.new(
@@ -6,7 +6,7 @@ require "shared_contexts"
6
6
 
7
7
  RSpec.describe Functions::VersionResolver do
8
8
  include_context "when in a temporary bundler directory"
9
- include_context "when stub rubygems compact index"
9
+ include_context "when stubbing rubygems compact index"
10
10
 
11
11
  let(:version_resolver) do
12
12
  described_class.new(
@@ -36,6 +36,9 @@ RSpec.describe Functions::VersionResolver do
36
36
  stub_request(:get, "https://rubygems.org/quick/Marshal.4.8/statesman-1.2.1.gemspec.rz")
37
37
  .to_return(status: 200, body: fixture("rubygems_responses", "statesman-1.2.1.gemspec.rz"))
38
38
 
39
+ stub_request(:get, "https://rubygems.org/quick/Marshal.4.8/statesman-1.2.5.gemspec.rz")
40
+ .to_return(status: 200, body: fixture("rubygems_responses", "statesman-1.2.5.gemspec.rz"))
41
+
39
42
  stub_request(:get, %r{quick/Marshal.4.8/business-.*.gemspec.rz})
40
43
  .to_return(status: 200, body: fixture("rubygems_responses", "business-1.0.0.gemspec.rz"))
41
44
  end
@@ -52,7 +55,7 @@ RSpec.describe Functions::VersionResolver do
52
55
  its([:fetcher]) { is_expected.to eq("Bundler::Fetcher::CompactIndex") }
53
56
 
54
57
  context "with a private gemserver source" do
55
- include_context "when stub rubygems compact index"
58
+ include_context "when stubbing rubygems compact index"
56
59
 
57
60
  let(:project_name) { "specified_source" }
58
61
  let(:requirement_string) { ">= 0" }
@@ -102,12 +105,12 @@ RSpec.describe Functions::VersionResolver do
102
105
  its([:fetcher]) { is_expected.to eq("Bundler::Fetcher::Dependency") }
103
106
  end
104
107
 
105
- context "with no update possible due to a version conflict" do
108
+ context "when there's a version conflict with a subdep also listed as a top level dependency" do
106
109
  let(:project_name) { "version_conflict_with_listed_subdep" }
107
110
  let(:dependency_name) { "rspec-mocks" }
108
111
  let(:requirement_string) { ">= 0" }
109
112
 
110
- its([:version]) { is_expected.to eq(Gem::Version.new("3.6.0")) }
113
+ its([:version]) { is_expected.to be > Gem::Version.new("3.6.0") }
111
114
  end
112
115
  end
113
116
  end
@@ -12,7 +12,7 @@ RSpec.describe Functions do
12
12
 
13
13
  it "returns the jfrog source" do
14
14
  in_tmp_folder do
15
- jfrog_source = Functions.jfrog_source(
15
+ jfrog_source = described_class.jfrog_source(
16
16
  dir: tmp_path,
17
17
  gemfile_name: "Gemfile",
18
18
  credentials: {}
@@ -24,10 +24,9 @@ RSpec.describe Functions do
24
24
  end
25
25
 
26
26
  describe "#git_specs" do
27
- let(:project_name) { "git_source" }
28
27
  subject(:git_specs) do
29
28
  in_tmp_folder do
30
- Functions.git_specs(
29
+ described_class.git_specs(
31
30
  dir: tmp_path,
32
31
  gemfile_name: "Gemfile",
33
32
  credentials: {}
@@ -35,6 +34,8 @@ RSpec.describe Functions do
35
34
  end
36
35
  end
37
36
 
37
+ let(:project_name) { "git_source" }
38
+
38
39
  def expect_specs(count)
39
40
  expect(git_specs.size).to eq(count)
40
41
  git_specs.each do |gs|
@@ -6,13 +6,15 @@ require "shared_contexts"
6
6
 
7
7
  RSpec.describe BundlerDefinitionRubyVersionPatch do
8
8
  include_context "when in a temporary bundler directory"
9
- include_context "when stub rubygems compact index"
9
+ include_context "when stubbing rubygems compact index"
10
10
 
11
11
  let(:project_name) { "ruby_version_implied" }
12
+
12
13
  before do
13
14
  @ui = Bundler.ui
14
15
  Bundler.ui = Bundler::UI::Silent.new
15
16
  end
17
+
16
18
  after { Bundler.ui = @ui }
17
19
 
18
20
  it "updates to the most recent version" do
@@ -27,7 +27,7 @@ RSpec.shared_context "when in a temporary bundler directory" do
27
27
  end
28
28
  end
29
29
 
30
- RSpec.shared_context "when stub rubygems compact index" do
30
+ RSpec.shared_context "when stubbing rubygems compact index" do
31
31
  before do
32
32
  # Stub the Rubygems index
33
33
  stub_request(:get, "https://index.rubygems.org/versions")
@@ -45,6 +45,7 @@ module Dependabot
45
45
  fetched_files += child_gemfiles
46
46
  fetched_files += gemspecs
47
47
  fetched_files << ruby_version_file if ruby_version_file
48
+ fetched_files << tool_versions_file if tool_versions_file
48
49
  fetched_files += path_gemspecs
49
50
  fetched_files += require_relative_files(fetched_files)
50
51
 
@@ -100,9 +101,13 @@ module Dependabot
100
101
  def ruby_version_file
101
102
  return unless gemfile
102
103
 
103
- @ruby_version_file ||=
104
- fetch_file_if_present(".ruby-version")
105
- &.tap { |f| f.support_file = true }
104
+ @ruby_version_file ||= fetch_support_file(".ruby-version")
105
+ end
106
+
107
+ def tool_versions_file
108
+ return unless gemfile
109
+
110
+ @tool_versions_file ||= fetch_support_file(".tool-versions")
106
111
  end
107
112
 
108
113
  def path_gemspecs
@@ -28,6 +28,7 @@ module Dependabot
28
28
  *evaled_gemfiles,
29
29
  lockfile,
30
30
  ruby_version_file,
31
+ tool_versions_file,
31
32
  *imported_ruby_files,
32
33
  *specification_files
33
34
  ].compact
@@ -47,10 +48,10 @@ module Dependabot
47
48
  .reject { |f| f.name.end_with?(".gemspec") }
48
49
  .reject { |f| f.name.end_with?(".specification") }
49
50
  .reject { |f| f.name.end_with?(".lock") }
50
- .reject { |f| f.name.end_with?(".ruby-version") }
51
51
  .reject { |f| f.name == "Gemfile" }
52
52
  .reject { |f| f.name == "gems.rb" }
53
53
  .reject { |f| f.name == "gems.locked" }
54
+ .reject(&:support_file?)
54
55
  end
55
56
 
56
57
  def specification_files
@@ -70,6 +71,10 @@ module Dependabot
70
71
  dependency_files.find { |f| f.name == ".ruby-version" }
71
72
  end
72
73
 
74
+ def tool_versions_file
75
+ dependency_files.find { |f| f.name == ".tool-versions" }
76
+ end
77
+
73
78
  def imported_ruby_files
74
79
  dependency_files
75
80
  .select { |f| f.name.end_with?(".rb") }
@@ -245,10 +245,10 @@ module Dependabot
245
245
  .reject { |f| f.name.end_with?(".gemspec") }
246
246
  .reject { |f| f.name.end_with?(".specification") }
247
247
  .reject { |f| f.name.end_with?(".lock") }
248
- .reject { |f| f.name.end_with?(".ruby-version") }
249
248
  .reject { |f| f.name == "Gemfile" }
250
249
  .reject { |f| f.name == "gems.rb" }
251
250
  .reject { |f| f.name == "gems.locked" }
251
+ .reject(&:support_file?)
252
252
  end
253
253
 
254
254
  def lockfile
@@ -96,6 +96,7 @@ module Dependabot
96
96
 
97
97
  write_gemspecs(top_level_gemspecs)
98
98
  write_ruby_version_file
99
+ write_tool_versions_file
99
100
  write_gemspecs(path_gemspecs)
100
101
  write_specification_files
101
102
  write_imported_ruby_files
@@ -115,6 +116,14 @@ module Dependabot
115
116
  File.write(path, ruby_version_file.content)
116
117
  end
117
118
 
119
+ def write_tool_versions_file
120
+ return unless tool_versions_file
121
+
122
+ path = tool_versions_file.name
123
+ FileUtils.mkdir_p(Pathname.new(path).dirname)
124
+ File.write(path, tool_versions_file.content)
125
+ end
126
+
118
127
  def write_gemspecs(files)
119
128
  files.each do |file|
120
129
  path = file.name
@@ -160,6 +169,10 @@ module Dependabot
160
169
  dependency_files.find { |f| f.name == ".ruby-version" }
161
170
  end
162
171
 
172
+ def tool_versions_file
173
+ dependency_files.find { |f| f.name == ".tool-versions" }
174
+ end
175
+
163
176
  def post_process_lockfile(lockfile_body)
164
177
  lockfile_body = reorder_git_dependencies(lockfile_body)
165
178
  replace_lockfile_ending(lockfile_body)
@@ -269,7 +282,6 @@ module Dependabot
269
282
  .reject { |f| f.name.end_with?(".gemspec") }
270
283
  .reject { |f| f.name.end_with?(".specification") }
271
284
  .reject { |f| f.name.end_with?(".lock") }
272
- .reject { |f| f.name.end_with?(".ruby-version") }
273
285
  .reject { |f| f.name == "Gemfile" }
274
286
  .reject { |f| f.name == "gems.rb" }
275
287
  .reject { |f| f.name == "gems.locked" }
@@ -1,4 +1,4 @@
1
- # typed: false
1
+ # typed: true
2
2
  # frozen_string_literal: true
3
3
 
4
4
  require "dependabot/file_updaters"
@@ -27,7 +27,7 @@ module Dependabot
27
27
  # rubocop:disable Metrics/PerceivedComplexity
28
28
  # rubocop:disable Metrics/AbcSize
29
29
  def updated_dependency_files
30
- updated_files = []
30
+ updated_files = T.let([], T::Array[Dependabot::DependencyFile])
31
31
 
32
32
  if gemfile && file_changed?(gemfile)
33
33
  updated_files <<
@@ -58,7 +58,7 @@ module Dependabot
58
58
 
59
59
  check_updated_files(updated_files)
60
60
 
61
- base_dir = updated_files.first.directory
61
+ base_dir = T.must(updated_files.first).directory
62
62
  vendor_updater
63
63
  .updated_vendor_cache_files(base_directory: base_dir)
64
64
  .each do |file|
@@ -127,10 +127,10 @@ module Dependabot
127
127
  .reject { |f| f.name.end_with?(".gemspec") }
128
128
  .reject { |f| f.name.end_with?(".specification") }
129
129
  .reject { |f| f.name.end_with?(".lock") }
130
- .reject { |f| f.name.end_with?(".ruby-version") }
131
130
  .reject { |f| f.name == "Gemfile" }
132
131
  .reject { |f| f.name == "gems.rb" }
133
132
  .reject { |f| f.name == "gems.locked" }
133
+ .reject(&:support_file?)
134
134
  end
135
135
 
136
136
  def updated_gemfile_content(file)
@@ -1,4 +1,4 @@
1
- # typed: false
1
+ # typed: true
2
2
  # frozen_string_literal: true
3
3
 
4
4
  require "excon"
@@ -87,7 +87,7 @@ module Dependabot
87
87
  end
88
88
 
89
89
  source_url = github_urls.find do |url|
90
- repo = Source.from_url(url).repo
90
+ repo = T.must(Source.from_url(url)).repo
91
91
  repo.downcase.end_with?(dependency.name)
92
92
  end
93
93
  return unless source_url
@@ -102,7 +102,7 @@ module Dependabot
102
102
  rubygems_marshalled_gemspec_response.gsub("\x06;", "\n")
103
103
  .scan(Dependabot::Source::SOURCE_REGEX) do
104
104
  github_urls << (Regexp.last_match.to_s +
105
- Regexp.last_match.post_match.split("\n").first)
105
+ T.must(T.must(Regexp.last_match).post_match.split("\n").first))
106
106
  end
107
107
 
108
108
  github_urls.find do |url|
@@ -204,7 +204,7 @@ module Dependabot
204
204
  cred["type"] == "rubygems_server" && cred.replaces_base?
205
205
  end
206
206
  host = credential ? credential["host"] : "rubygems.org"
207
- @base_url = "https://#{host}" + ("/" unless host.end_with?("/"))
207
+ @base_url = "https://#{host}#{host&.end_with?('/') ? '' : '/'}"
208
208
  end
209
209
 
210
210
  def registry_auth_headers
@@ -94,6 +94,7 @@ module Dependabot
94
94
  files += [
95
95
  lockfile,
96
96
  ruby_version_file,
97
+ tool_versions_file,
97
98
  *imported_ruby_files,
98
99
  *specification_files
99
100
  ].compact
@@ -130,10 +131,10 @@ module Dependabot
130
131
  .reject { |f| f.name.end_with?(".gemspec") }
131
132
  .reject { |f| f.name.end_with?(".specification") }
132
133
  .reject { |f| f.name.end_with?(".lock") }
133
- .reject { |f| f.name.end_with?(".ruby-version") }
134
134
  .reject { |f| f.name == "Gemfile" }
135
135
  .reject { |f| f.name == "gems.rb" }
136
136
  .reject { |f| f.name == "gems.locked" }
137
+ .reject(&:support_file?)
137
138
  end
138
139
 
139
140
  def lockfile
@@ -154,6 +155,10 @@ module Dependabot
154
155
  dependency_files.find { |f| f.name == ".ruby-version" }
155
156
  end
156
157
 
158
+ def tool_versions_file
159
+ dependency_files.find { |f| f.name == ".tool-versions" }
160
+ end
161
+
157
162
  def path_gemspecs
158
163
  all = dependency_files.select { |f| f.name.end_with?(".gemspec") }
159
164
  all - top_level_gemspecs
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dependabot-bundler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.258.0
4
+ version: 0.260.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-05-16 00:00:00.000000000 Z
11
+ date: 2024-06-06 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.258.0
19
+ version: 0.260.0
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.258.0
26
+ version: 0.260.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: parallel
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -345,7 +345,7 @@ licenses:
345
345
  - MIT
346
346
  metadata:
347
347
  bug_tracker_uri: https://github.com/dependabot/dependabot-core/issues
348
- changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.258.0
348
+ changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.260.0
349
349
  post_install_message:
350
350
  rdoc_options: []
351
351
  require_paths: