hipchat icon indicating copy to clipboard operation
hipchat copied to clipboard

Use the same yaml file to load access token and room name.

Open dtaniwaki opened this issue 12 years ago • 1 comments

Hi,

Is it possible to use yaml config to set access token? I don't like to save access token in the repository.

Review on Reviewable

dtaniwaki avatar Jul 01 '13 22:07 dtaniwaki

:thumbsup: I currently do similar, having it baked in would be better.

Here is how I do it in deploy.rb:

set :hipchat_token, get_hipchat_token

def get_hipchat_token                                                           
  config_yaml = File.expand_path('../../config/hipchat.yml', __FILE__)          
  ENV['HIPCHAT_TOKEN'] || YAML.load(File.read(config_yaml))['development']['token']
end 

krisleech avatar Jul 29 '13 10:07 krisleech