sinatra-more-server 0.4.0.a → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +6 -0
- data/lib/sinatra/more_server.rb +9 -4
- data/lib/sinatra/more_server/rainbows.rb +1 -1
- data/lib/sinatra/more_server/unicorn.rb +1 -1
- data/spec/sinatra/more_server_spec.rb +1 -1
- data/spec/spec_helper.rb +0 -1
- metadata +42 -40
data/README.md
CHANGED
@@ -12,6 +12,12 @@ BigBand
|
|
12
12
|
Sinatra::MoreServer is part of the [BigBand](http://github.com/rkh/big_band) stack.
|
13
13
|
Check it out if you are looking for other fancy Sinatra extensions.
|
14
14
|
|
15
|
+
|
16
|
+
Installation
|
17
|
+
------------
|
18
|
+
|
19
|
+
gem install sinatra-more-server --prerelease
|
20
|
+
|
15
21
|
Additional Servers
|
16
22
|
------------------
|
17
23
|
|
data/lib/sinatra/more_server.rb
CHANGED
@@ -14,14 +14,19 @@ module Sinatra
|
|
14
14
|
::Rack::Handler.register "ebb", "::Rack::Handler::Ebb"
|
15
15
|
::Rack::Handler.autoload :Ebb, "ebb"
|
16
16
|
klass.server += ["ebb", "zbatery", "rainbows", "unicorn"]
|
17
|
-
klass.set :async_server, ["thin", "zbatery", "rainbows"]
|
17
|
+
klass.set :async_server, ["thin", "ebb", "zbatery", "rainbows"]
|
18
18
|
end
|
19
|
-
|
19
|
+
|
20
20
|
def has_async_callback!
|
21
|
+
@has_async_callback = true
|
21
22
|
set :server, async_server
|
22
23
|
end
|
23
|
-
|
24
|
+
|
25
|
+
def has_async_callback?
|
26
|
+
!!@has_async_callback
|
27
|
+
end
|
28
|
+
|
24
29
|
end
|
25
|
-
|
30
|
+
|
26
31
|
register MoreServer
|
27
32
|
end
|
@@ -11,12 +11,12 @@ describe Sinatra::MoreServer do
|
|
11
11
|
end
|
12
12
|
|
13
13
|
describe "async_server" do
|
14
|
-
it("should not offer ebb as an async server") { app.async_server.should_not include("ebb") }
|
15
14
|
it("should not offer mongrel as an async server") { app.async_server.should_not include("mongrel") }
|
16
15
|
it("should not offer webrick as an async server") { app.async_server.should_not include("webrick") }
|
17
16
|
it("should not offer unicorn as an async server") { app.async_server.should_not include("unicorn") }
|
18
17
|
|
19
18
|
it("should offer thin as an async server") { app.async_server.should include("thin") }
|
19
|
+
it("should offer ebb as an async server") { app.async_server.should include("ebb") }
|
20
20
|
it("should offer rainbows as an async server") { app.async_server.should include("rainbows") }
|
21
21
|
it("should offer zbatery as an async server") { app.async_server.should include("zbatery") }
|
22
22
|
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sinatra-more-server
|
3
|
-
version:
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 4
|
8
|
+
- 0
|
9
|
+
version: 0.4.0
|
5
10
|
platform: ruby
|
6
11
|
authors:
|
7
12
|
- Konstantin Haase
|
@@ -9,56 +14,51 @@ autorequire:
|
|
9
14
|
bindir: bin
|
10
15
|
cert_chain: []
|
11
16
|
|
12
|
-
date: 2010-
|
17
|
+
date: 2010-04-16 00:00:00 +02:00
|
13
18
|
default_executable:
|
14
19
|
dependencies:
|
15
|
-
- !ruby/object:Gem::Dependency
|
16
|
-
name: monkey-lib
|
17
|
-
type: :runtime
|
18
|
-
version_requirement:
|
19
|
-
version_requirements: !ruby/object:Gem::Requirement
|
20
|
-
requirements:
|
21
|
-
- - "="
|
22
|
-
- *id001
|
23
|
-
version:
|
24
|
-
- !ruby/object:Gem::Dependency
|
25
|
-
name: sinatra-sugar
|
26
|
-
type: :runtime
|
27
|
-
version_requirement:
|
28
|
-
version_requirements: !ruby/object:Gem::Requirement
|
29
|
-
requirements:
|
30
|
-
- - "="
|
31
|
-
- *id001
|
32
|
-
version:
|
33
20
|
- !ruby/object:Gem::Dependency
|
34
21
|
name: sinatra-test-helper
|
35
|
-
|
36
|
-
|
37
|
-
version_requirements: !ruby/object:Gem::Requirement
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
38
24
|
requirements:
|
39
|
-
- -
|
40
|
-
-
|
41
|
-
|
25
|
+
- - ~>
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
segments:
|
28
|
+
- 0
|
29
|
+
- 4
|
30
|
+
- 0
|
31
|
+
version: 0.4.0
|
32
|
+
type: :development
|
33
|
+
version_requirements: *id001
|
42
34
|
- !ruby/object:Gem::Dependency
|
43
35
|
name: sinatra
|
44
|
-
|
45
|
-
|
46
|
-
version_requirements: !ruby/object:Gem::Requirement
|
36
|
+
prerelease: false
|
37
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
47
38
|
requirements:
|
48
39
|
- - ">="
|
49
40
|
- !ruby/object:Gem::Version
|
41
|
+
segments:
|
42
|
+
- 0
|
43
|
+
- 9
|
44
|
+
- 4
|
50
45
|
version: 0.9.4
|
51
|
-
|
46
|
+
type: :runtime
|
47
|
+
version_requirements: *id002
|
52
48
|
- !ruby/object:Gem::Dependency
|
53
49
|
name: rspec
|
54
|
-
|
55
|
-
|
56
|
-
version_requirements: !ruby/object:Gem::Requirement
|
50
|
+
prerelease: false
|
51
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
57
52
|
requirements:
|
58
53
|
- - ">="
|
59
54
|
- !ruby/object:Gem::Version
|
55
|
+
segments:
|
56
|
+
- 1
|
57
|
+
- 3
|
58
|
+
- 0
|
60
59
|
version: 1.3.0
|
61
|
-
|
60
|
+
type: :development
|
61
|
+
version_requirements: *id003
|
62
62
|
description: Adds more server to Sinatra::Base#run! (part of BigBand).
|
63
63
|
email: konstantin.mailinglists@googlemail.com
|
64
64
|
executables: []
|
@@ -88,18 +88,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
88
88
|
requirements:
|
89
89
|
- - ">="
|
90
90
|
- !ruby/object:Gem::Version
|
91
|
+
segments:
|
92
|
+
- 0
|
91
93
|
version: "0"
|
92
|
-
version:
|
93
94
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
94
95
|
requirements:
|
95
|
-
- - "
|
96
|
+
- - ">="
|
96
97
|
- !ruby/object:Gem::Version
|
97
|
-
|
98
|
-
|
98
|
+
segments:
|
99
|
+
- 0
|
100
|
+
version: "0"
|
99
101
|
requirements: []
|
100
102
|
|
101
103
|
rubyforge_project:
|
102
|
-
rubygems_version: 1.3.
|
104
|
+
rubygems_version: 1.3.6
|
103
105
|
signing_key:
|
104
106
|
specification_version: 3
|
105
107
|
summary: Adds more server to Sinatra::Base#run! (part of BigBand).
|