Permalink
Browse files

Flesh out the initial application structure

  • Loading branch information...
tarcieri committed May 2, 2011
1 parent fcb49d8 commit 6c141c606b22e9011b2fdc30f602f28f957c3a49
Showing with 137 additions and 17 deletions.
  1. +3 −1 .rspec
  2. +5 −11 Gemfile
  3. +40 −0 Gemfile.lock
  4. +3 −0 Rakefile
  5. +4 −0 config.ru
  6. +12 −0 lib/variety.rb
  7. +3 −2 spec/spec_helper.rb
  8. +8 −3 spec/variety_spec.rb
  9. +59 −0 variety.gemspec
View
4 .rspec
@@ -1 +1,3 @@
---color
+--color
+--format documentation
+--backtrace
View
16 Gemfile
@@ -1,13 +1,7 @@
source "http://rubygems.org"
-# Add dependencies required to use your gem here.
-# Example:
-# gem "activesupport", ">= 2.3.5"
-# Add dependencies to develop your gem here.
-# Include everything needed to run rake, tests, features, etc.
-group :development do
- gem "rspec", "~> 2.3.0"
- gem "bundler", "~> 1.0.0"
- gem "jeweler", "~> 1.5.2"
- gem "rcov", ">= 0"
-end
+# Pull in Celluloid via git
+gem 'celluloid', :git => 'git://github.com/tarcieri/celluloid.git'
+
+# Specify your gem's dependencies in variety.gemspec
+gemspec
View
@@ -0,0 +1,40 @@
+GIT
+ remote: git://github.com/tarcieri/celluloid.git
+ revision: c5a7d9ad784ba33994521266241c85a4e689896c
+ specs:
+ celluloid (0.0.1)
+ celluloid
+
+PATH
+ remote: .
+ specs:
+ variety (0.0.1)
+
+GEM
+ remote: http://rubygems.org/
+ specs:
+ diff-lcs (1.1.2)
+ git (1.2.5)
+ jeweler (1.5.2)
+ bundler (~> 1.0.0)
+ git (>= 1.2.5)
+ rake
+ rake (0.8.7)
+ rspec (2.3.0)
+ rspec-core (~> 2.3.0)
+ rspec-expectations (~> 2.3.0)
+ rspec-mocks (~> 2.3.0)
+ rspec-core (2.3.1)
+ rspec-expectations (2.3.0)
+ diff-lcs (~> 1.1.2)
+ rspec-mocks (2.3.0)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ bundler (~> 1.0.0)
+ celluloid!
+ jeweler (~> 1.5.2)
+ rspec (~> 2.3.0)
+ variety!
View
@@ -23,6 +23,9 @@ Jeweler::Tasks.new do |gem|
# and development dependencies are only needed for development (ie running rake tasks, tests, etc)
# gem.add_runtime_dependency 'jabber4r', '> 0.1'
# gem.add_development_dependency 'rspec', '> 1.2.3'
+
+ gem.add_runtime_dependency 'sinatra'
+ gem.add_runtime_dependency 'celluloid'
end
Jeweler::RubygemsDotOrgTasks.new
View
@@ -0,0 +1,4 @@
+$LOAD_PATH << File.expand_path('../lib', __FILE__)
+require 'variety'
+
+run Variety::App
View
@@ -0,0 +1,12 @@
+require 'sinatra'
+
+module Variety
+ class App < Sinatra::Base
+ set :static, true
+ set :public, File.dirname(__FILE__) + '/public'
+
+ get '/' do
+ File.read File.expand_path('../../public/index.html', __FILE__)
+ end
+ end
+end
View
@@ -1,5 +1,6 @@
-$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
-$LOAD_PATH.unshift(File.dirname(__FILE__))
+$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
+$LOAD_PATH.unshift File.dirname(__FILE__)
+
require 'rspec'
require 'variety'
View
@@ -1,7 +1,12 @@
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
-describe "Variety" do
- it "fails" do
- fail "hey buddy, you should probably rename this file and start specing for real"
+describe Variety do
+ let(:server) { Rack::MockRequest.new(Variety::App) }
+
+ context "/" do
+ it "should return a 200 response" do
+ response = server.get('/')
+ response.status.should == 200
+ end
end
end
View
@@ -0,0 +1,59 @@
+# Generated by jeweler
+# DO NOT EDIT THIS FILE DIRECTLY
+# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
+# -*- encoding: utf-8 -*-
+
+Gem::Specification.new do |s|
+ s.name = %q{variety}
+ s.version = "0.0.0"
+
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
+ s.authors = ["Tony Arcieri"]
+ s.date = %q{2011-05-02}
+ s.description = %q{TODO: longer description of your gem}
+ s.email = %q{tony.arcieri@gmail.com}
+ s.extra_rdoc_files = [
+ "LICENSE.txt",
+ "README.rdoc"
+ ]
+ s.files = [
+ ".document",
+ ".rspec",
+ "Gemfile",
+ "LICENSE.txt",
+ "README.rdoc",
+ "Rakefile",
+ "VERSION",
+ "lib/variety.rb",
+ "spec/spec_helper.rb",
+ "spec/variety_spec.rb"
+ ]
+ s.homepage = %q{http://github.com/tarcieri/variety}
+ s.licenses = ["MIT"]
+ s.require_paths = ["lib"]
+ s.rubygems_version = %q{1.6.2}
+ s.summary = %q{TODO: one-line summary of your gem}
+ s.test_files = [
+ "spec/spec_helper.rb",
+ "spec/variety_spec.rb"
+ ]
+
+ if s.respond_to? :specification_version then
+ s.specification_version = 3
+
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
+ s.add_development_dependency(%q<rspec>, ["~> 2.3.0"])
+ s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
+ s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
+ else
+ s.add_dependency(%q<rspec>, ["~> 2.3.0"])
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
+ s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
+ end
+ else
+ s.add_dependency(%q<rspec>, ["~> 2.3.0"])
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
+ s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
+ end
+end
+

0 comments on commit 6c141c6

Please sign in to comment.