Hubot работает, когда у меня есть адаптер, но когда я пытаюсь выполнить локальную разработку с помощью Shell, ни один из сценариев или пакетов не загружается.
Это работает:
root@dev:~/hubot# bin/hubot forever start -w --watchDirectory ${PWD} --watchIgnore ${PWD}/*.log --pidfile ${PWD}/hubot.pid -l ${PWD}/hubot.log -a -c coffee node_modules/.bin/hubot --adapter slack
Как ни странно, когда я пытаюсь выполнить локальную разработку и тестирование с помощью:
root@dev:~/hubot# bin/hubot
[Thu Apr 07 2016 00:33:10 GMT+0000 (UTC)] INFO hubot-redis-brain: Using default redis on localhost:6379
eve>
eve> help
usage:
history
exit, \q - close shell and exit
help, \? - print this usage
clear, \c - clear the terminal screen
Ни один из моих сценариев или модулей не отображается, когда я набираю справку в оболочке. Но когда я делаю это в slack, я вижу все доступные скрипты и модули:
eve <user> doesn't have <role> role - Removes a role from a user
eve <user> has <role> role - Assigns a role to a user
eve adapter - Reply with the adapter
eve delete reminder <action> - Delete reminder matching <action> (exact match required)
eve deploy <gitsha> to production - Runs Jenkins Phase 1 deployment.
eve echo <text> - Reply back with <text>
eve flip production pools - Flips the yin and yang production pools
eve help - Displays all of the help commands that Hubot knows about.
eve help <query> - Displays all help commands that match <query>.
eve list jobs - List current cron jobs
eve new job "<crontab format>" <message> - Schedule a cron job to say something
eve new job <crontab format> "<message>" - Ditto
eve new job <crontab format> say <message> - Ditto
eve ping - Reply with pong
** Обновление 1: я включил ведение журнала уровня отладки и вижу, что скрипты анализируются, но скрипты недоступны для меня при выполнении их команд :(**
[Чт, 07 апр 2016, 00:46:44 GMT+0000 (UTC)] DEBUG Загрузка оболочки адаптера накануне> [Чт, 07 апр 2016, 00:46:44 GMT+0000 (UTC)] DEBUG Загрузка скриптов из /root/hubot/scripts [Чт, 07 апреля 2016 г., 00:46:44 GMT+0000 (UTC)] Помощь при разборе DEBUG для /root/hubot/scripts/example.coffee [Чт, 07 апреля 2016 г., 00:46:44 GMT+0000 (UTC)] Разбор отладки справка для /root/hubot/scripts/prod_deploy.coffee [четверг, 07 апреля 2016 г., 00:46:44 GMT+0000 (UTC)] Справка по разбору отладки для /root/hubot/scripts/remindme.coffee [четверг, 07 апреля 2016 г., 00: 46:44 GMT+0000 (UTC)] Помощь при разборе DEBUG для /root/hubot/scripts/team_tools.coffee [Чт, 07 апреля 2016 г., 00:46:44 GMT+0000 (UTC)] Помощь при разборе DEBUG для /root/hubot/ scripts/update.coffee [Чт, 07 апреля 2016 г., 00:46:44 GMT+0000 (UTC)] DEBUG Загрузка скриптов из /root/hubot/src/scripts [Чт, 07 апреля 2016 г., 00:46:44 GMT+0000 (UTC) ] DEBUG Загрузка скриптов hubot из /root/hubot/node_modules/hubot-scripts/src/scripts [Чт, 07 апреля 2016 г., 00:46:44 GMT+0000 (UTC)] DEBUG Загрузка внешних скриптов из npm пакеты [Чт, 07 апреля 2016 г., 00:46:45 GMT+0000 (UTC)] Помощь по разбору DEBUG для /root/hubot/node_modules/hubot-diagnostics/src/diagnostics.coffee [Чт, 07 апреля 2016 г., 00:46:45 GMT+ 0000 (UTC)] ИНФОРМАЦИЯ hubot-redis-brain: использование redis по умолчанию на локальном хосте: 6379 [четверг, 07 апреля 2016 г., 00:46:45 GMT+0000 (UTC)] DEBUG Справка по анализу для /root/hubot/node_modules/hubot-redis -brain/src/redis-brain.coffee [четверг, 07 апреля 2016 г., 00:46:45 GMT+0000 (UTC)] Помощь по разбору DEBUG для /root/hubot/node_modules/hubot-auth/src/auth.coffee [четверг апр 07 2016 00:46:45 GMT+0000 (UTC)] Помощь по разбору DEBUG для /root/hubot/node_modules/hubot-help/src/help.coffee [Чт, 07 апр 2016, 00:46:45 GMT+0000 (UTC) ] DEBUG Помощь по разбору /root/hubot/node_modules/hubot-cron/src/scripts/cron.coffee
Обновление 2. Я понял, что часть моей проблемы заключается в том, что в файле bin/hubot имя моего бота явно указано как eve, в то время как я пытался сделать это с evedev, моим именем hubbot для разработки. Однако мне все еще интересно, почему команда справки не показывает все доступные команды, а когда я нахожусь в Slack, показывает.