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 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
 
@@ -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
@@ -1,7 +1,7 @@
1
1
  require "sinatra/more_server/unicorn"
2
2
  require "rainbows"
3
3
 
4
- class Sinatra
4
+ module Sinatra
5
5
  module MoreServer
6
6
  # Rack Handler to use Rainbows for Sinatra::Base.run!
7
7
  module Rainbows
@@ -3,7 +3,7 @@ require "unicorn"
3
3
  require "rack/content_length"
4
4
  require "rack/chunked"
5
5
 
6
- class Sinatra
6
+ module Sinatra
7
7
  module MoreServer
8
8
  # Rack Handler to use Unicorn for Sinatra::Base.run!
9
9
  module Unicorn
@@ -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
 
@@ -1,3 +1,2 @@
1
1
  require "sinatra/rspec"
2
2
  require "sinatra/more_server"
3
- Sinatra::Base.set :environment, :test
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinatra-more-server
3
- version: &id001 !ruby/object:Gem::Version
4
- version: 0.4.0.a
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-02-15 00:00:00 +01:00
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
- type: :development
36
- version_requirement:
37
- version_requirements: !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
38
24
  requirements:
39
- - - "="
40
- - *id001
41
- version:
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
- type: :runtime
45
- version_requirement:
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
- version:
46
+ type: :runtime
47
+ version_requirements: *id002
52
48
  - !ruby/object:Gem::Dependency
53
49
  name: rspec
54
- type: :development
55
- version_requirement:
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
- version:
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
- version: 1.3.1
98
- version:
98
+ segments:
99
+ - 0
100
+ version: "0"
99
101
  requirements: []
100
102
 
101
103
  rubyforge_project:
102
- rubygems_version: 1.3.5
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).