File tree Expand file tree Collapse file tree 1 file changed +3
-21
lines changed
Expand file tree Collapse file tree 1 file changed +3
-21
lines changed Original file line number Diff line number Diff line change @@ -75,27 +75,9 @@ def raise_logger(level = 'WARN')
7575 end
7676
7777 def gem_install_unless_installed ( name , version )
78- found = nil
79- begin
80- if Gem ::Specification . respond_to? :find_all
81- all = Gem ::Specification . find_all
82- found = all . find do |spec |
83- spec . name == name && spec . version . to_s == version
84- end
85- elsif Gem ::Specification . respond_to? :find_by_name
86- found = Gem ::Specification . find_by_name name , version
87- else
88- raise Gem ::LoadError unless Gem . available? name , version
89- end
90- rescue Gem ::LoadError
91- found = false
92- end
93- # NOTE: won't ever be found in RubyGems >= 2.3 likely due Bundler
94- unless found
95- require 'rubygems/dependency_installer'
96- installer = Gem ::DependencyInstaller . new
97- installer . install name , version
98- end
78+ require 'rubygems/dependency_installer'
79+ installer = Gem ::DependencyInstaller . new
80+ installer . install name , version
9981 end
10082
10183 ExpectationNotMetError = RSpec ::Expectations ::ExpectationNotMetError
You can’t perform that action at this time.
0 commit comments