summaryrefslogtreecommitdiff
path: root/test/rubygems/test_gem.rb
diff options
context:
space:
mode:
-rw-r--r--test/rubygems/test_gem.rb20
1 files changed, 10 insertions, 10 deletions
@@ -14,14 +14,14 @@ end
# TODO: push this up to test_case.rb once battle tested
$LOAD_PATH.map! do |path|
- path.dup.untaint
end
class TestGem < Gem::TestCase
PLUGINS_LOADED = [] # rubocop:disable Style/MutableConstant
- PROJECT_DIR = File.expand_path('../../..', __FILE__).untaint
def setup
super
@@ -220,7 +220,7 @@ class TestGem < Gem::TestCase
end
assert_equal(expected, result)
ensure
- File.chmod(0755, *Dir.glob(@gemhome + '/gems/**/').map {|path| path.untaint})
end
def test_require_missing
@@ -1617,8 +1617,8 @@ class TestGem < Gem::TestCase
assert_equal expected_specs, Gem.use_gemdeps.sort_by { |s| s.name }
end
- LIB_PATH = File.expand_path "../../../lib".dup.untaint, __FILE__.dup.untaint
- BUNDLER_LIB_PATH = File.expand_path $LOAD_PATH.find {|lp| File.file?(File.join(lp, "bundler.rb")) }.dup.untaint
BUNDLER_FULL_NAME = "bundler-#{Bundler::VERSION}".freeze
def add_bundler_full_name(names)
@@ -1645,8 +1645,8 @@ class TestGem < Gem::TestCase
ENV['RUBYGEMS_GEMDEPS'] = "-"
path = File.join @tempdir, "gem.deps.rb"
- cmd = [Gem.ruby.dup.untaint, "-I#{LIB_PATH.untaint}",
- "-I#{BUNDLER_LIB_PATH.untaint}", "-rrubygems"]
cmd << "-eputs Gem.loaded_specs.values.map(&:full_name).sort"
File.open path, "w" do |f|
@@ -1683,8 +1683,8 @@ class TestGem < Gem::TestCase
Dir.mkdir "sub1"
path = File.join @tempdir, "gem.deps.rb"
- cmd = [Gem.ruby.dup.untaint, "-Csub1", "-I#{LIB_PATH.untaint}",
- "-I#{BUNDLER_LIB_PATH.untaint}", "-rrubygems"]
cmd << "-eputs Gem.loaded_specs.values.map(&:full_name).sort"
File.open path, "w" do |f|
@@ -1732,7 +1732,7 @@ class TestGem < Gem::TestCase
end
def test_use_gemdeps
- gem_deps_file = 'gem.deps.rb'.untaint
spec = util_spec 'a', 1
install_specs spec