reel-rack 0.0.2 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +4 -0
- data/README.md +11 -0
- data/lib/rack/handler/reel.rb +2 -2
- data/lib/reel/rack/cli.rb +3 -3
- data/lib/reel/rack/server.rb +4 -5
- data/lib/reel/rack/version.rb +1 -1
- data/reel-rack.gemspec +1 -1
- data/spec/reel/rack/server_spec.rb +1 -2
- metadata +5 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc7ecfe45aa2bef28b5a6b9e5e95127eb3e3a0a9
|
4
|
+
data.tar.gz: 39d1a7786272eaccfc359a7f9588307d2fe2436a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 61b6bcb57a21df10f709cbb614cc469c438f2d5a624ad3aeced9e473dc0325eeac0ed89e6ace1c7ebab905fc563992627ac5c8052bd688d9a97725e8d6a001e1
|
7
|
+
data.tar.gz: 510c3ec44a3e4a0da0aedc5eee8c586ea801151da36d55bfe45b23098377c116af7ea600f710e9ef83a15d21aea2593d489b9d09ce55a45276c7622f7568ae36
|
data/CHANGES.md
CHANGED
data/README.md
CHANGED
@@ -20,6 +20,17 @@ Bundle it with your application by adding this to your Gemfile:
|
|
20
20
|
|
21
21
|
gem 'reel-rack'
|
22
22
|
|
23
|
+
## Documentation
|
24
|
+
|
25
|
+
Please see the [Reel::Rack Wiki][wiki] for detailed documentation, including
|
26
|
+
how to use Reel::Rack with the [Ruby on Rails][rails] web framework.
|
27
|
+
|
28
|
+
More information about Reel itself can be found on the [Reel Project Page][reel]
|
29
|
+
|
30
|
+
[wiki]: https://github.com/celluloid/reel-rack/wiki
|
31
|
+
[rails]: http://rubyonrails.org/
|
32
|
+
[reel]: https://github.com/celluloid/reel
|
33
|
+
|
23
34
|
## Usage
|
24
35
|
|
25
36
|
You should be able to launch any Rack-compatible under Reel with:
|
data/lib/rack/handler/reel.rb
CHANGED
data/lib/reel/rack/cli.rb
CHANGED
@@ -8,7 +8,7 @@ module Reel
|
|
8
8
|
@argv = argv
|
9
9
|
@options = {
|
10
10
|
addr: "localhost",
|
11
|
-
|
11
|
+
Port: 3000,
|
12
12
|
quiet: false,
|
13
13
|
rackup: "config.ru"
|
14
14
|
}
|
@@ -23,8 +23,8 @@ module Reel
|
|
23
23
|
@options[:addr] = addr
|
24
24
|
end
|
25
25
|
|
26
|
-
o.on "-p", "--port PORT", "Port to bind to (default #{@options[:
|
27
|
-
@options[:
|
26
|
+
o.on "-p", "--port PORT", "Port to bind to (default #{@options[:Port]})" do |port|
|
27
|
+
@options[:Port] = port
|
28
28
|
end
|
29
29
|
|
30
30
|
o.on "-q", "--quiet", "Suppress normal logging output" do
|
data/lib/reel/rack/server.rb
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
|
2
1
|
# Adapted from code orinially Copyright (c) 2013 Jonathan Stott
|
3
2
|
|
4
3
|
require 'reel'
|
@@ -12,13 +11,13 @@ module Reel
|
|
12
11
|
attr_reader :app
|
13
12
|
|
14
13
|
def initialize(app, options)
|
15
|
-
raise ArgumentError, "no host given" unless options[:
|
16
|
-
raise ArgumentError, "no port given" unless options[:
|
14
|
+
raise ArgumentError, "no host given" unless options[:Host]
|
15
|
+
raise ArgumentError, "no port given" unless options[:Port]
|
17
16
|
|
18
17
|
info "A Reel good HTTP server! (Codename \"#{::Reel::CODENAME}\")"
|
19
|
-
info "Listening on http://#{options[:
|
18
|
+
info "Listening on http://#{options[:Host]}:#{options[:Port]}"
|
20
19
|
|
21
|
-
super(options[:
|
20
|
+
super(options[:Host], options[:Port], &method(:on_connection))
|
22
21
|
@app = app
|
23
22
|
end
|
24
23
|
|
data/lib/reel/rack/version.rb
CHANGED
data/reel-rack.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_runtime_dependency "reel", ">= 0.4.0
|
21
|
+
spec.add_runtime_dependency "reel", ">= 0.4.0"
|
22
22
|
spec.add_runtime_dependency "rack", ">= 1.4.0"
|
23
23
|
|
24
24
|
spec.add_development_dependency "bundler", "~> 1.3"
|
@@ -1,4 +1,3 @@
|
|
1
|
-
|
2
1
|
require 'spec_helper'
|
3
2
|
require 'net/http'
|
4
3
|
|
@@ -9,7 +8,7 @@ describe Reel::Rack::Server do
|
|
9
8
|
|
10
9
|
subject do
|
11
10
|
app = proc { [200, {"Content-Type" => "text/plain"}, body] }
|
12
|
-
described_class.new(app, :
|
11
|
+
described_class.new(app, :Host => host, :Port => port)
|
13
12
|
end
|
14
13
|
|
15
14
|
it "runs a basic Hello World app" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: reel-rack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tony Arcieri
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-10-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: reel
|
@@ -17,14 +17,14 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - '>='
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 0.4.0
|
20
|
+
version: 0.4.0
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - '>='
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: 0.4.0
|
27
|
+
version: 0.4.0
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: rack
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -129,11 +129,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
129
129
|
version: '0'
|
130
130
|
requirements: []
|
131
131
|
rubyforge_project:
|
132
|
-
rubygems_version: 2.0.
|
132
|
+
rubygems_version: 2.0.6
|
133
133
|
signing_key:
|
134
134
|
specification_version: 4
|
135
135
|
summary: Rack adapter for Reel, a Celluloid::IO web server
|
136
136
|
test_files:
|
137
137
|
- spec/reel/rack/server_spec.rb
|
138
138
|
- spec/spec_helper.rb
|
139
|
-
has_rdoc:
|