Top Level Namespace

Defined Under Namespace

Modules: RailsPwnerer, Sys

Instance Method Summary collapse

Instance Method Details

#openup(path) ⇒ Object

Make the gem readable and runnable by anyone.

This is a work-around for systems with messed up permission masks.



20
21
22
23
24
25
26
27
28
29
30
# File 'ext/rpwn_setup_notice/extconf.rb', line 20

def openup(path)
  if File.file?(path)
    File.chmod((File.stat(path).mode | 0755), path) rescue nil
    return
  end
  
  Dir.foreach(path) do |entry|
    next if ['.', '..'].include? entry
    openup File.join(path, entry)
  end  
end