~ubuntu-branches/ubuntu/trusty/ruby1.9/trusty

« back to all changes in this revision

Viewing changes to lib/rubygems/require_paths_builder.rb

  • Committer: Bazaar Package Importer
  • Author(s): Stephan Hermann
  • Date: 2008-01-24 11:42:29 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20080124114229-jw2f87rdxlq6gp11
Tags: 1.9.0.0-2ubuntu1
* Merge from debian unstable, remaining changes:
  - Robustify check for target_os, fixing build failure on lpia.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
 
b'\\ No newline at end of file'