diff options
author | David RodrÃguez <[email protected]> | 2023-03-13 14:26:05 +0100 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2025-06-05 19:12:40 +0900 |
commit | e74008bfc9b0d3017e924e6eef39a4aeef7de01c (patch) | |
tree | 0ce2225134d004a1cded9f7ed2e9dd17c2d0f4d8 | |
parent | 11492bd88d98edeaac4d3e35dd0d59bf67a79569 (diff) |
[rubygems/rubygems] Reduce duplication a bit
https://github.com/rubygems/rubygems/commit/0574c62fc0
-rw-r--r-- | lib/bundler/self_manager.rb | 2 | ||||
-rw-r--r-- | spec/bundler/commands/post_bundle_message_spec.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/bundler/self_manager.rb b/lib/bundler/self_manager.rb index 2aeac6be52..1d876075ec 100644 --- a/lib/bundler/self_manager.rb +++ b/lib/bundler/self_manager.rb @@ -182,7 +182,7 @@ module Bundler end def current_version - @current_version ||= Gem::Version.new(Bundler::VERSION) + @current_version ||= Bundler.gem_version end def lockfile_version diff --git a/spec/bundler/commands/post_bundle_message_spec.rb b/spec/bundler/commands/post_bundle_message_spec.rb index 8671504b25..7b5ac1aec9 100644 --- a/spec/bundler/commands/post_bundle_message_spec.rb +++ b/spec/bundler/commands/post_bundle_message_spec.rb @@ -19,7 +19,7 @@ RSpec.describe "post bundle message" do let(:bundle_complete_message) { "Bundle complete!" } let(:bundle_updated_message) { "Bundle updated!" } let(:installed_gems_stats) { "4 Gemfile dependencies, 5 gems now installed." } - let(:bundle_show_message) { Bundler::VERSION.split(".").first.to_i < 3 ? bundle_show_system_message : bundle_show_path_message } + let(:bundle_show_message) { Bundler.bundler_major_version < 3 ? bundle_show_system_message : bundle_show_path_message } describe "for fresh bundle install" do it "shows proper messages according to the configured groups" do |