litaio / lita

ChatOps for Ruby.
https://www.lita.io
MIT License
1.68k stars 179 forks source link

Production mode #182

Closed eligiblekeng closed 8 years ago

eligiblekeng commented 8 years ago

Can we allow lita to take an optional flag for production mode, just like in Rails: lita -e production? This shall set the RAILS_ENV=production; otherwise by default RAILS_ENV=development.

This is especially helpful when used with a secrets.yml file too. Right now it has to be read and the mode be chosen manually in lita-config.rb.

jimmycuadra commented 8 years ago

What would it do?

eligiblekeng commented 8 years ago

set RAILS_ENV as production/development/test. As per standard practice. This helps when there's a bot under active development, while a stable one is deployed in production. Setting different env will prevent multiple clashes

jimmycuadra commented 8 years ago

I don't think Lita should be doing anything with RAILS_ENV, as it has nothing do with Rails. Sounds like something that should exist in a plugin if it'd be useful for some custom setup. You might be interested in lita-ext, which does something a little like what you're describing.

eligiblekeng commented 8 years ago

oh ok, I'll look into that. Thanks!