rack-handlers 0.5.2 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES.md +6 -0
- data/README.md +10 -0
- data/Rakefile +1 -1
- data/lib/rack/handler/rails-server.rb +20 -0
- data/rack-handlers.gemspec +4 -3
- metadata +11 -5
data/CHANGES.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# CHANGES
|
2
2
|
|
3
|
+
## rack-handlers 0.5.3 -- 2012-08-15
|
4
|
+
|
5
|
+
* Add `rack/handlers/rails-server` which would make `rails s` find the
|
6
|
+
proper rack server via trying to load zbatery, rainbows, unicorn, puma,
|
7
|
+
and thin. If none of them are found, falling back to default. (webrick)
|
8
|
+
|
3
9
|
## rack-handlers 0.5.2 -- 2012-02-22
|
4
10
|
|
5
11
|
### Enhancement
|
data/README.md
CHANGED
@@ -27,6 +27,16 @@ Some Rack handlers which are not included in Rack distribution.
|
|
27
27
|
rails s rainbows
|
28
28
|
rails s zbatery
|
29
29
|
|
30
|
+
Additionally, putting `require 'rack/handler/rails-server'` in `script/rails`
|
31
|
+
*before* `require 'rails/commands'` would make `rails s` select the server
|
32
|
+
by default with this order: zbatery, rainbows, unicorn, puma, and thin.
|
33
|
+
|
34
|
+
For zbatery, rainbows, and unicorn, it would also try to load the config
|
35
|
+
via `config/zbatery.rb`, or `config/rainbows.rb` depending on which server
|
36
|
+
is selected.
|
37
|
+
|
38
|
+
> For people who likes to invoke `rails s`!
|
39
|
+
|
30
40
|
## CONTRIBUTORS:
|
31
41
|
|
32
42
|
* Lin Jen-Shin (@godfat)
|
data/Rakefile
CHANGED
@@ -0,0 +1,20 @@
|
|
1
|
+
|
2
|
+
if ARGV[0] == 'server'[0, ARGV[0].size] && ARGV[1] !~ /^\w+/
|
3
|
+
server = %w[zbatery rainbows unicorn puma thin].find do |s|
|
4
|
+
begin
|
5
|
+
require s
|
6
|
+
|
7
|
+
require 'rack/server'
|
8
|
+
class ::Rack::Server
|
9
|
+
alias_method :old_default_options, :default_options
|
10
|
+
define_method :default_options do
|
11
|
+
old_default_options.merge(:config_file => "config/#{s}.rb")
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
rescue LoadError
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
ARGV.insert(1, server)
|
20
|
+
end
|
data/rack-handlers.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "rack-handlers"
|
5
|
-
s.version = "0.5.
|
5
|
+
s.version = "0.5.3"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Lin Jen-Shin (godfat)"]
|
9
|
-
s.date = "2012-
|
9
|
+
s.date = "2012-08-15"
|
10
10
|
s.description = "Some Rack handlers which are not included in Rack distribution."
|
11
11
|
s.email = ["godfat (XD) godfat.org"]
|
12
12
|
s.files = [
|
@@ -15,6 +15,7 @@ Gem::Specification.new do |s|
|
|
15
15
|
"CHANGES.md",
|
16
16
|
"README.md",
|
17
17
|
"Rakefile",
|
18
|
+
"lib/rack/handler/rails-server.rb",
|
18
19
|
"lib/rack/handler/rainbows.rb",
|
19
20
|
"lib/rack/handler/unicorn.rb",
|
20
21
|
"lib/rack/handler/zbatery.rb",
|
@@ -24,7 +25,7 @@ Gem::Specification.new do |s|
|
|
24
25
|
"task/gemgem.rb"]
|
25
26
|
s.homepage = "https://github.com/godfat/rack-handlers"
|
26
27
|
s.require_paths = ["lib"]
|
27
|
-
s.rubygems_version = "1.8.
|
28
|
+
s.rubygems_version = "1.8.24"
|
28
29
|
s.summary = "Some Rack handlers which are not included in Rack distribution."
|
29
30
|
|
30
31
|
if s.respond_to? :specification_version then
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-handlers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-08-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rack
|
16
|
-
requirement:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,12 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
25
30
|
description: Some Rack handlers which are not included in Rack distribution.
|
26
31
|
email:
|
27
32
|
- godfat (XD) godfat.org
|
@@ -34,6 +39,7 @@ files:
|
|
34
39
|
- CHANGES.md
|
35
40
|
- README.md
|
36
41
|
- Rakefile
|
42
|
+
- lib/rack/handler/rails-server.rb
|
37
43
|
- lib/rack/handler/rainbows.rb
|
38
44
|
- lib/rack/handler/unicorn.rb
|
39
45
|
- lib/rack/handler/zbatery.rb
|
@@ -61,7 +67,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
61
67
|
version: '0'
|
62
68
|
requirements: []
|
63
69
|
rubyforge_project:
|
64
|
-
rubygems_version: 1.8.
|
70
|
+
rubygems_version: 1.8.24
|
65
71
|
signing_key:
|
66
72
|
specification_version: 3
|
67
73
|
summary: Some Rack handlers which are not included in Rack distribution.
|