Permalink
Browse files

First cut

  • Loading branch information...
evanphx committed Apr 15, 2012
0 parents commit 4ddd03a1bb03151c98a81bc0cabbb2b679eb2fa7
Showing with 518 additions and 0 deletions.
  1. +23 −0 .autotest
  2. +6 −0 History.txt
  3. +8 −0 Manifest.txt
  4. +57 −0 README.txt
  5. +24 −0 Rakefile
  6. +33 −0 bin/puma_express
  7. +277 −0 lib/puma/express.rb
  8. +9 −0 lib/puma/express/current_process.rb
  9. +47 −0 lib/puma/express_dns.rb
  10. +20 −0 lib/puma/starter.rb
  11. +8 −0 test/test_puma_express.rb
  12. +6 −0 tmp/hello/config.ru
@@ -0,0 +1,23 @@
+# -*- ruby -*-
+
+require 'autotest/restart'
+
+# Autotest.add_hook :initialize do |at|
+# at.extra_files << "../some/external/dependency.rb"
+#
+# at.libs << ":../some/external"
+#
+# at.add_exception 'vendor'
+#
+# at.add_mapping(/dependency.rb/) do |f, _|
+# at.files_matching(/test_.*rb$/)
+# end
+#
+# %w(TestA TestB).each do |klass|
+# at.extra_class_map[klass] = "test/test_misc.rb"
+# end
+# end
+
+# Autotest.add_hook :run_command do |at|
+# system "rake build"
+# end
@@ -0,0 +1,6 @@
+=== 1.0.0 / 2012-04-05
+
+* 1 major enhancement
+
+ * Birthday!
+
@@ -0,0 +1,8 @@
+.autotest
+History.txt
+Manifest.txt
+README.txt
+Rakefile
+bin/puma/express
+lib/puma/express.rb
+test/test_puma/express.rb
@@ -0,0 +1,57 @@
+= puma-express
+
+* FIX (url)
+
+== DESCRIPTION:
+
+FIX (describe your package)
+
+== FEATURES/PROBLEMS:
+
+* FIX (list of features or problems)
+
+== SYNOPSIS:
+
+ FIX (code sample of usage)
+
+== REQUIREMENTS:
+
+* FIX (list of requirements)
+
+== INSTALL:
+
+* FIX (sudo gem install, anything else)
+
+== DEVELOPERS:
+
+After checking out the source, run:
+
+ $ rake newb
+
+This task will install any missing dependencies, run the tests/specs,
+and generate the RDoc.
+
+== LICENSE:
+
+(The MIT License)
+
+Copyright (c) 2012 FIX
+
+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 OR COPYRIGHT HOLDERS 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.
@@ -0,0 +1,24 @@
+# -*- ruby -*-
+
+require 'rubygems'
+require 'hoe'
+
+# Hoe.plugin :compiler
+# Hoe.plugin :gem_prelude_sucks
+# Hoe.plugin :git
+# Hoe.plugin :inline
+# Hoe.plugin :racc
+# Hoe.plugin :rcov
+# Hoe.plugin :rubyforge
+
+Hoe.spec 'puma-express' do
+ # HEY! If you fill these out in ~/.hoe_template/Rakefile.erb then
+ # you'll never have to touch them again!
+ # (delete this comment too, of course)
+
+ # developer('FIX', 'FIX@example.com')
+
+ # self.rubyforge_name = 'puma-expressx' # if different than 'puma-express'
+end
+
+# vim: syntax=ruby
@@ -0,0 +1,33 @@
+#!/usr/bin/env ruby
+
+require 'puma'
+require 'puma/server'
+
+require 'puma/express'
+require 'puma/express_dns'
+
+dns = Puma::ExpressDNS.new 9953
+
+dns.run
+
+app = Puma::Express.new
+
+events = Puma::Events.new STDOUT, STDERR
+
+s = Puma::Server.new app, events
+s.min_threads = 0
+s.max_threads = 10
+
+s.add_tcp_listener "127.0.0.1", 9223
+
+Signal.trap "INT" do
+ s.stop
+end
+
+Signal.trap "TERM" do
+ s.stop
+end
+
+s.run.join
+
+app.cleanup
Oops, something went wrong.

0 comments on commit 4ddd03a

Please sign in to comment.