dependabot-bundler 0.280.0 → 0.281.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dependabot/bundler/helpers.rb +1 -13
- data/lib/dependabot/bundler/package_manager.rb +6 -6
- data/lib/dependabot/bundler/update_checker/shared_bundler_helpers.rb +1 -2
- metadata +8 -33
- data/helpers/v1/.gitignore +0 -8
- data/helpers/v1/Gemfile +0 -7
- data/helpers/v1/build +0 -29
- data/helpers/v1/lib/functions/conflicting_dependency_resolver.rb +0 -89
- data/helpers/v1/lib/functions/dependency_source.rb +0 -90
- data/helpers/v1/lib/functions/file_parser.rb +0 -119
- data/helpers/v1/lib/functions/force_updater.rb +0 -173
- data/helpers/v1/lib/functions/lockfile_updater.rb +0 -218
- data/helpers/v1/lib/functions/version_resolver.rb +0 -141
- data/helpers/v1/lib/functions.rb +0 -172
- data/helpers/v1/monkey_patches/definition_bundler_version_patch.rb +0 -16
- data/helpers/v1/monkey_patches/definition_ruby_version_patch.rb +0 -22
- data/helpers/v1/monkey_patches/fileutils_keyword_splat_patch.rb +0 -20
- data/helpers/v1/monkey_patches/git_source_patch.rb +0 -62
- data/helpers/v1/monkey_patches/object_untaint_patch.rb +0 -17
- data/helpers/v1/monkey_patches/resolver_spec_group_sane_eql.rb +0 -18
- data/helpers/v1/patched_bundler +0 -34
- data/helpers/v1/run.rb +0 -38
- data/helpers/v1/spec/functions/conflicting_dependency_resolver_spec.rb +0 -118
- data/helpers/v1/spec/functions/dependency_source_spec.rb +0 -188
- data/helpers/v1/spec/functions/file_parser_spec.rb +0 -75
- data/helpers/v1/spec/functions/force_updater_spec.rb +0 -59
- data/helpers/v1/spec/functions/version_resolver_spec.rb +0 -105
- data/helpers/v1/spec/native_spec_helper.rb +0 -56
- data/helpers/v1/spec/shared_contexts.rb +0 -60
@@ -1,60 +0,0 @@
|
|
1
|
-
# typed: false
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
require "bundler/compact_index_client"
|
5
|
-
require "bundler/compact_index_client/updater"
|
6
|
-
|
7
|
-
TMP_DIR_PATH = File.expand_path("../tmp", __dir__)
|
8
|
-
|
9
|
-
RSpec.shared_context "when in a temporary bundler directory" do
|
10
|
-
let(:project_name) { "gemfile" }
|
11
|
-
|
12
|
-
let(:tmp_path) do
|
13
|
-
FileUtils.mkdir_p(TMP_DIR_PATH)
|
14
|
-
dir = Dir.mktmpdir("native_helper_spec_", TMP_DIR_PATH)
|
15
|
-
Pathname.new(dir).expand_path
|
16
|
-
end
|
17
|
-
|
18
|
-
before do
|
19
|
-
project_dependency_files(project_name).each do |file|
|
20
|
-
File.write(File.join(tmp_path, file[:name]), file[:content])
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
def in_tmp_folder(&block)
|
25
|
-
Dir.chdir(tmp_path, &block)
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
RSpec.shared_context "without caching rubygems" do
|
30
|
-
before do
|
31
|
-
# Stub Bundler to stop it using a cached versions of Rubygems
|
32
|
-
allow_any_instance_of(Bundler::CompactIndexClient::Updater)
|
33
|
-
.to receive(:etag_for).and_return("")
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
RSpec.shared_context "when stubbing rubygems compact index" do
|
38
|
-
include_context "without caching rubygems"
|
39
|
-
|
40
|
-
before do
|
41
|
-
# Stub the Rubygems index
|
42
|
-
stub_request(:get, "https://index.rubygems.org/versions")
|
43
|
-
.to_return(
|
44
|
-
status: 200,
|
45
|
-
body: fixture("rubygems_responses", "index")
|
46
|
-
)
|
47
|
-
|
48
|
-
# Stub the Rubygems response for each dependency we have a fixture for
|
49
|
-
fixtures =
|
50
|
-
Dir[File.join("../../spec", "fixtures", "rubygems_responses", "info-*")]
|
51
|
-
fixtures.each do |path|
|
52
|
-
dep_name = path.split("/").last.gsub("info-", "")
|
53
|
-
stub_request(:get, "https://index.rubygems.org/info/#{dep_name}")
|
54
|
-
.to_return(
|
55
|
-
status: 200,
|
56
|
-
body: fixture("rubygems_responses", "info-#{dep_name}")
|
57
|
-
)
|
58
|
-
end
|
59
|
-
end
|
60
|
-
end
|