I'm using Ridley to update some data bags after a Travis-CI run. Mainly to implement continuous deployment. For that I was thinking of putting the chef config - including the client key - into a secure travis ENV variable.
Currently ridley only accepts a path to a client .pem file. Does it make sense to generally change that and add the option to provide the client_key as a String?
I think this would allow greater flexibility in general. What do you think? I'd be happy to change that if you think it's generally interesting.
@bumi I think it's perfectly acceptable to have the default value of client_key, client_name, and server_url in the initializer for Ridley::Client to be the values of three ENV variables if present.
Would this solve your problem?
That bit would go in here, probably: https://github.com/reset/ridley/blob/master/lib/ridley/client.rb#L106-L108
sorry, for beeing unclear:
I was thinking to not provide the client_key as a path to a file but directly provide the content of the key.
currently it only works with the path:
from what I understand it reads the file content here: https://github.com/reset/ridley/blob/master/lib/ridley/middleware/chef_auth.rb#L15
my idea was to provide something like that:
:server_url => "...",
:client_name => "...",
:client_key => "<full content of the client key file>"
I understand. Yeah it's fine to either add an additional option for specifying the key or figuring out if the value given is a path to a file on disk and if the path exists.