Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
arunsark committed Aug 3, 2011
0 parents commit c620dab
Show file tree
Hide file tree
Showing 9 changed files with 104 additions and 0 deletions.
1 change: 1 addition & 0 deletions .rvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rvm use 1.9.2-p290@sinatra
8 changes: 8 additions & 0 deletions Capfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
load 'deploy' if respond_to?(:namespace) # cap2 differentiator

# Uncomment if you are using Rails' asset pipeline
# load 'deploy/assets'

Dir['vendor/gems/*/recipes/*.rb','vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) }

load 'config/deploy' # remove this line to skip loading any of the default tasks
9 changes: 9 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
source 'http://rubygems.org'

gem 'sinatra'
gem 'thin'
gem 'haml'

group :development do
gem 'capistrano'
end
38 changes: 38 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
GEM
remote: http://rubygems.org/
specs:
capistrano (2.8.0)
highline
net-scp (>= 1.0.0)
net-sftp (>= 2.0.0)
net-ssh (>= 2.0.14)
net-ssh-gateway (>= 1.1.0)
daemons (1.1.4)
eventmachine (0.12.10)
haml (3.1.2)
highline (1.6.2)
net-scp (1.0.4)
net-ssh (>= 1.99.1)
net-sftp (2.0.5)
net-ssh (>= 2.0.9)
net-ssh (2.1.4)
net-ssh-gateway (1.1.0)
net-ssh (>= 1.99.1)
rack (1.3.2)
sinatra (1.2.6)
rack (~> 1.1)
tilt (>= 1.2.2, < 2.0)
thin (1.2.11)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
rack (>= 1.0.0)
tilt (1.3.2)

PLATFORMS
ruby

DEPENDENCIES
capistrano
haml
sinatra
thin
22 changes: 22 additions & 0 deletions config/deploy.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
set :application, "set your application name here"
set :repository, "set your repository location here"

set :scm, :subversion
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none`

role :web, "your web-server here" # Your HTTP server, Apache/etc
role :app, "your app-server here" # This may be the same as your `Web` server
role :db, "your primary db-server here", :primary => true # This is where Rails migrations will run
role :db, "your slave db-server here"

# if you're still using the script/reaper helper you will need
# these http://github.com/rails/irs_process_scripts

# If you are using Passenger mod_rails uncomment this:
# namespace :deploy do
# task :start do ; end
# task :stop do ; end
# task :restart, :roles => :app, :except => { :no_release => true } do
# run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}"
# end
# end
13 changes: 13 additions & 0 deletions hello.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

get '/' do
'Hello World!'
end

get '/hello/:name' do |n|
"Hello #{n}"
end

get '/haml/:name' do |n|
@name = n
haml :index
end
6 changes: 6 additions & 0 deletions main.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
$:.unshift(File.dirname(__FILE__)) unless $:.include?(File.dirname(__FILE__))
require 'bundler/setup'
require 'sinatra'
require 'haml'
require 'hello'
require 'pages'
3 changes: 3 additions & 0 deletions pages.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
get '/pages' do
"Hello Pages"
end
4 changes: 4 additions & 0 deletions views/index.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
%h1 Hello HAML
%p
="I am calling you from sinatra #{@name}"

0 comments on commit c620dab

Please sign in to comment.