falcon 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -13
- data/lib/falcon/command.rb +14 -1
- data/lib/falcon/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 58f450dc6e553fb95a5f00e8a6a324cdd7307ea5
|
4
|
+
data.tar.gz: a543cf863916d2b2cbbe5f411eab7dd2879d0447
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 72c3e70bd529b3bbd41b80e046c82e24ced2d2243656b35f94658b141ca98a0f8a26f9f75319e488b8485ee41d2e3922da3c926a557cd238f7028dd052be60bf
|
7
|
+
data.tar.gz: b1d000e4c04c8adb80519aba8d646e535c2fcacb9f84c31f492e170a695d93be6c8b7a29a66a12bdad5d9300b3e8ee1f7175133d20dfd79f4f8ee76358e0a3c7
|
data/README.md
CHANGED
@@ -38,20 +38,9 @@ Falcon can restart very quickly and is ideal for use with guard. See [guard-falc
|
|
38
38
|
|
39
39
|
### Integration with Capybara
|
40
40
|
|
41
|
-
It is a very fast and light-weight
|
41
|
+
It is a very fast and light-weight implementation for Capybara:
|
42
42
|
|
43
|
-
|
44
|
-
Capybara.register_server :falcon do |app, port, host|
|
45
|
-
require 'async/reactor'
|
46
|
-
require 'falcon/server'
|
47
|
-
|
48
|
-
Async::Reactor.run do
|
49
|
-
server = Falcon::Server.new(app, [Async::IO::Endpoint.tcp(host, port)])
|
50
|
-
|
51
|
-
server.run
|
52
|
-
end
|
53
|
-
end
|
54
|
-
```
|
43
|
+
[falcon-capybara]: https://github.com/socketry/falcon-capybara
|
55
44
|
|
56
45
|
### Using with Rackup
|
57
46
|
|
data/lib/falcon/command.rb
CHANGED
@@ -48,12 +48,25 @@ module Falcon
|
|
48
48
|
option '-n/--concurrency <count>', "Number of processes to start", default: Command.default_concurrency, type: Integer
|
49
49
|
|
50
50
|
option '-b/--bind <address>', "Bind to the given hostname/address", default: "tcp://localhost:9292"
|
51
|
+
|
52
|
+
option '--forked | --threaded', "Select a specific concurrency model", key: :container, default: :threaded
|
53
|
+
end
|
54
|
+
|
55
|
+
def container_class
|
56
|
+
case @options[:container]
|
57
|
+
when :threaded
|
58
|
+
require 'async/container/threaded'
|
59
|
+
return Async::Container::Threaded
|
60
|
+
when :forked
|
61
|
+
require 'async/container/forked'
|
62
|
+
return Async::Container::Forked
|
63
|
+
end
|
51
64
|
end
|
52
65
|
|
53
66
|
def run
|
54
67
|
app, options = Rack::Builder.parse_file(@options[:config])
|
55
68
|
|
56
|
-
|
69
|
+
container_class.new(concurrency: @options[:concurrency]) do
|
57
70
|
server = Falcon::Server.new(app, [
|
58
71
|
Async::IO::Endpoint.parse(@options[:bind], reuse_port: true)
|
59
72
|
])
|
data/lib/falcon/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: falcon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-08-
|
11
|
+
date: 2017-08-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: async-http
|
@@ -162,7 +162,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
162
162
|
version: '0'
|
163
163
|
requirements: []
|
164
164
|
rubyforge_project:
|
165
|
-
rubygems_version: 2.6.
|
165
|
+
rubygems_version: 2.6.10
|
166
166
|
signing_key:
|
167
167
|
specification_version: 4
|
168
168
|
summary: ''
|