Skip to content
Browse files

Add rake task to create gem

git-svn-id: http://code.macournoyer.com/svn/thin/trunk@293 ab7993de-5426-0410-a80b-baa00616f331
  • Loading branch information...
1 parent f442ebe commit 348931b49bbb63aaa9ed750d7576a2eb8657821a macournoyer committed
Showing with 50 additions and 3 deletions.
  1. +18 −0 COPYING
  2. +29 −1 Rakefile
  3. +2 −1 lib/thin/consts.rb
  4. +1 −1 test/request_test.rb
View
18 COPYING
@@ -0,0 +1,18 @@
+Copyright (c) 2007 Marc-Andre Cournoyer
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
30 Rakefile
@@ -1,8 +1,36 @@
require 'rake'
+require 'rake/clean'
require 'rake/testtask'
+require 'rake/gempackagetask'
+
+require File.dirname(__FILE__) + '/lib/thin'
+
+CLEAN.include %w(doc/rdoc pkg)
Rake::TestTask.new do |t|
t.pattern = 'test/*_test.rb'
end
+task :default => :test
+
+spec = Gem::Specification.new do |s|
+ s.name = Thin::NAME
+ s.version = Thin::VERSION
+ s.platform = Gem::Platform::RUBY
+ s.summary = "Thin and fast web server"
+ s.description = s.summary
+ s.author = "Marc-Andre Cournoyer"
+ s.email = 'macournoyer@gmail.com'
+ s.homepage = 'http://code.macournoyer.com/thin/'
+ s.executables = %w(thin)
+
+ s.required_ruby_version = '>= 1.8.2'
-task :default => :test
+ s.files = %w(COPYING README Rakefile) + Dir.glob("{bin,doc,test,lib}/**/*")
+
+ s.require_path = "lib"
+ s.bindir = "bin"
+end
+
+Rake::GemPackageTask.new(spec) do |p|
+ p.gem_spec = spec
+end
View
3 lib/thin/consts.rb
@@ -1,7 +1,8 @@
module Thin
+ NAME = 'thin'.freeze
CHUNK_SIZE = 16 * 1024
VERSION = '0.1'.freeze
- SERVER = "Thin #{VERSION}".freeze
+ SERVER = "#{NAME} #{VERSION}".freeze
CONTENT_LENGTH = 'Content-Length'.freeze
CONTENT_TYPE = 'Content-Type'.freeze
View
2 test/request_test.rb
@@ -91,7 +91,7 @@ def test_parse_perfs
hi=there#{'&name=marc&email=macournoyer@gmail.com'*1000}
EOS
- assert_faster_then 0.170 do
+ assert_faster_then 0.180 do
Thin::Request.new(body)
end

0 comments on commit 348931b

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