Permalink
Browse files

add a sinatra app for rake dev

  • Loading branch information...
1 parent a76ae25 commit db3ae3c46f0756cf135448d4dc8b536cb753bb54 @lachie lachie committed Aug 14, 2010
Showing with 83 additions and 0 deletions.
  1. +35 −0 Gemfile.lock
  2. +3 −0 Rakefile
  3. +36 −0 dev/dev.rb
  4. +9 −0 dev/views/index.haml
View
@@ -0,0 +1,35 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ builder (2.1.2)
+ haml (3.0.16)
+ happymapper (0.3.2)
+ libxml-ruby (~> 1.1.3)
+ json (1.4.6)
+ libxml-ruby (1.1.4)
+ mime-types (1.16)
+ mustache (0.11.2)
+ nokogiri (1.4.3.1)
+ pivotal-tracker (0.2.0)
+ builder
+ happymapper (>= 0.2.4)
+ nokogiri (~> 1.4.1)
+ rest-client (~> 1.5.1)
+ rack (1.2.1)
+ rest-client (1.5.1)
+ mime-types (>= 1.16)
+ shotgun (0.8)
+ rack (>= 1.0)
+ sinatra (1.0)
+ rack (>= 1.0)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ haml
+ json
+ mustache
+ pivotal-tracker (>= 0.1.3)
+ shotgun
+ sinatra
View
@@ -20,3 +20,6 @@ rescue LoadError
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
end
+task :dev do
+ sh 'bundle exec shotgun dev/dev.rb'
+end
View
@@ -0,0 +1,36 @@
+require 'rubygems'
+require 'bundler'
+Bundler.setup
+
+require 'sinatra'
+require 'haml'
+
+require 'pathname'
+require 'pp'
+
+# pull in whereuat proper
+root = Pathname( Sinatra::Application.root ).parent
+$LOAD_PATH << root+'lib'
+require 'whereuat'
+
+class Object
+ def tapp(tag=nil)
+ print "#{tag}=" if tag
+ pp self
+ self
+ end
+end
+
+load Whereuat.gem_root+'pivotal_config.dont_commit.rb'
+
+helpers do
+ include Whereuat::Helpers
+end
+
+before do
+ Whereuat::Assets.rebuild!
+end
+
+get '/' do
+ haml :index
+end
View
@@ -0,0 +1,9 @@
+!!!
+%html
+ %head
+ %script(src='http://code.jquery.com/jquery-1.4.2.min.js')
+ %body
+ bodily
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur eget nisi eget turpis sodales interdum et vel sem. Suspendisse potenti. Nullam convallis lacinia leo at elementum. Quisque mi ante, egestas id accumsan ut, tempor vel erat. Cras placerat sapien non mi cursus egestas. Nulla at odio in ipsum fermentum posuere id sit amet nisi. Phasellus id mi dui, vitae posuere turpis. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Mauris bibendum, justo eget adipiscing imperdiet, neque dolor cursus velit, at tristique nunc erat venenatis dui. Integer ut diam velit, vitae tincidunt metus. Integer mattis adipiscing convallis. Aenean dapibus scelerisque nisi et semper. Ut luctus nisl a nulla porttitor a feugiat risus pulvinar. Nam ut quam ut ipsum faucibus auctor tempus ut diam. Donec facilisis, nunc faucibus faucibus congue, metus justo sagittis nibh, vitae mollis nisl eros quis orci. Ut tincidunt, nisl sed vulputate condimentum, sem lectus elementum tortor, eu pharetra enim massa id justo. Donec non libero eget ligula laoreet imperdiet sed sit amet diam.
+
+ = whereuat

0 comments on commit db3ae3c

Please sign in to comment.