Re-enable spec/library for full CI runs.
[rbx.git] / lib / rubygems / require_paths_builder.rb
blobfe4f593bf4a19114a727d10485cc954a1d8d6cae
1 module Gem
2   module RequirePathsBuilder
3     def write_require_paths_file_if_needed(spec = @spec, gem_home = @gem_home)
4       return if spec.require_paths == ["lib"] && (spec.bindir.nil? || spec.bindir == "bin")
5       file_name = File.join(gem_home, 'gems', "#{@spec.full_name}", ".require_paths")
6       file_name.untaint
7       File.open(file_name, "w") do |file|
8         spec.require_paths.each do |path|
9           file.puts path
10         end
11         file.puts spec.bindir if spec.bindir
12       end
13     end
14   end
15 end