lib/rubygems/specification_policy.rb
##
# Issues a warning for each file to be packaged which is world-readable.
#
# Implementation for Specification#validate_permissions
Issues a warning for each file to be packaged which is world-readable.
Issues a warning for each file to be packaged which is world - readable .
def validate_permissions
    return if Gem.win_platform?
    @specification.files.each do |file|
      next unless File.file?(file)
      next if File.stat(file).mode & 0444 == 0444
      warning "#{file} is not world-readable"
    end
    @specification.executables.each do |name|
      exec = File.join @specification.bindir, name
      next unless File.file?(exec)
      next if File.stat(exec).executable?
      warning "#{exec} is not executable"
    end
  end
def validate_permissions return if Gem . win_platform? @specification . files . each do | file | next unless File . file? ( file ) next if File . stat ( file ) . mode & 0444 == 0444 warning "#{file} is not world-readable" end @specification . executables . each do | name | exec = File . join @specification . bindir , name next unless File . file? ( exec ) next if File . stat ( exec ) . executable? warning "#{exec} is not executable" end end
Issues a warning for each file to be packaged which is world-readable.
Issues a warning for each file to be packaged which is world - readable .