用户安装Ruby gem后,有没有办法打印消息? [英] Is there a way to print a message after a user installs a Ruby gem?

查看:155
本文介绍了用户安装Ruby gem后,有没有办法打印消息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法配置gem的gemspec来打印一个重要的信息消息,在有人下载并使用 gem install

$ b $安装gem后b

解决方案

是的,在gemspec中使用 post_install_message docs )。 http://httparty.rubyforge.org/ =noreferrer> HTTParty 是否这样做在其gemspec 中。


Is there a way to configure a gem's gemspec to print an important informational message right after someone downloads and installs the gem using gem install?

解决方案

Yes, use post_install_message in the gemspec (docs).

You can see how HTTParty does it in its gemspec.

这篇关于用户安装Ruby gem后,有没有办法打印消息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆