nodejitsu / kohai

I am kohai. I am a pluggable irc bot for managing real-time data events.
91 stars 17 forks source link

Config command + gitignore #34

Closed samsonjs closed 13 years ago

samsonjs commented 13 years ago

rebased onto master, should be good to go

AvianFlu commented 13 years ago

As per conversation, this pull request is awaiting an update to address the need for different config operations for strings and lists.

samsonjs commented 13 years ago

Updated with add, rm, and save commands. I'm not certain that save should throw on failure, it seems like we can continue running without error and maybe even save successfully later, not lose the config. If you agree I can s/throw/return/

Oh and you can only and and remove strings from lists. It makes for a sane interface as you don't have to quote strings. If required you could see if the first char is a ", [, or { and then try to parse it as JSON, with the consequence that strings beginning with ", [ , { would have to be quoted. Not a big deal.