litaio / lita

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

Added a `validate` CLI command to load an test config for scripting #194

Closed brodock closed 8 years ago

brodock commented 8 years ago

This will add a special command that will do most of the boot-up process except it will not "run", but exit back to the shell.

If there are any issues with your configuration, it will fail exactly like when you execute with lita start.

The motivation came from the need to check before deploy, so I can automate a few things on my workflow. This will also be a good fit for docker images or anything that does continuous deployment.

If you need any change or additional documentation, please ping me.

brodock commented 8 years ago

@jimmycuadra There is a temporary problem with travis and bundler. I have no idea why it is failing to install rack 2.0.1.

When you review this PR, please re-run the tests.

jimmycuadra commented 8 years ago

Great idea. I'll investigate the Travis failure and get back to you.

brodock commented 8 years ago

@jimmycuadra I think I figured it out. But bare in mind that we can only test/support ruby >= 2.2.2 because of rack 2.0.1

brodock commented 8 years ago

trying with most recent jruby version to see if I can make it build

jimmycuadra commented 8 years ago

I'd rather do it by pinning Rack to an older version that supports 2.0. Also, fixing the build should probably be done in a separate branch so we can fix it on master without confusing those changes with the ones related to this feature.

jimmycuadra commented 8 years ago

I fixed the Rack issue on master, can you rebase this branch and remove the commits that fiddle with the build? I'd also like to change the name of the subcommand from "check_config" to "validate." Thanks!

brodock commented 8 years ago

@jimmycuadra done :)

brodock commented 8 years ago

@jimmycuadra I've made the changes :)

jimmycuadra commented 8 years ago

Great work! Thank you!