nikoli/nikoli.rb

21 lines
399 B
Ruby
Raw Normal View History

2014-12-05 12:52:12 +01:00
#!/usr/bin/env ruby
require 'sinatra'
2014-12-05 17:27:23 +01:00
require 'sinatra/content_for'
2014-12-05 12:52:12 +01:00
require 'coffee-script'
require 'slim'
require 'sass'
2014-12-08 17:48:22 +01:00
GAMES = %i{hitori nurikabe sudoku}
2014-12-08 12:32:01 +01:00
2014-12-05 12:52:12 +01:00
get('/application.css') { scss :application }
get('/application.js') { coffee :application }
2014-12-05 12:52:12 +01:00
2014-12-08 12:32:01 +01:00
get('/') { slim :index, locals: {games: GAMES} }
2014-12-05 12:52:12 +01:00
2014-12-08 12:32:01 +01:00
GAMES.each do |game|
2014-12-05 12:52:12 +01:00
get("/#{game}") { slim game }
get("/#{game}.js") { coffee game }
end