Permalink
Browse files

added basic app to test app lifecycle

  • Loading branch information...
1 parent 9d88f7f commit 6e11f04df875242604f4cac6ba8c0c16c90baf87 Dmitriy Kalinin and Mark Rushakoff committed Mar 25, 2013
Showing with 29 additions and 0 deletions.
  1. +3 −0 lifecycle/basic/Gemfile
  2. +17 −0 lifecycle/basic/Gemfile.lock
  3. +9 −0 lifecycle/basic/main.rb
@@ -0,0 +1,3 @@
+source "https://rubygems.org"
+
+gem "sinatra"
@@ -0,0 +1,17 @@
+GEM
+ remote: https://rubygems.org/
+ specs:
+ rack (1.5.2)
+ rack-protection (1.5.0)
+ rack
+ sinatra (1.4.2)
+ rack (~> 1.5, >= 1.5.2)
+ rack-protection (~> 1.4)
+ tilt (~> 1.3, >= 1.3.4)
+ tilt (1.3.6)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ sinatra
@@ -0,0 +1,9 @@
+require "sinatra"
+
+get "/sleep" do
+ duration = params[:duration].to_i
+ halt 400, "Duration must be positive integer" unless duration > 0
+
+ sleep(duration)
+ "slept for #{duration} secs"
+end

0 comments on commit 6e11f04

Please sign in to comment.