From: james_b@... Date: 2003-04-07T11:00:38+09:00 Subject: Re: Call for standardized package installation procedure > From: Hal E. Fulton [mailto:hal9000@hypermetrics.com] > I'll address these issues just from > my own point of view. > > > I'd be interested to hear from folks as to: > > a) Why they do not include an installation script > > First, I don't see the need for an install > script if it's just a single file foo.rb > which you do a require() on. I'm not so sure that every Ruby newbie knows where to put such files. Seems so simple to have a script that locates your site_ruby dir for you and copies it over, unless there is a name conflict. Here's code that writes an install.rb script if all you need is to copy a file to the site_dir: #------------------------ begin -------------- #!/usr/local/bin/ruby src = %q<#!/usr/local/bin/ruby require 'rbconfig' require 'ftools' include Config class Installer def self.copy_unless_exists( f) version = CONFIG["MAJOR"]+"."+CONFIG["MINOR"] libdir = File.join(CONFIG["libdir"], "ruby", version) sitedir = CONFIG["sitedir"] || File.join($libdir, "site_ruby") put_to = "#{sitedir}/#{f}" puts "Copying #{f} to #{put_to}" if File.exist? put_to puts "Trouble! #{put_to} already exists!" else begin File::install( f, File.join(sitedir, f), 0755, true) puts "All done. Go be happy." rescue Exception puts "There was a problem copying the file: #{$!}" end end end end > if ARGV[0] File.open( "install.rb", "w"){ |f| f.print "#{src}\n\n" f.print "Installer.copy_unless_exists '#{ARGV[0].to_s}'" } else puts 'You need to give the name of the source file.' end #------------------ end --------------------- You can run it on itself if you want an installer for it :) > > > b) Why they do not list their code in the RAA at all (but do make it > available > > from, say, SourceForge or a personal home page) > ... > But basically, I personally don't want to > put anything in the RAA until it is in > fairly good shape. (No flames intended > toward those who think otherwise.) I don't > like to see an interesting new item in > the RAA and then see "Version 0.001 - > pre-pre-alpha - Unstable - No real features - > Very buggy" and so on. Makes me think of the numerous projects on SourceForge that list no files, no docs, one developer. Some people might be inclined to join an existing project rather than start their own if they know alpha code exists. I wonder if there should be some sort of alpha code half-life feature in RAA, such that if an entry is listed as alpha for longer than some period of time, it gets deleted and the owner informed by E-mail. James > > Hal > > >