forked from antonzaytsev/rubykoans.ru
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrubykoans.rb
More file actions
35 lines (29 loc) · 840 Bytes
/
rubykoans.rb
File metadata and controls
35 lines (29 loc) · 840 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
require 'rubygems'
require 'sinatra'
require 'haml'
not_found do
haml :error
end
get '/' do
@page = 'nix'
@editors = [
{:name => 'Vim', :url => 'http://code.google.com/p/macvim'},
{:name => 'Emacs', :url => 'http://homepage.mac.com/zenitani/emacs-e.html'},
{:name => 'TextMate', :url => 'http://macromates.com'},
{:name => 'RubyMine', :url => 'http://www.jetbrains.com/ruby'},
{:name => 'jEdit', :url => 'http://www.jedit.org'}
]
haml :index
end
get '/windows/?' do
@page = 'windows'
@editors = [
{:name => 'E Text Editor', :url => 'http://www.e-texteditor.com'},
{:name => 'RubyMine', :url => 'http://www.jetbrains.com/ruby'},
{:name => 'jEdit', :url => 'http://www.jedit.org'},
]
haml :windows
end
get '/online/?' do
redirect 'http://koans.heroku.com'
end