slack-ruby / slack-ruby-bot

The easiest way to write a Slack bot in Ruby.
MIT License
1.12k stars 187 forks source link

update after code changes? #178

Open mcconkiee opened 6 years ago

mcconkiee commented 6 years ago

This is a question, not a bug...

Awesome library. Is there a recommended way to watch the bot for code updates when making code changes. Currently the only way I can test and develop is by inserting my bot specific code changes, stop server, restart. It makes sense to me since I've followed the rails example and initiate the bot on the startup in my config.ru.

# This file is used by Rack-based servers to start the application.

require_relative 'config/environment'
require ::File.expand_path('../lib/bots/my_bot', __FILE__)

Thread.abort_on_exception = true
Thread.new do
  MyBot.run
end
run Rails.application

Perhaps this is another/better place to initiate? no idea.

dblock commented 6 years ago

I've labeled this as a feature request, we want hotswap/reloading. No idea how to implement it, so PRs welcome.