Created
February 15, 2012 10:28
-
-
Save taylor/1834910 to your computer and use it in GitHub Desktop.
Testing Ruby VMs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'sinatra' | |
require 'sinatra/synchrony' | |
class ShootoutApp < Sinatra::Base | |
register Sinatra::Synchrony | |
get '/' do | |
@name = "Shootout '12" | |
erb :index | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'bundler' | |
Bundler.require(:default) | |
require './app' | |
run ShootoutApp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source :rubygems | |
gem 'sinatra' | |
gem 'sinatra-synchrony' | |
gem 'thin' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<!-- put me in views/index.erb --> | |
<head> | |
<title><%= @name %></title> | |
</head> | |
<body> | |
<h1><%= @name %> <small>Hello World!</small></h1> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment