Skip to content

Commit

Permalink
More fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
deivid-rodriguez committed Oct 8, 2020
1 parent df08920 commit dc39496
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion bundler/lib/bundler/installer.rb
@@ -1,6 +1,5 @@
# frozen_string_literal: true

require "erb"
require "rubygems/dependency_installer"
require_relative "worker"
require_relative "installer/parallel_installer"
Expand Down Expand Up @@ -136,6 +135,7 @@ def generate_bundler_executable_stubs(spec, options = {})
end

mode = Bundler::WINDOWS ? "wb:UTF-8" : "w"
require "erb"
content = if RUBY_VERSION >= "2.6"
ERB.new(template, :trim_mode => "-").result(binding)
else
Expand Down Expand Up @@ -182,6 +182,7 @@ def generate_standalone_bundler_executable_stubs(spec)
executable_path = executable_path

mode = Bundler::WINDOWS ? "wb:UTF-8" : "w"
require "erb"
content = if RUBY_VERSION >= "2.6"
ERB.new(template, :trim_mode => "-").result(binding)
else
Expand Down
4 changes: 3 additions & 1 deletion bundler/spec/runtime/inline_spec.rb
Expand Up @@ -388,7 +388,9 @@ def confirm(msg, newline = nil)
build_gem "fileutils", default_fileutils_version, :to_system => true, :default => true
end

realworld_system_gems "fiddle"
realworld_system_gems "fiddle" # not sure why, but this is needed on Windows to boot rubygems succesfully

realworld_system_gems "timeout uri" # this spec uses net/http which requires these default gems

script <<-RUBY, :dir => tmp("path_without_gemfile"), :env => { "BUNDLER_GEM_DEFAULT_DIR" => system_gem_path.to_s }
require "bundler/inline"
Expand Down
3 changes: 2 additions & 1 deletion lib/rubygems/uri_formatter.rb
@@ -1,5 +1,4 @@
# frozen_string_literal: true
require 'cgi'

##
# The UriFormatter handles URIs from user-input and escaping.
Expand All @@ -26,6 +25,7 @@ def initialize(uri)

def escape
return unless @uri
require 'cgi'
CGI.escape @uri
end

Expand All @@ -41,6 +41,7 @@ def normalize

def unescape
return unless @uri
require 'cgi'
CGI.unescape @uri
end
end

0 comments on commit dc39496

Please sign in to comment.