Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions bundler/spec/dependabot/bundler/update_checker_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,36 @@
end
end
end

context "for a gem that depends on bundler" do
let(:dependenc_files) { bundler_project_dependency_files("guard_bundler") }

before do
rubygems_response = fixture("ruby", "rubygems_response_guard_bundler.json")
stub_request(:get, rubygems_url + "versions/guard-bundler.json").
to_return(status: 200, body: rubygems_response)
end

let(:dependency_name) { "guard-bundler" }
let(:current_version) { "2.2.1" }
let(:requirements) do
[{
file: "Gemfile",
requirement: "~> 2.2.1",
groups: [],
source: nil
}]
end

context "bundler v1", :bundler_v1_only do
# Surprisingly, this returns the incompatible version 3.0.0.
xit { is_expected.to eq(Gem::Version.new("2.2.1")) }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this is testing latest_version, think it should be latest_resolvable_version but also seeing weird failures on my branch where the test cases are inverted 🤔 https://github.com/dependabot/dependabot-core/pull/3424/checks?check_run_id=2244656544

end

context "bundler v2", :bundler_v2_only do
it { is_expected.to eq(Gem::Version.new("3.0.0")) }
end
end
end

describe "#lowest_security_fix_version" do
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"authors":"Yann Lugrin","built_at":"2019-12-23T00:00:00.000Z","created_at":"2019-12-23T16:51:50.100Z","description":"Guard::Bundler automatically install/update your gem bundle when needed","downloads_count":138888,"metadata":{},"number":"3.0.0","summary":"Guard gem for Bundler","platform":"ruby","rubygems_version":"\u003e= 0","ruby_version":"\u003e= 2.4.9","prerelease":false,"licenses":["MIT"],"requirements":[],"sha":"c59d0bf0f65e6f800e4bbeb26b89a7b45cd4f17c170d67c50a8f3a097446ce9c"},{"authors":"Yann Lugrin","built_at":"2019-01-16T00:00:00.000Z","created_at":"2019-01-16T07:30:43.466Z","description":"Guard::Bundler automatically install/update your gem bundle when needed","downloads_count":1353682,"metadata":{},"number":"2.2.1","summary":"Guard gem for Bundler","platform":"ruby","rubygems_version":"\u003e= 0","ruby_version":"\u003e= 1.9.2","prerelease":false,"licenses":["MIT"],"requirements":[],"sha":"c2f8ad69d7c38775f0e60ff3a8a97df3e1b925a51553916fcd97f8c391435152"},{"authors":"Yann Lugrin","built_at":"2019-01-10T00:00:00.000Z","created_at":"2019-01-10T14:12:15.900Z","description":"Guard::Bundler automatically install/update your gem bundle when needed","downloads_count":23197,"metadata":{},"number":"2.2.0","summary":"Guard gem for Bundler","platform":"ruby","rubygems_version":"\u003e= 0","ruby_version":"\u003e= 1.9.2","prerelease":false,"licenses":["MIT"],"requirements":[],"sha":"db3494f840dd924a13a4f2f79ee67eef92b5555ab155cf33cbb278777a8b0d25"},{"authors":"Yann Lugrin","built_at":"2014-12-11T00:00:00.000Z","created_at":"2014-12-11T06:27:24.372Z","description":"Guard::Bundler automatically install/update your gem bundle when needed","downloads_count":2531228,"metadata":{},"number":"2.1.0","summary":"Guard gem for Bundler","platform":"ruby","rubygems_version":"\u003e= 0","ruby_version":"\u003e= 1.9.2","prerelease":false,"licenses":["MIT"],"requirements":[],"sha":"e0a1f96893866677ecf4238f524ca11602f70592afd0fb83d02df09867073898"},{"authors":"Yann Lugrin","built_at":"2013-10-30T00:00:00.000Z","created_at":"2013-10-30T11:00:19.545Z","description":"Guard::Bundler automatically install/update your gem bundle when needed","downloads_count":462401,"metadata":{},"number":"2.0.0","summary":"Guard gem for Bundler","platform":"ruby","rubygems_version":"\u003e= 0","ruby_version":"\u003e= 1.9.2","prerelease":false,"licenses":["MIT"],"requirements":[],"sha":"533a74e1002ea461b8a44c1a66f7783b4d9967bacc2d34342975246180bdebd7"},{"authors":"Yann Lugrin","built_at":"2012-06-15T00:00:00.000Z","created_at":"2012-06-15T09:22:13.404Z","description":"Guard::Bundler automatically install/update your gem bundle when needed","downloads_count":762953,"metadata":{},"number":"1.0.0","summary":"Guard gem for Bundler","platform":"ruby","rubygems_version":"\u003e= 1.3.6","ruby_version":null,"prerelease":false,"licenses":null,"requirements":null,"sha":"1ace3f43d27368b72f403226828dd6f4b1069cb25794800ea6d8afe4ad317869"},{"authors":"Yann Lugrin","built_at":"2011-05-13T22:00:00.000Z","created_at":"2011-05-14T14:01:16.218Z","description":"Guard::Bundler automatically install/update your gem bundle when needed","downloads_count":169520,"metadata":{},"number":"0.1.3","summary":"Guard gem for Bundler","platform":"ruby","rubygems_version":"\u003e= 1.3.6","ruby_version":null,"prerelease":false,"licenses":null,"requirements":null,"sha":"34e1fddfdcb3315eb99ce7bed8fb1b9cb3e722c8de196a91c4ad6948ed4aca13"},{"authors":"Yann Lugrin","built_at":"2011-02-17T23:00:00.000Z","created_at":"2011-02-18T12:44:59.013Z","description":"Guard::Bundler automatically install/update your gem bundle when needed","downloads_count":10477,"metadata":{},"number":"0.1.2","summary":"Guard gem for Bundler","platform":"ruby","rubygems_version":"\u003e= 1.3.6","ruby_version":null,"prerelease":false,"licenses":null,"requirements":null,"sha":"bb53cf08f60f587fcf9eb0a119046556e48e259ca5cf557ab98f4e1e701973f8"},{"authors":"Yann Lugrin","built_at":"2010-10-26T22:00:00.000Z","created_at":"2010-10-27T10:18:03.430Z","description":"Guard::Bundler automatically install/update your gem bundle when needed","downloads_count":3608,"metadata":{},"number":"0.1.1","summary":"Guard gem for Bundler","platform":"ruby","rubygems_version":"\u003e= 1.3.6","ruby_version":null,"prerelease":false,"licenses":null,"requirements":null,"sha":"4823bccaa8c62eaaed60a1d654a554893a9ca616d48fe447c0489c03136b8b69"},{"authors":"Yann Lugrin","built_at":"2010-10-23T22:00:00.000Z","created_at":"2010-10-24T12:11:15.715Z","description":"Guard::Bundler automatically install/update your gem bundle when needed","downloads_count":2880,"metadata":{},"number":"0.1.0","summary":"Guard gem for Bundler","platform":"ruby","rubygems_version":"\u003e= 1.3.6","ruby_version":null,"prerelease":false,"licenses":null,"requirements":null,"sha":"1f3d254b9ad6f6a71a60a9d22e43b6316aa5421c31300ec72cdd84f5f58c6519"}]