LoginSignup
15

More than 5 years have passed since last update.

Hubot 2.9.0 で削除された `src/scripts` はどこに行ってしまったのか

Posted at

問題

hubot@2.9.0src/scripts が削除された。

hubot pinghubot imghubot die はどこへ行ってしまったのか。また使えるようにするにはどうすれば良いのか。

解決策

generator-hubot を使った際に生成されるプロジェクトを参考に、npm install せよ。

generator-hubot は yeoman のジェネレーターである。hubot@2.9.1 で削除された hubot --create の代替手段。従来のテンプレートに近いものは、これを使えば生成できる。

$ sudo npm install -g yo generator-hubot
$ mkdir myhubot
$ cd myhubot/
$ yo hubot

理想では……。実際には 0.1.0, 0.1.1 は npm publish に失敗しているらしく、npm install -g generator-hubot では、まともに動かない。git clone git://github.com/github/generator-hubot.git して npm install するなどすれば動かせるが、面倒なので、詳しくは説明しない。

以前の標準スクリプトは package.jsondependencies に追加された上で、external-scripts.json で参照されている。github/hubot-scriptshubot-scripts/* という Org に移行された時点で予想できた自体だが、今後は Hubot スクリプト開発の標準的なスタイルになるだろう。

補足情報

補足情報というか最も重要な情報なのだが、各スクリプトのゆくえをメモする。

リポジトリ名がわかれば、 npm install して external-scripts.json に加えるだけなので、なんとかなるだろうから。

hubot@2.8.3src/scripts の Hubot スクリプト。

hubot@2.8.3 コマンド
events.coffee fake event
google-images.coffee image me / animate me / mustache me
help.coffee help
httpd.coffee (/hubot/ping での待ち受けなど)
maps.coffee map me
ping.coffee ping / adapter / echo / time / die
pugme.coffee pug me / pug bomb
roles.coffee
rules.coffee the rules
storage.coffee show storage / show users
translate.coffee translate me
youtube.coffee youtube me

generator-hubot@0.1.0 で追加される Hubot スクリプト。

hubot@2.9.0 コマンド 備考
hubot-diagnostics ping / adapter / echo / time die がなくなっている!
hubot-google-images image me / animate me / mustache me
hubot-google-translate translate me
hubot-help help
hubot-heroku-keepalive HUBOT_HEROKU_URL の代替
hubot-maps map me
hubot-pugme pug me / pug bomb
hubot-redis-brain 以前は hubot-scripts.json に入っていた。
hubot-rules the rules
hubot-shipit 以前は hubot-scripts.json に入っていた。
hubot-youtube youtube me

まとめ

hubot die は死んだ。

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
15