dependabot-bundler 0.243.0 → 0.245.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b064f061277407a92133970d8c0287c6aacf60cf52e8813d793d374dce4dd2b
|
4
|
+
data.tar.gz: 403e7e5d8b01c1deb8df4f00b04360e21c456f76bb434624fbc0a5f931e22bbf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ebfb704cba98fedb9a2d979f1d22ef598ae97cca14866247006e7deda488a17326bfef96c04ea30d0d72e26f9a4b3105728d89da1f1218cbb1fc5768f97a8952
|
7
|
+
data.tar.gz: 9091bffdc4c7bcf874118684eaf14af6cd232e168abc6c082fa25887815ea03df36b5adedd0b054000f7d38582aa44a89c89f769bdc9a43f534783e31d1ab8d8
|
@@ -6,7 +6,14 @@ require "bundler/definition"
|
|
6
6
|
module BundlerDefinitionRubyVersionPatch
|
7
7
|
def ruby_version
|
8
8
|
super || begin
|
9
|
-
Bundler
|
9
|
+
file_content = Bundler.read_file(".ruby-version")
|
10
|
+
ruby_version =
|
11
|
+
if /^ruby(-|\s+)([^\s#]+)/ =~ file_content
|
12
|
+
::Regexp.last_match(2)
|
13
|
+
else
|
14
|
+
file_content.strip
|
15
|
+
end
|
16
|
+
Bundler::RubyVersion.new(ruby_version, nil, nil, nil) if ruby_version
|
10
17
|
rescue SystemCallError
|
11
18
|
# .ruby-version doesn't exist, fallback to the Ruby Dependabot runs
|
12
19
|
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# typed: false
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require "native_spec_helper"
|
5
|
+
require "shared_contexts"
|
6
|
+
|
7
|
+
RSpec.describe BundlerDefinitionRubyVersionPatch do
|
8
|
+
include_context "in a temporary bundler directory"
|
9
|
+
include_context "stub rubygems compact index"
|
10
|
+
|
11
|
+
let(:project_name) { "ruby_version_implied" }
|
12
|
+
before do
|
13
|
+
@ui = Bundler.ui
|
14
|
+
Bundler.ui = Bundler::UI::Silent.new
|
15
|
+
end
|
16
|
+
after { Bundler.ui = @ui }
|
17
|
+
|
18
|
+
it "updates to the most recent version" do
|
19
|
+
in_tmp_folder do
|
20
|
+
File.delete(".ruby-version")
|
21
|
+
definition = Bundler::Definition.build("Gemfile", "Gemfile.lock", gems: ["statesman"])
|
22
|
+
definition.resolve_remotely!
|
23
|
+
specs = definition.resolve["statesman"]
|
24
|
+
expect(specs.size).to eq(1)
|
25
|
+
spec = specs.first
|
26
|
+
expect(spec.version).to eq("7.2.0")
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
it "doesn't update to a version that is not compatible with the Ruby version implied by .ruby-version" do
|
31
|
+
in_tmp_folder do
|
32
|
+
definition = Bundler::Definition.build("Gemfile", "Gemfile.lock", gems: ["statesman"])
|
33
|
+
definition.resolve_remotely!
|
34
|
+
specs = definition.resolve["statesman"]
|
35
|
+
expect(specs.size).to eq(1)
|
36
|
+
spec = specs.first
|
37
|
+
expect(spec.version).to eq("2.0.1")
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
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.
|
4
|
+
version: 0.245.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-02-
|
11
|
+
date: 2024-02-22 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.
|
19
|
+
version: 0.245.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.
|
26
|
+
version: 0.245.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: debug
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -272,6 +272,7 @@ files:
|
|
272
272
|
- helpers/v2/spec/functions/version_resolver_spec.rb
|
273
273
|
- helpers/v2/spec/functions_spec.rb
|
274
274
|
- helpers/v2/spec/native_spec_helper.rb
|
275
|
+
- helpers/v2/spec/ruby_version_spec.rb
|
275
276
|
- helpers/v2/spec/shared_contexts.rb
|
276
277
|
- lib/dependabot/bundler.rb
|
277
278
|
- lib/dependabot/bundler/file_fetcher.rb
|
@@ -312,7 +313,7 @@ licenses:
|
|
312
313
|
- Nonstandard
|
313
314
|
metadata:
|
314
315
|
bug_tracker_uri: https://github.com/dependabot/dependabot-core/issues
|
315
|
-
changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.
|
316
|
+
changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.245.0
|
316
317
|
post_install_message:
|
317
318
|
rdoc_options: []
|
318
319
|
require_paths:
|