]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/web/definitions/rails_port.rb
Configure authentication for GitHub
[chef.git] / cookbooks / web / definitions / rails_port.rb
index 2fcc1ee5b54a0fd2efa6d38b761204b5dd6cfb1c..c23587dd989b06174973b764e1da4d1ee36dacb8 100644 (file)
@@ -184,6 +184,11 @@ define :rails_port, :action => [:create, :enable] do
       line.gsub!(/^( *)#windowslive_auth_secret:.*$/, "\\1windowslive_auth_secret: \"#{params[:windowslive_auth_secret]}\"")
     end
 
       line.gsub!(/^( *)#windowslive_auth_secret:.*$/, "\\1windowslive_auth_secret: \"#{params[:windowslive_auth_secret]}\"")
     end
 
+    if params[:github_auth_id]
+      line.gsub!(/^( *)#github_auth_id:.*$/, "\\1github_auth_id: \"#{params[:github_auth_id]}\"")
+      line.gsub!(/^( *)#github_auth_secret:.*$/, "\\1github_auth_secret: \"#{params[:github_auth_secret]}\"")
+    end
+
     if params[:mapquest_key]
       line.gsub!(/^( *)#mapquest_key:.*$/, "\\1mapquest_key: \"#{params[:mapquest_key]}\"")
     end
     if params[:mapquest_key]
       line.gsub!(/^( *)#mapquest_key:.*$/, "\\1mapquest_key: \"#{params[:mapquest_key]}\"")
     end