Automatic setup

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hello Ruby.-List,

just a question: Is it possible to define a command for automatic
execution after the user has installed a gem with gem install xyz?
I haven't read about this possibility. But maybe there is a tweak in the
gemspec.

Greetings Sascha

- --
Yours sincerly
Sascha Manns

Maifeldstraße 10
56727 Mayen
Phone: +49-1573-9242730
Email: Sascha.Manns@directbox.com
Web: http://saigkill.github.io
Jabber: saigkill@jabber.org

Considering that sometimes the gem install xyz is preceded with a sudo I
hope not :(​

Hello Sascha,

just a question: Is it possible to define a command for automatic
execution after the user has installed a gem with gem install xyz?

there is a `Gem.post_install_hooks` [1]. However, I don't know whether this is
something that can be defined from a gemspec. HTH.

Scary to think that there would be a way to run an arbitrary command, but come
to think of it, there's plenty of room for that with any software
build/distribution method.

      --- Eric

[1] Method: Gem.post_install_hooks — Documentation for rubygems-update (3.5.5)

···

On Wednesday 09 September 2015 13:56:05, Sascha Manns <Sascha.Manns@directbox.com> wrote:

To my knowledge, RubyGems does only support post-install messages for
“ordinary” gems. However, by abusing the C extension building facility,
you can trick it into running arbitrary Ruby code.

I have not tested this, but I’ve read that here on Ruby-Talk ages ago...

Valete,
Marvin

- --
#!/sbin/quintus
Blog: http://www.guelkerdev.de

GnuPG key: F1D8799FBCC8BC4F

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hi Qunitus,

To my knowledge, RubyGems does only support post-install messages for
“ordinary” gems. However, by abusing the C extension building facility,
you can trick it into running arbitrary Ruby code.

I have not tested this, but I’ve read that here on Ruby-Talk ages ago...

I'm thinking the use of post-install message should be the right for
this job.
- --
Yours sincerly
Sascha Manns

Maifeldstraße 10
56727 Mayen
Phone: +49-1573-9242730
Email: Sascha.Manns@directbox.com
Web: http://saigkill.github.io
Jabber: saigkill@jabber.org

···

Am 09.09.2015 um 16:15 schrieb Quintus: