sumoheavy / jira-ruby

A Ruby gem for the JIRA REST API
MIT License
654 stars 410 forks source link

Throw error for unexpected configuration key type or allow string or tokens for configuration keys. #356

Closed dkinzer closed 4 years ago

dkinzer commented 4 years ago

Thank you for making this library available.

I'm a first time user and I ran into what is probably an obvious newbie mistake but instead of using tokens for my config option keys, I used strings (i.e. { "username" => "foo", "password" => "bar", "auth_type" => "basic" }).

It took me an embarrassingly long time to figure out what was was going on 😊.

I think that it would be useful if either the library threw an error when users tried to use strings instead of tokens for the configuration option keys or instead it could take either string or tokens as config/option keys.

If this is something that would be welcomed I am more than happy to make a PR.

SimonMiaou commented 4 years ago

Hi @dkinzer

I think this could be helpful to throw an error when we receive unexpected keys. If you're up to create a PR, it would be awesome!