Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahhodne committed Dec 2, 2012
0 parents commit f990167
Show file tree
Hide file tree
Showing 7 changed files with 103 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Gemfile
@@ -0,0 +1,14 @@
source :rubygems

gem 'rake', '~> 10.0'

gem 'sinatra', '~> 1.3'

gem 'json', '~> 1.7'
gem 'sass', '~> 3.2'

group :test do
gem 'rspec', '~> 2.12'
gem 'mocha', '~> 0.13'
gem 'rack-test', '~> 0.6', require: 'rack/test'
end
40 changes: 40 additions & 0 deletions Gemfile.lock
@@ -0,0 +1,40 @@
GEM
remote: http://rubygems.org/
specs:
diff-lcs (1.1.3)
json (1.7.5)
metaclass (0.0.1)
mocha (0.13.0)
metaclass (~> 0.0.1)
rack (1.4.1)
rack-protection (1.2.0)
rack
rack-test (0.6.2)
rack (>= 1.0)
rake (10.0.2)
rspec (2.12.0)
rspec-core (~> 2.12.0)
rspec-expectations (~> 2.12.0)
rspec-mocks (~> 2.12.0)
rspec-core (2.12.1)
rspec-expectations (2.12.0)
diff-lcs (~> 1.1.3)
rspec-mocks (2.12.0)
sass (3.2.3)
sinatra (1.3.3)
rack (~> 1.3, >= 1.3.6)
rack-protection (~> 1.2)
tilt (~> 1.3, >= 1.3.3)
tilt (1.3.3)

PLATFORMS
ruby

DEPENDENCIES
json (~> 1.7)
mocha (~> 0.13)
rack-test (~> 0.6)
rake (~> 10.0)
rspec (~> 2.12)
sass (~> 3.2)
sinatra (~> 1.3)
5 changes: 5 additions & 0 deletions Rakefile
@@ -0,0 +1,5 @@
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new

task default: :spec
task test: :spec
2 changes: 2 additions & 0 deletions config.ru
@@ -0,0 +1,2 @@
require File.expand_path('lib/travis/lite/application')
run Travis::Lite::Application
28 changes: 28 additions & 0 deletions lib/travis/lite/application.rb
@@ -0,0 +1,28 @@
require 'bundler'
Bundler.require

module Travis
module Lite
class Application < Sinatra::Base
configure :production do
disable :raise_exceptions
disable :show_exceptions

set :sass, style: :compressed
end

get '/style.css' do
sass :style
end

get '/' do
erb :index
end

error do
@error = env['sinatra.error']
erb :error
end
end
end
end
12 changes: 12 additions & 0 deletions spec/application_spec.rb
@@ -0,0 +1,12 @@
require 'spec_helper'

ENV['RACK_ENV'] = 'test'
require File.expand_path('../../lib/travis/lite/application', __FILE__)

describe Travis::Lite::Application do
include Rack::Test::Methods

def app
Travis::Lite::Application
end
end
2 changes: 2 additions & 0 deletions spec/spec_helper.rb
@@ -0,0 +1,2 @@
require 'bundler'
Bundler.require(:default, :test)

0 comments on commit f990167

Please sign in to comment.