Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require either a dotfile or -c / --config file for secrets #1

Open
jmathai opened this issue Jan 23, 2012 · 1 comment
Open

Require either a dotfile or -c / --config file for secrets #1

jmathai opened this issue Jan 23, 2012 · 1 comment

Comments

@jmathai
Copy link
Member

jmathai commented Jan 23, 2012

See openphoto/openphoto-python#5

@jo
Copy link

jo commented Oct 17, 2013

I currently do something like

config = File.read File.expand_path '~/.config/trovebox/default'
config = config.split(/\n/).inject({}) do |hash, line|
  key, value = line.split(/\s*=\s*/)
  hash[key] = value
  hash
end
@client = Openphoto::Client.new config['host'],
  config['consumerKey'],
  config['consumerSecret'],
  config['token'],
  config['tokenSecret']

Would be glad if this would be more simple.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants