Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add support for openid delegation

Delegates to opsb.myopenid.com
  • Loading branch information...
commit d7e19824df75c6c902b1404d2ddf6208d0d53417 1 parent 8dfdc13
@opsb authored
Showing with 42 additions and 23 deletions.
  1. +2 −23 config.ru
  2. +40 −0 server.rb
View
25 config.ru
@@ -1,27 +1,6 @@
require 'rubygems'
require 'bundler'
Bundler.setup
-require 'sinatra'
-
-URL_MAPPINGS = {
- '176' => 'introducing-butler-io',
- '165' => 'follow-table-links-in-cucumber',
- '163' => 'rcov-for-cucumber-and-shoulda',
- '149' => 'validates-uniqueness-of-multiple-columns',
- '122' => 'put-your-team-back-together-with-some-promisc',
- '88' => 'getting-started-with-ruby-dbi-and-mysql',
- '75' => 'useful-regular-expressions-with-egrep',
- '56' => 'pimp-my-git',
- '53' => 'git-rebase-from-another-repository',
- '50' => 'native-ruby-gems-on-ubuntu',
- '41' => 'instant-remote-git-repository-using-ssh',
- '32' => 'getting-started-with-git-github-and-eclipse-o',
- '3' => 'getting-started-with-git-github-and-eclipse-p'
-}
-
-get '/' do
- redirect "http://blog.opsb.co.uk/" + URL_MAPPINGS[params['p']].to_s, 301
-end
-
-run Sinatra::Application
+require 'server'
+run Sinatra::Application
View
40 server.rb
@@ -0,0 +1,40 @@
+require 'sinatra'
+require 'erb'
+
+URL_MAPPINGS = {
+ '176' => 'introducing-butler-io',
+ '165' => 'follow-table-links-in-cucumber',
+ '163' => 'rcov-for-cucumber-and-shoulda',
+ '149' => 'validates-uniqueness-of-multiple-columns',
+ '122' => 'put-your-team-back-together-with-some-promisc',
+ '88' => 'getting-started-with-ruby-dbi-and-mysql',
+ '75' => 'useful-regular-expressions-with-egrep',
+ '56' => 'pimp-my-git',
+ '53' => 'git-rebase-from-another-repository',
+ '50' => 'native-ruby-gems-on-ubuntu',
+ '41' => 'instant-remote-git-repository-using-ssh',
+ '32' => 'getting-started-with-git-github-and-eclipse-o',
+ '3' => 'getting-started-with-git-github-and-eclipse-p'
+}
+
+get '/' do
+ if params['p']
+ redirect "http://blog.opsb.co.uk/" + URL_MAPPINGS[params['p']].to_s, 301
+ else
+ erb :index
+ end
+end
+
+__END__
+
+@@ index
+<html>
+ <head>
+ <link rel="openid.server" href="http://www.myopenid.com/server" />
+ <link rel="openid.delegate" href="http://opsb.myopenid.com/" />
+ <meta http-equiv="REFRESH" content="0;url=http://blog.opsb.co.uk">
+ </head>
+ <body>
+ &nbsp;
+ </body>
+</html>
Please sign in to comment.
Something went wrong with that request. Please try again.