On Tue, Nov 25, 2008 at 9:08 AM, Matt King <[EMAIL PROTECTED]> wrote: > Hi all, > > I have been looking for a way to execute some Ruby code at the end of > installing my gem. I can't seem to find anything that allows me to do > this. > > I want to chmod a file in the gem directory. I don't want to have to > tell my users they must do this upon install. I would have it run on > requirement of the gem, but chmod'ing the file will most likely > require sudo rights as well. > > Any help appreciated, > -Matt
Hello Matt, RubyGems is not designed for arbitrary code execution, which will be a security concern. A bad intentioned gem developer will release a gem that can take advantage of this privilege and perform nasty tasks. If you like to have a script marked as executable, why not create a CLI and put into the bin directory to be mapped by rubygems as executable for you? http://rubygems.org/read/chapter/20#default_executable http://rubygems.org/read/chapter/20#executables -- Luis Lavena AREA 17 - Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so. Douglas Adams _______________________________________________ Rubygems-developers mailing list Rubygems-developers@rubyforge.org http://rubyforge.org/mailman/listinfo/rubygems-developers