Skip to content
Browse files

temporarily set openshift to auth, prevent spam

  • Loading branch information...
1 parent 64a41c7 commit c677c5b6e05b53211e74ce1ed24f1e872ad9bf9d Tenshi Hinanawi committed Mar 10, 2012
Showing with 31 additions and 27 deletions.
  1. +9 −19 config.ru
  2. +0 −8 old-config.ru
  3. +22 −0 old_config.ru
View
28 config.ru
@@ -1,22 +1,12 @@
-require '/usr/local/src/omnigollum/lib/omnigollum'
+require "rubygems"
+Bundler.require(:default)
-# Providers now need to be loaded manually
-require 'omniauth/strategies/github'
-require 'omniauth/strategies/twitter'
-require 'omniauth/strategies/facebook'
+require "gollum/frontend/app"
-OmniAuth.config.full_host = '<url to wiki root>'
+use Rack::Auth::Basic, "Welcome wiki - authenticate!" do |name, password|
+ [name, password] == ['wiki', 'wiki']
+end
-# Configure omniauth/omnigollum providers
-options = {
- :providers => Proc.new do
- provider :github, "<id>", "<api token>", {:client_options => {:ssl => {:ca_path => "/etc/ssl/certs"}}}
- provider :twitter, "<id>", "<api token>", {:client_options => {:ssl => {:ca_path => "/etc/ssl/certs"}}}
- end,
- :dummy_auth => false
-}
-
-Precious::App.set(:omnigollum, options)
-
-# Register omnigollum extension in sinatra
-Precious::App.register Omnigollum::Sinatra
+Precious::App.set(:gollum_path, '<repo>')
+Precious::App.set(:wiki_options, {})
+run Precious::App
View
8 old-config.ru
@@ -1,8 +0,0 @@
-require "rubygems"
-Bundler.require(:default)
-
-require "gollum/frontend/app"
-
-Precious::App.set(:gollum_path, '<repo>')
-Precious::App.set(:wiki_options, {})
-run Precious::App
View
22 old_config.ru
@@ -0,0 +1,22 @@
+require '/usr/local/src/omnigollum/lib/omnigollum'
+
+# Providers now need to be loaded manually
+require 'omniauth/strategies/github'
+require 'omniauth/strategies/twitter'
+require 'omniauth/strategies/facebook'
+
+OmniAuth.config.full_host = '<url to wiki root>'
+
+# Configure omniauth/omnigollum providers
+options = {
+ :providers => Proc.new do
+ provider :github, "<id>", "<api token>", {:client_options => {:ssl => {:ca_path => "/etc/ssl/certs"}}}
+ provider :twitter, "<id>", "<api token>", {:client_options => {:ssl => {:ca_path => "/etc/ssl/certs"}}}
+ end,
+ :dummy_auth => false
+}
+
+Precious::App.set(:omnigollum, options)
+
+# Register omnigollum extension in sinatra
+Precious::App.register Omnigollum::Sinatra

0 comments on commit c677c5b

Please sign in to comment.
Something went wrong with that request. Please try again.