Sha256: a539f5cb1069e06dd3a48df713154e660e5f73a549bcd0b23fd7d6b478ddadd5
Contents?: true
Size: 788 Bytes
Versions: 8
Compression:
Stored size: 788 Bytes
Contents
require 'rbconfig' require 'find' require 'ftools' include Config # this was adapted from rdoc's install.rb by ways of Log4r $sitedir = CONFIG["sitelibdir"] unless $sitedir version = CONFIG["MAJOR"] + "." + CONFIG["MINOR"] $libdir = File.join(CONFIG["libdir"], "ruby", version) $sitedir = $:.find {|x| x =~ /site_ruby/ } if !$sitedir $sitedir = File.join($libdir, "site_ruby") elsif $sitedir !~ Regexp.quote(version) $sitedir = File.join($sitedir, version) end end # the acual gruntwork Dir.chdir("lib") Find.find("action_controller", "action_controller.rb", "action_view", "action_view.rb") { |f| if f[-3..-1] == ".rb" File::install(f, File.join($sitedir, *f.split(/\//)), 0644, true) else File::makedirs(File.join($sitedir, *f.split(/\//))) end }
Version data entries
8 entries across 8 versions & 1 rubygems