Skip to content
Browse files

FIRST!

  • Loading branch information...
0 parents commit eafe14589be6a68a12fa9d23126ab44e0d0cd44e @bascht committed Jun 20, 2012
Showing with 68 additions and 0 deletions.
  1. +9 −0 Gemfile
  2. +36 −0 Gemfile.lock
  3. +1 −0 Procfile
  4. +2 −0 config.ru
  5. +20 −0 em.rb
9 Gemfile
@@ -0,0 +1,9 @@
+source :rubygems
+
+gem 'sinatra'
+gem 'sinatra-contrib'
+
+group :development do
+ gem 'foreman'
+ gem 'shotgun'
+end
36 Gemfile.lock
@@ -0,0 +1,36 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ backports (2.6.0)
+ eventmachine (0.12.10)
+ foreman (0.46.0)
+ thor (>= 0.13.6)
+ rack (1.4.1)
+ rack-protection (1.2.0)
+ rack
+ rack-test (0.6.1)
+ rack (>= 1.0)
+ shotgun (0.9)
+ rack (>= 1.0)
+ sinatra (1.3.2)
+ rack (~> 1.3, >= 1.3.6)
+ rack-protection (~> 1.2)
+ tilt (~> 1.3, >= 1.3.3)
+ sinatra-contrib (1.3.1)
+ backports (>= 2.0)
+ eventmachine
+ rack-protection
+ rack-test
+ sinatra (~> 1.3.0)
+ tilt (~> 1.3)
+ thor (0.15.2)
+ tilt (1.3.3)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ foreman
+ shotgun
+ sinatra
+ sinatra-contrib
1 Procfile
@@ -0,0 +1 @@
+web: bundle exec shotgun -p $PORT
2 config.ru
@@ -0,0 +1,2 @@
+require './em'
+run Sinatra::Application
20 em.rb
@@ -0,0 +1,20 @@
+require 'sinatra'
+require 'sinatra/json'
+
+MATCHES = [
+ ["Tschechien", "Portugal"],
+ ["Deutschland", "Griechenland"],
+ ["Spanien", "Frankreich"],
+ ["England", "Italien"]
+]
+
+get '/viertelfinale.json' do
+ results = MATCHES.collect do |teams|
+ goals = (0...5).to_a.shuffle
+ result = goals[0,2].join ":"
+ { :match => teams, :result => result.to_s }
+ end
+
+ json results
+end
+

0 comments on commit eafe145

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