Permalink
Browse files

bye, thin

  • Loading branch information...
1 parent 05a5689 commit 5e8fc14c917d0324b67b2ab9a8cc3b28019befbe @jonasschneider committed Dec 29, 2011
Showing with 11 additions and 28 deletions.
  1. +9 −0 Rakefile
  2. +0 −2 lib/momentum.rb
  3. +0 −23 lib/momentum/thin_backend.rb
  4. +1 −1 momentum.gemspec
  5. +1 −1 spec/support/backend_examples.rb
  6. +0 −1 spec/support/helpers.rb
View
@@ -1 +1,10 @@
require "bundler/gem_tasks"
+
+task :default => [:spec]
+
+require 'rspec/core/rake_task'
+desc "Run specs"
+RSpec::Core::RakeTask.new do |t|
+ t.pattern = FileList['spec/**/*_spec.rb']
+ t.rspec_opts = %w(-fp --color)
+end
View
@@ -1,4 +1,3 @@
-require 'thin/backends/base'
require 'spdy'
require 'eventmachine'
require 'em-http'
@@ -9,7 +8,6 @@
require "momentum/stream"
require "momentum/request"
require "momentum/session"
-require "momentum/thin_backend"
require "momentum/backend/base"
require "momentum/backend/local"
@@ -1,23 +0,0 @@
-module Momentum
- class ThinBackend < Thin::Backends::Base
- def initialize(host, port, options)
- @host = host
- @port = port
- super()
- end
-
- def connect
- @signature = EventMachine.start_server(@host, @port, Momentum::Session) do |sess|
- sess.app = server.app
- end
- end
-
- def disconnect
- EventMachine.stop_server(@signature)
- end
-
- def to_s
- "#{@host}:#{@port} (SPDY)"
- end
- end
-end
View
@@ -19,10 +19,10 @@ Gem::Specification.new do |s|
s.require_paths = ["lib"]
s.add_development_dependency "rspec"
+ s.add_development_dependency "rake"
s.add_runtime_dependency "rack"
s.add_runtime_dependency "eventmachine", "~> 0.12.10"
s.add_runtime_dependency "em-http-request"
s.add_runtime_dependency "spdy"
- s.add_runtime_dependency "thin"
end
@@ -22,7 +22,7 @@ def dispatch!
EM.stop
end
- Timeout::timeout(2) {
+ Timeout::timeout(4) {
EM.run do
reply.dispatch!
end
View
@@ -3,7 +3,6 @@
Bundler.setup
require 'rspec'
-require 'thin/backends/base'
require 'spdy'
require 'eventmachine'
require 'em-http'

0 comments on commit 5e8fc14

Please sign in to comment.