File tree Expand file tree Collapse file tree 3 files changed +17
-0
lines changed Expand file tree Collapse file tree 3 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -244,6 +244,7 @@ def load_plugins
244244 end
245245 end . flatten
246246 Bundler . rubygems . load_plugin_files ( path_plugin_files )
247+ Bundler . rubygems . load_env_plugins
247248 end
248249
249250 def ensure_specs_are_compatible!
Original file line number Diff line number Diff line change @@ -227,6 +227,10 @@ def load_plugin_files(files)
227227 Gem . load_plugin_files ( files ) if Gem . respond_to? ( :load_plugin_files )
228228 end
229229
230+ def load_env_plugins
231+ Gem . load_env_plugins if Gem . respond_to? ( :load_env_plugins )
232+ end
233+
230234 def ui = ( obj )
231235 Gem ::DefaultUserInteraction . ui = obj
232236 end
Original file line number Diff line number Diff line change 222222 expect ( the_bundle ) . to include_gems "rack 1.0.0" , "activesupport 2.3.5"
223223 end
224224
225+ it "loads env plugins" do
226+ plugin_msg = "hello from an env plugin!"
227+ create_file "plugins/rubygems_plugin.rb" , "puts '#{ plugin_msg } '"
228+ rubylib = ENV [ "RUBYLIB" ] . to_s . split ( File ::PATH_SEPARATOR ) . unshift ( bundled_app ( "plugins" ) . to_s ) . join ( File ::PATH_SEPARATOR )
229+ install_gemfile <<-G , :env => { "RUBYLIB" => rubylib }
230+ source "#{ file_uri_for ( gem_repo1 ) } "
231+ gem "rack"
232+ G
233+
234+ expect ( last_command . stdboth ) . to include ( plugin_msg )
235+ end
236+
225237 describe "with a gem that installs multiple platforms" do
226238 it "installs gems for the local platform as first choice" do
227239 skip "version is 1.0, not 1.0.0" if Gem . win_platform?
You can’t perform that action at this time.
0 commit comments