bazooka-ci / bazooka

Continuous Integration and Continuous Deployment Server
http://docs.bazooka-ci.io/
MIT License
60 stars 5 forks source link

Fix dot handling in project config keys and extra quotes around the settings values #168

Closed jawher closed 9 years ago

jawher commented 9 years ago

Setting a project config key containing a dot would create a sub document in mongo. Mongo doesn't support escaping dots in the key names. The proposed fix is to replace dots with something (// in this case) before submitting them to mongo, and to unescape them back the other way around

Also, the cli submited config values were wrapped into extra quotes.

haklop commented 9 years ago

Why do you wrap config value into extra quotes ?

The command bzk project config set http bzk.scm.reuse true inserts "true" in mongo. So this comparaison is false: project.Config["bzk.scm.reuse"] == "true" But this one is true: project.Config["bzk.scm.reuse"] == \"true\"

jawher commented 9 years ago

@haklop This PR does fix the extra quotes bug :)