articulate / biplane

A configuration-based management and automation tool for Kong
MIT License
40 stars 5 forks source link

Collect `Credential` settings from server in `attributes` hash rather than being explicit. #10

Open plukevdh opened 8 years ago

plukevdh commented 8 years ago

Credentials change based on the plugin type. For example JWT vs basic auth have a different set of keys. This makes mapping them explicitly very awkard.

https://github.com/articulate/biplane/blob/master/src/biplane/models/credential.cr#L18-L24

Rewrite the initializer (or from_json method?) to collect unused attrs in this fashion into an attributes hash. Should also simplify compares of things like this.

May affect other plugins as well...