[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

rubygems install hook

Ara.T.Howard

11/17/2006 6:33:00 PM

8 Answers

Bil Kleb

11/17/2006 8:09:00 PM

0

ara.t.howard@noaa.gov wrote:
>
> searching the docs and archives - i'm still unclear: is there, or is there
> not a way to have gems run pre-post install steps?

Don't think so,

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-t...

Later,
--
Bil Kleb
http://kleb.tadalist.com/lists/pub...

Daniel Berger

11/17/2006 8:22:00 PM

0

Bil Kleb wrote:
> ara.t.howard@noaa.gov wrote:
> >
> > searching the docs and archives - i'm still unclear: is there, or is there
> > not a way to have gems run pre-post install steps?
>
> Don't think so,
>
> http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-t...

Bummer. Ross Bamford does have a feature request in:

http://rubyforge.org/tracker/index.php?func=detail&aid=2890&group_id=126&am...

Regards,

Dan

Ara.T.Howard

11/17/2006 8:34:00 PM

0

Ara.T.Howard

11/17/2006 9:01:00 PM

0

Jim Weirich

11/18/2006 12:26:00 AM

0

unknown wrote:
> searching the docs and archives - i'm still unclear: is there, or is
> there
> not a way to have gems run pre-post install steps?
>
> regards.

There is no provision in gems for pre/post install steps.

-- Jim Weirich

--
Posted via http://www.ruby-....

Austin Ziegler

11/18/2006 1:03:00 AM

0

On 11/17/06, Jim Weirich <jim@weirichhouse.org> wrote:
> unknown wrote:
> > searching the docs and archives - i'm still unclear: is there, or is
> > there
> > not a way to have gems run pre-post install steps?
> >
> > regards.
> There is no provision in gems for pre/post install steps.

Please keep it that way. The only thing I'd *like* is a custom message
that can be printed.

-austin
--
Austin Ziegler * halostatue@gmail.com * http://www.halo...
* austin@halostatue.ca * http://www.halo...feed/
* austin@zieglers.ca

Ross Bamford

11/18/2006 10:24:00 AM

0

On Fri, 17 Nov 2006 21:01:06 -0000, <ara.t.howard@noaa.gov> wrote:

> On Sat, 18 Nov 2006 Ara.T.Howard@noaa.gov wrote:
>
>> On Sat, 18 Nov 2006, Daniel Berger wrote:
>>
>>> Bil Kleb wrote:
>>>> ara.t.howard@noaa.gov wrote:
>>>>> searching the docs and archives - i'm still unclear: is there, o=
r =

>>>>> is there
>>>>> not a way to have gems run pre-post install steps?
>>>> Don't think so,
>>>> http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-...
58
>>> Bummer. Ross Bamford does have a feature request in:
>>> =

>>> http://rubyforge.org/tracker/index.php?func=3Ddetail&aid=3D2890...
p_id=3D126&atid=3D578
>>
>> found a workaround
>>
>> spec.extensions =3D 'extconf.rb'
>>
>>
>> now, do whatever you like in extconf.rb
>
> scratch that. doesn't work quite right.
>
> -a

I played around with the same idea before I made that feature request. I=
t =

can be made to work, but you do have to generate a Makefile out of your =
=

extconf to get it to work without warnings. Also, you need to stick to t=
he =

'source in lib/' layout or it'll complain during install.

E.g.

# --- extconf.rb
require 'mkmf'

puts "This is my pre-install code"

create_makefile('test')


# --- test.gemspec
spec =3D Gem::Specification.new do |s|
s.name =3D 'test'
s.summary =3D 'extconf hack'
s.description =3D 'testing extconf hack'
s.version =3D '0.0.1'
s.extensions << 'extconf.rb'

s.files =3D ['lib/test.rb']
s.require_path =3D 'lib'
end


$ su -c 'gem install test-0.0.1.gem'
Password:
Building native extensions. This could take a while...
ruby extconf.rb install test-0.0.1.gem
This is my pre-install code
creating Makefile

make
make: Nothing to be done for `all'.

make install
make: Nothing to be done for `install'.

make clean
Successfully installed test, version 0.0.1

It's messy, but I think it's a good argument for having pre/post hooks =

anyway - I understand the security concerns, but if we can do this extco=
nf =

trick, isn't that academic anyway?

Cheers,
-- =

Ross Bamford - rosco@roscopeco.remove.co.uk

Margarita Tomova

2/20/2008 2:20:00 PM

0

[Note: parts of this message were removed to make it a legal post.]

Please, unsubscribe my . Thanks :-)