Skip to content

Commit

Permalink
Initial commit - very incomplete.
Browse files Browse the repository at this point in the history
  • Loading branch information
seancribbs committed Jun 2, 2011
0 parents commit 12987f3
Show file tree
Hide file tree
Showing 15 changed files with 1,106 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
## MAC OS
.DS_Store

## TEXTMATE
*.tmproj
tmtags

## EMACS
*~
\#*
.\#*

## VIM
*.swp

## PROJECT::GENERAL
coverage
rdoc
pkg

## PROJECT::SPECIFIC
doc
.yardoc
.bundle
Gemfile.lock
**/bin
*.rbc
.rvmrc
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source :rubygems

gemspec
66 changes: 66 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
require 'rubygems'
require 'rake/gempackagetask'

gemspec = Gem::Specification.new do |gem|
gem.name = "webmachine"
gem.summary = %Q{webmachine is a toolkit for building HTTP applications,}
gem.description = <<-DESC.gsub(/\s+/, ' ')
webmachine is a toolkit for building HTTP applications in a declarative fashion, that avoids
the confusion of going through a CGI-style interface like Rack. It is strongly influenced
by the original Erlang project of the same name and shares its opinionated nature about HTTP.
It uses the mongrel2 server underneath, since all other Ruby webservers are tied to the broken
CGI/Rack model.
DESC
gem.version = "0.1.0"
gem.email = "sean@basho.com"
gem.homepage = "http://seancribbs.github.com/webmachine-rb"
gem.authors = ["Sean Cribbs"]
# Just copying the mongrel2 adapter bits from this gem for now. We
# need to extend things anyway.
# gem.add_dependency "rack-mongrel2", "~> 0.2.3"
gem.add_dependency 'ffi-rzmq', '~> 0.8.0'
gem.add_dependency 'multi_json', '~> 1.0.0'
gem.add_development_dependency "rspec", "~> 2.6.0"
gem.add_development_dependency "yard", "~> 0.6.7"

files = FileList["**/*"]
# Editor and O/S files
files.exclude ".DS_Store", "*~", "\#*", ".\#*", "*.swp", "*.tmproj", "tmtags"
# Generated artifacts
files.exclude "coverage", "rdoc", "pkg", "doc", ".bundle", "*.rbc", ".rvmrc", ".watchr", ".rspec"
# Project-specific
files.exclude "Gemfile.lock"
# Remove directories
files.exclude {|d| File.directory?(d) }

gem.files = files.to_a
gem.test_files = gem.files.grep(/_spec\.rb$/)
end

Rake::GemPackageTask.new(gemspec) do |pkg|
pkg.need_zip = false
pkg.need_tar = false
end

task :gem => :gemspec

desc %{Build the gemspec file.}
task :gemspec do
gemspec.validate
File.open("#{gemspec.name}.gemspec", 'w'){|f| f.write gemspec.to_ruby }
end

desc %{Release the gem to RubyGems.org}
task :release => :gem do
system "gem push pkg/#{gemspec.name}-#{gemspec.version}.gem"
end

require 'rspec/core'
require 'rspec/core/rake_task'

desc "Run specs"
RSpec::Core::RakeTask.new(:spec) do |spec|
spec.pattern = "spec/**/*_spec.rb"
end

task :default => :spec
10 changes: 10 additions & 0 deletions lib/webmachine.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
require 'webmachine/mongrel2/connection'
require 'webmachine/decision'
require 'webmachine/dispatcher'
require 'webmachine/resource'

# Webmachine is a toolkit for making well-behaved HTTP applications,
# and uses Mongrel2 under the hood. It is based on the Erlang library
# of the same name.
module Webmachine
end
2 changes: 2 additions & 0 deletions lib/webmachine/decision.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
require 'webmachine/decision/flow'
require 'webmachine/decision/fsm'
Loading

0 comments on commit 12987f3

Please sign in to comment.