public
Rubygem
Description: Merb Core: All you need. None you don't.
Homepage: http://www.merbivore.com
Clone URL: git://github.com/wycats/merb-core.git
Search Repo:
Applying patch to allow use of thin_turbo adapter. Thanks dkubb!
wayneeseguin (author)
Mon Jul 21 12:03:27 -0700 2008
commit  defdabd8df298863a2704d66c6d1054058a9d84f
tree    6a0cc969f64d66c8fee1682ca55bb2572621758b
parent  c63375986e5111b00cd66c9dc608f216d5069d15
...
12
13
14
 
15
16
17
...
12
13
14
15
16
17
18
0
@@ -12,6 +12,7 @@ module Merb
0
     autoload :Runner, "merb-core/rack/adapter/runner"
0
     autoload :SwiftipliedMongrel, "merb-core/rack/adapter/swiftiplied_mongrel"
0
     autoload :Thin, "merb-core/rack/adapter/thin"
0
+ autoload :ThinTurbo, "merb-core/rack/adapter/thin_turbo"
0
     autoload :WEBrick, "merb-core/rack/adapter/webrick"
0
     autoload :PathPrefix, "merb-core/rack/middleware/path_prefix"
0
     autoload :Static, "merb-core/rack/middleware/static"
...
36
37
38
 
39
40
41
...
36
37
38
39
40
41
42
0
@@ -36,6 +36,7 @@ module Merb
0
     Adapter.register %w{runner}, :Runner
0
     Adapter.register %w{smongrel swift}, :SwiftipliedMongrel
0
     Adapter.register %w{thin}, :Thin
0
+ Adapter.register %w{thin-turbo}, :ThinTurbo
0
     Adapter.register %w{webrick}, :WEBrick
0
     
0
   end # Rack
...
7
8
9
10
 
11
12
13
 
14
15
16
...
7
8
9
 
10
11
12
 
13
14
15
16
0
@@ -7,10 +7,10 @@ module Merb
0
       # start an Ebb server on given host and port.
0
       
0
       # ==== Parameters
0
- # opts<Hash>:: Options for Thin (see below).
0
+ # opts<Hash>:: Options for Ebb (see below).
0
       #
0
       # ==== Options (opts)
0
- # :host<String>:: The hostname that Thin should serve.
0
+ # :host<String>:: The hostname that Ebb should serve.
0
       # :port<Fixnum>:: The port Ebb should bind to.
0
       # :app:: The application
0
       def self.start(opts={})
...
1
2
3
4
 
5
6
7
8
9
 
10
11
12
...
22
23
24
25
 
26
27
28
29
30
31
 
32
33
34
...
1
2
3
 
4
5
6
7
8
 
9
10
11
12
...
22
23
24
 
25
26
27
28
29
30
 
31
32
33
34
0
@@ -1,12 +1,12 @@
0
 require "thin"
0
 
0
 module Merb
0
-
0
+
0
   module Rack
0
 
0
     class Thin
0
       # start a Thin server on given host and port.
0
-
0
+
0
       # ==== Parameters
0
       # opts<Hash>:: Options for Thin (see below).
0
       #
0
@@ -22,13 +22,13 @@ module Merb
0
           socket = opts[:socket] || "0"
0
           socket_file = opts[:socket_file] || "#{Merb.root}/log/merb.#{socket}.sock"
0
           Merb.logger.warn!("Using Thin adapter with socket file #{socket_file}.")
0
- server = ::Thin::Server.start(socket_file, opts[:app])
0
+ server = ::Thin::Server.start(socket_file, opts[:app], opts)
0
         else
0
           Merb.logger.warn!("Using Thin adapter on host #{opts[:host]} and port #{opts[:port]}.")
0
           if opts[:host].include?('/')
0
             opts[:host] = "#{opts[:host]}-#{opts[:port]}"
0
           end
0
- server = ::Thin::Server.start(opts[:host], opts[:port].to_i, opts[:app])
0
+ server = ::Thin::Server.start(opts[:host], opts[:port].to_i, opts[:app], opts)
0
         end
0
         Merb::Server.change_privilege
0
         ::Thin::Logging.silent = true

Comments

  • bradfordw Mon Jul 21 13:25:55 -0700 2008

    Sorry, I’m having trouble translating this to the command line…do you happen to have an example? If I’m currently doing this:
    merb -a thin

    How should I translate this now?

  • bradfordw Mon Jul 21 13:56:19 -0700 2008

    By that I mean merb -a thin-turbo seems to cough this up:
    merb-core-0.9.4/lib/merb-core/core_ext/object.rb:88:in `full_const_get’: private method `split’ called for nil:NilClass (NoMethodError)

  • michaelklishin Mon Jul 21 19:53:09 -0700 2008

    Clone git://github.com/macournoyer/thin-turbo.git, build it, install the gem and then you can use thin-turbo adapter. It just worked for me. Pretty damn fast.

  • bradfordw Tue Jul 22 06:15:43 -0700 2008

    Yep, got it going – it’s exceptionally fast, however it appears to be eating up 99.9% of my CPU on my macbook pro.

  • cmer Wed Jul 23 19:32:16 -0700 2008

    Swiftiply + Thin Turbo would be awesome! :)