thin 0.5.4-x86-mswin32-60 → 0.6.0-x86-mswin32-60

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of thin might be problematic. Click here for more details.

@@ -0,0 +1,18 @@
1
+ require 'erb'
2
+
3
+ MSG_TEMPLATE = File.dirname(__FILE__) + '/email.erb'
4
+ SEND_TO = %w(thin-ruby@googlegroups.com eventmachine-talk@rubyforge.org Rubymtl@lists.artengine.ca ruby-talk@ruby-lang.org)
5
+
6
+ desc 'Generate a template for the new version annoucement'
7
+ task :ann do
8
+ msg = ERB.new(File.read(MSG_TEMPLATE)).result(binding)
9
+
10
+ body = <<END_OF_MESSAGE
11
+ To: #{SEND_TO.join(', ')}
12
+ Subject: [ANN] Thin #{Thin::VERSION::STRING} #{Thin::VERSION::CODENAME} released
13
+
14
+ #{msg}
15
+ END_OF_MESSAGE
16
+
17
+ puts body
18
+ end
@@ -0,0 +1,16 @@
1
+ namespace :deploy do
2
+ task :site => %w(site:upload rdoc:upload)
3
+
4
+ desc 'Deploy on code.macournoyer.com'
5
+ task :alpha => %w(gem:upload deploy:site)
6
+
7
+ desc 'Deploy on rubyforge'
8
+ task :public => %w(gem:upload_rubyforge deploy:site)
9
+ end
10
+ desc 'Deploy on all servers'
11
+ task :deploy => %w(deploy:alpha deploy:public)
12
+
13
+ def upload(file, to, options={})
14
+ sh %{ssh macournoyer@macournoyer.com "rm -rf code.macournoyer.com/#{to}"} if options[:replace]
15
+ sh %{scp -rq #{file} macournoyer@macournoyer.com:code.macournoyer.com/#{to}}
16
+ end
@@ -0,0 +1,46 @@
1
+ Hey all,
2
+
3
+ Version <%= Thin::VERSION::STRING %> (codename <%= Thin::VERSION::CODENAME %>) of the fastest Ruby server is out!
4
+
5
+ http://code.macournoyer.com/thin/
6
+
7
+ == What's new?
8
+
9
+ Bug fix in daemon mode and speed boost for all!
10
+
11
+ * Don't read the full body, use direct streaming when sending response.
12
+ See: Response#each
13
+ As a result, the Content-Length can not be calculated anymore.
14
+ You have to do set this in your adapter. All frameworks do it anyway.
15
+ It improve memory usage and boost speed for low concurrency.
16
+ Thanks to Kent Sibilev and Ezra for their help on that one.
17
+ * Add 'Server' response header
18
+ * Fix --user and --group option not changing daemon process privileges
19
+
20
+ == Get it!
21
+
22
+ sudo gem install thin
23
+
24
+ Might take some time for the gem mirrors to be updated, try adding
25
+ --source http://code.macournoyer.com to the command if it doesn't work
26
+
27
+ If you installed a previous alpha version (if you have <%= Thin::VERSION::STRING %> already installed)
28
+ uninstall it before: sudo gem uninstall thin
29
+
30
+ WARNING:
31
+ Thin is still alpha software, if you use it on your server you understand the
32
+ risks that are involved.
33
+
34
+ == Contribute
35
+
36
+ If you're using Thin, let me know and I'll put your site on http://code.macournoyer.com/thin/users/
37
+
38
+ Thin is driven by an active community of passionate coders and benchmarkers. Please join us, contribute
39
+ or share some ideas in Thin Google Group: http://groups.google.com/group/thin-ruby/topics
40
+
41
+ Also on IRC: #thin on freenode
42
+
43
+ Thanks to all the people who contributed to Thin, EventMachine, Rack and Mongrel.
44
+
45
+ Marc-Andre Cournoyer
46
+ http://macournoyer.com/
@@ -0,0 +1,38 @@
1
+ CLEAN.include %w(**/*.{o,bundle,jar,so,obj,pdb,lib,def,exp,log} ext/*/Makefile ext/*/conftest.dSYM)
2
+
3
+ EXT_DIR = 'ext/thin_parser'
4
+ EXT_BUNDLE = "#{EXT_DIR}/thin_parser.#{Config::CONFIG['DLEXT']}"
5
+ EXT_FILES = FileList[
6
+ "#{EXT_DIR}/*.c",
7
+ "#{EXT_DIR}/*.h",
8
+ "#{EXT_DIR}/*.rl",
9
+ "#{EXT_DIR}/extconf.rb",
10
+ "#{EXT_DIR}/Makefile",
11
+ "lib"
12
+ ]
13
+
14
+ desc "Compile the Ragel state machines"
15
+ task :ragel do
16
+ Dir.chdir EXT_DIR do
17
+ target = "parser.c"
18
+ File.unlink target if File.exist? target
19
+ sh "ragel parser.rl | rlgen-cd -G2 -o #{target}"
20
+ raise "Failed to compile Ragel state machine" unless File.exist? target
21
+ end
22
+ end
23
+
24
+ desc "Compile the extensions"
25
+ task :compile => ["#{EXT_DIR}/Makefile", EXT_BUNDLE]
26
+
27
+ task :package => :compile
28
+
29
+ file "#{EXT_DIR}/Makefile" => ["#{EXT_DIR}/extconf.rb"] do
30
+ cd(EXT_DIR) { ruby "extconf.rb" }
31
+ end
32
+
33
+ file EXT_BUNDLE => EXT_FILES do
34
+ cd EXT_DIR do
35
+ sh(WIN ? 'nmake' : 'make')
36
+ end
37
+ cp EXT_BUNDLE, 'lib/'
38
+ end
@@ -0,0 +1,76 @@
1
+ require 'rake/gempackagetask'
2
+
3
+ task :clean => :clobber_package
4
+
5
+ spec = Gem::Specification.new do |s|
6
+ s.name = Thin::NAME
7
+ s.version = Thin::VERSION::STRING
8
+ s.platform = WIN ? Gem::Platform::CURRENT : Gem::Platform::RUBY
9
+ s.summary =
10
+ s.description = "A thin and fast web server"
11
+ s.author = "Marc-Andre Cournoyer"
12
+ s.email = 'macournoyer@gmail.com'
13
+ s.homepage = 'http://code.macournoyer.com/thin/'
14
+ s.executables = %w(thin)
15
+
16
+ s.required_ruby_version = '>= 1.8.6' # Makes sure the CGI eof fix is there
17
+
18
+ s.add_dependency 'rack', '>= 0.2.0'
19
+ s.add_dependency 'eventmachine', '>= 0.8.1'
20
+ unless WIN
21
+ s.add_dependency 'daemons', '>= 1.0.9'
22
+ end
23
+
24
+ s.files = %w(COPYING CHANGELOG README Rakefile) +
25
+ Dir.glob("{benchmark,bin,doc,example,lib,spec,tasks}/**/*") +
26
+ Dir.glob("ext/**/*.{h,c,rb,rl}")
27
+
28
+ if WIN
29
+ s.files += ["lib/thin_parser.#{Config::CONFIG['DLEXT']}"]
30
+ else
31
+ s.extensions = FileList["ext/**/extconf.rb"].to_a
32
+ end
33
+
34
+ s.require_path = "lib"
35
+ s.bindir = "bin"
36
+ end
37
+
38
+ Rake::GemPackageTask.new(spec) do |p|
39
+ p.gem_spec = spec
40
+ end
41
+
42
+ task :tag_warn do
43
+ puts "*" * 40
44
+ puts "Don't forget to tag the release:"
45
+ puts " git tag -a v#{Thin::VERSION::STRING}"
46
+ puts "*" * 40
47
+ end
48
+ task :gem => :tag_warn
49
+
50
+ namespace :gem do
51
+ desc 'Upload gem to code.macournoyer.com'
52
+ task :upload => :gem do
53
+ upload "pkg/#{spec.full_name}.gem", 'gems'
54
+ system 'ssh macournoyer@macournoyer.com "cd code.macournoyer.com && gem generate_index"'
55
+ end
56
+
57
+ desc 'Upload gem to rubyforge.org'
58
+ task :upload_rubyforge => :gem do
59
+ sh 'rubyforge login'
60
+ sh "rubyforge add_release thin thin #{Thin::VERSION::STRING} pkg/#{spec.full_name}.gem"
61
+ sh "rubyforge add_file thin thin #{Thin::VERSION::STRING} pkg/#{spec.full_name}.gem"
62
+ end
63
+ end
64
+
65
+ task :install => [:clobber, :compile, :package] do
66
+ sh "#{SUDO} #{gem} install pkg/#{spec.full_name}.gem"
67
+ end
68
+
69
+ task :uninstall => :clean do
70
+ sh "#{SUDO} #{gem} uninstall -v #{Thin::VERSION::STRING} -x #{Thin::NAME}"
71
+ end
72
+
73
+
74
+ def gem
75
+ RUBY_1_9 ? 'gem19' : 'gem'
76
+ end
@@ -0,0 +1,25 @@
1
+ require 'rake/rdoctask'
2
+
3
+ CLEAN.include %w(doc/rdoc)
4
+
5
+ Rake::RDocTask.new do |rdoc|
6
+ rdoc.rdoc_dir = 'doc/rdoc'
7
+ rdoc.options += ['--quiet', '--title', Thin::NAME,
8
+ "--opname", "index.html",
9
+ "--line-numbers",
10
+ "--main", "README",
11
+ "--inline-source"]
12
+ rdoc.template = "site/rdoc.rb"
13
+ rdoc.main = "README"
14
+ rdoc.title = Thin::NAME
15
+ rdoc.rdoc_files.add %w(README) +
16
+ FileList['lib/**/*.rb'] +
17
+ FileList['bin/*']
18
+ end
19
+
20
+ namespace :rdoc do
21
+ desc 'Upload rdoc to code.macournoyer.com'
22
+ task :upload => :rdoc do
23
+ upload "doc/rdoc", 'thin/doc', :replace => true
24
+ end
25
+ end
@@ -0,0 +1,15 @@
1
+ namespace :site do
2
+ task :build do
3
+ mkdir_p 'tmp/site/images'
4
+ cd 'tmp/site' do
5
+ sh "SITE_ROOT='/thin' ruby ../../site/thin.rb --dump"
6
+ end
7
+ cp 'site/style.css', 'tmp/site'
8
+ cp_r Dir['site/images/*'], 'tmp/site/images'
9
+ end
10
+
11
+ desc 'Upload website to code.macournoyer.com'
12
+ task :upload => 'site:build' do
13
+ upload 'tmp/site/*', 'thin'
14
+ end
15
+ end
@@ -0,0 +1,26 @@
1
+ CLEAN.include %w(coverage tmp log)
2
+
3
+ if RUBY_1_9
4
+ task :spec do
5
+ warn 'RSpec not yet supporting Ruby 1.9, so cannot run the specs :('
6
+ end
7
+ else
8
+ # RSpec not yet working w/ Ruby 1.9
9
+ require 'spec/rake/spectask'
10
+
11
+ desc "Run all examples"
12
+ Spec::Rake::SpecTask.new('spec') do |t|
13
+ t.spec_files = FileList['spec/**/*_spec.rb']
14
+ end
15
+
16
+ task :check_spec_gems do
17
+ begin
18
+ require 'spec'
19
+ require 'benchmark_unit'
20
+ rescue LoadError
21
+ abort "To run specs, install rspec and benchmark_unit gems"
22
+ end
23
+ end
24
+
25
+ task :spec => [:check_spec_gems, :compile]
26
+ end
@@ -0,0 +1,15 @@
1
+ desc 'Show some stats about the code'
2
+ task :stats do
3
+ line_count = proc do |path|
4
+ Dir[path].collect { |f| File.open(f).readlines.reject { |l| l =~ /(^\s*(\#|\/\*))|^\s*$/ }.size }.inject(0){ |sum,n| sum += n }
5
+ end
6
+ lib = line_count['lib/**/*.rb']
7
+ ext = line_count['ext/**/*.{c,h}']
8
+ spec = line_count['spec/**/*.rb']
9
+ ratio = '%1.2f' % (spec.to_f / lib.to_f)
10
+
11
+ puts "#{lib.to_s.rjust(6)} LOC of lib"
12
+ puts "#{ext.to_s.rjust(6)} LOC of ext"
13
+ puts "#{spec.to_s.rjust(6)} LOC of spec"
14
+ puts "#{ratio.to_s.rjust(6)} ratio lib/spec"
15
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.4
4
+ version: 0.6.0
5
5
  platform: x86-mswin32-60
6
6
  authors:
7
7
  - Marc-Andre Cournoyer
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-01-19 00:00:00 -07:00
12
+ date: 2008-01-25 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -48,6 +48,7 @@ files:
48
48
  - benchmark/utils.rb
49
49
  - bin/thin
50
50
  - doc/benchmarks.txt
51
+ - example/adapter.rb
51
52
  - example/config.ru
52
53
  - example/thin.god
53
54
  - lib/rack
@@ -64,10 +65,10 @@ files:
64
65
  - lib/thin/request.rb
65
66
  - lib/thin/response.rb
66
67
  - lib/thin/server.rb
68
+ - lib/thin/stats.rb
67
69
  - lib/thin/statuses.rb
68
70
  - lib/thin/version.rb
69
71
  - lib/thin.rb
70
- - lib/thin_parser.so
71
72
  - spec/cluster_spec.rb
72
73
  - spec/daemonizing_spec.rb
73
74
  - spec/headers_spec.rb
@@ -131,6 +132,15 @@ files:
131
132
  - spec/response_spec.rb
132
133
  - spec/server_spec.rb
133
134
  - spec/spec_helper.rb
135
+ - tasks/announce.rake
136
+ - tasks/deploy.rake
137
+ - tasks/email.erb
138
+ - tasks/ext.rake
139
+ - tasks/gem.rake
140
+ - tasks/rdoc.rake
141
+ - tasks/site.rake
142
+ - tasks/spec.rake
143
+ - tasks/stats.rake
134
144
  - ext/thin_parser/ext_help.h
135
145
  - ext/thin_parser/parser.h
136
146
  - ext/thin_parser/parser.c
@@ -138,6 +148,7 @@ files:
138
148
  - ext/thin_parser/extconf.rb
139
149
  - ext/thin_parser/common.rl
140
150
  - ext/thin_parser/parser.rl
151
+ - lib/thin_parser.so
141
152
  has_rdoc: false
142
153
  homepage: http://code.macournoyer.com/thin/
143
154
  post_install_message: