Skip to content
Browse files

Initial commit

  • Loading branch information...
0 parents commit 49b5c6a6fa398766d785f02b55d386306c94df18 @quirkey committed Nov 23, 2010
1 .gems
@@ -0,0 +1 @@
+sinatra --version ">= 0.9.2"
3 .gitignore
@@ -0,0 +1,3 @@
+.DS_Store
+tmp
+
4 Rakefile
@@ -0,0 +1,4 @@
+namespace :sammyjs-org do
+
+
+end
8 config.ru
@@ -0,0 +1,8 @@
+# To use with thin
+# thin start -p PORT -R config.ru
+
+require File.join(File.dirname(__FILE__), 'lib', 'sammyjs-org.rb')
+
+disable :run
+set :environment, :production
+run SammyjsOrg
1 config.yml
@@ -0,0 +1 @@
+---
15 lib/sammyjs-org.rb
@@ -0,0 +1,15 @@
+APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
+
+require 'rubygems'
+require 'sinatra'
+require 'haml'
+
+class SammyjsOrg < Sinatra::Application
+
+ set :root, APP_ROOT
+
+ get '/' do
+ haml :index
+ end
+
+end
BIN public/images/download-corner.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN public/images/header-large-bg.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN public/images/sammy-logo-header-large.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN public/images/slogan-large.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 spec/sammyjs-org_spec.rb
@@ -0,0 +1,9 @@
+require 'spec_helper'
+
+describe 'Sammyjs-org' do
+
+ it 'should load the index' do
+ get '/'
+ last_response.should.be.ok
+ end
+end
35 spec/spec_helper.rb
@@ -0,0 +1,35 @@
+require 'sinatra'
+require 'rack/test'
+
+ENV['RACK_ENV'] = 'test'
+
+require File.join(File.dirname(__FILE__), '..', 'lib', 'sammyjs-org.rb')
+
+SammyjsOrg.set(
+ :environment => :test,
+ :run => false,
+ :raise_errors => true,
+ :logging => false
+)
+
+module TestHelper
+
+ def app
+ SammyjsOrg.new
+ end
+
+ def body
+ last_response.body
+ end
+
+ def status
+ last_response.status
+ end
+
+ include Rack::Test::Methods
+
+end
+
+require 'bacon'
+
+Bacon::Context.send(:include, TestHelper)
2 views/index.haml
@@ -0,0 +1,2 @@
+%p Hello!
+%p Default sinatra-gen index (generated at 2010-11-19 19:46:51 -0500)
6 views/layout.haml
@@ -0,0 +1,6 @@
+%html{:xmlns=> "http://www.w3.org/1999/xhtml", 'xml:lang' => "en", :lang => "en"}
+ %head
+ %meta{'http-equiv' => "Content-Type", 'content' => "text/html; charset=utf-8"}
+ %title sammyjs-org
+ %body
+ = yield

0 comments on commit 49b5c6a

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