diff options
author | thea <ta.kupler@gmail.com> | 2016-09-07 11:34:35 +0200 |
---|---|---|
committer | thea <ta.kupler@gmail.com> | 2016-09-07 11:34:35 +0200 |
commit | f269b960f9928ce3211ee3ab80e7a8eead426dac (patch) | |
tree | a67d71d8567aa5eb9716e5e6e826a15e291c924e /script | |
parent | a9ce836e2ef5a2aaa8b30ca7603129ba9573deaf (diff) |
error message and exit from script when wrong directory or no secrets-file. automatic secrets-file creation was deleted/put as comment
Diffstat (limited to 'script')
-rwxr-xr-x | script/generate_bearer_token | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/script/generate_bearer_token b/script/generate_bearer_token index ec00740..7091a8d 100755 --- a/script/generate_bearer_token +++ b/script/generate_bearer_token @@ -58,10 +58,12 @@ else if File.exist?("#{options[:projectroot]}/leap_web/config/secrets.yml") secrets = YAML.load_file("#{options[:projectroot]}/leap_web/config/secrets.yml") else + puts "Please make sure that you created a secrets-file as described in the documentation or have given the correct directory. No secrets-file could be found." + exit # secrets_content = {"twitter"=>{"enabled"=>false, "twitter_handle"=>"", "bearer_token"=>"", "twitter_picture"=>nil}} # secrets = {"development"=> secrets_content, "test"=>secrets_content} - secrets = {"development"=> {"twitter"=>{"enabled"=>false, "twitter_handle"=>"", "bearer_token"=>"", "twitter_picture"=>nil}}, "test"=>{"twitter"=>{"enabled"=>false, "twitter_handle"=>"", "bearer_token"=>"", "twitter_picture"=>nil}}} - File.new("#{options[:projectroot]}/leap_web/config/secrets.yml", "w") + # secrets = {"development"=> {"twitter"=>{"enabled"=>false, "twitter_handle"=>"", "bearer_token"=>"", "twitter_picture"=>nil}}, "test"=>{"twitter"=>{"enabled"=>false, "twitter_handle"=>"", "bearer_token"=>"", "twitter_picture"=>nil}}} + # File.new("#{options[:projectroot]}/leap_web/config/secrets.yml", "w") end if options[:twitterhandle].nil? then |