Sha256: 76a4aa534811bed18b3dccd9b6e02a1214eed5a5b8f8342e9854b48f22297305
Contents?: true
Size: 1.4 KB
Versions: 2
Compression:
Stored size: 1.4 KB
Contents
class String def /(str) File.join( self, str.to_s ) end end # XXX use pathname def self.config(name) prefix = Regexp.quote(Config::CONFIG["prefix"]) exec_prefix = Regexp.quote(Config::CONFIG["exec_prefix"]) Config::CONFIG[name].gsub(/\A\/?(#{prefix}|#{exec_prefix})\/?/, '') end KINDS = [ :bin, :lib, :ext, :data, :conf, :doc ] SITE_DIRS = { :bin => config("bindir"), :lib => config("sitelibdir"), :ext => config("sitearchdir"), :data => config("datadir"), :conf => config("sysconfdir"), :doc => File.join(config("datadir"), "doc") } VEND_DIRS = { :bin => config("bindir"), :lib => config("rubylibdir"), :ext => config("archdir"), :data => config("datadir"), :conf => config("sysconfdir"), :doc => File.join(config("datadir"), "doc") } MODES = { :bin => 0755, :lib => 0644, :ext => 0755, # was: 0555, :data => 0644, :conf => 0644, :doc => 0644 } # Return installation prefix. def prefix #( kind ) Config::CONFIG["prefix"] end # Return the installation directory. def dir( kind, type=:site ) case type when :site prefix / SITE_DIRS[ kind ] when :vendor prefix / VEND_DIRS[ kind ] else raise ArgumentError, "unknown install type -- #{type}" end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
reap-6.0.2 | data/reap/install.rb |
reap-6.0.1 | data/reap/install.rb |