guard-falcon 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +5 -1
- data/guard-falcon.gemspec +1 -1
- data/lib/guard/falcon/controller.rb +13 -6
- data/lib/guard/falcon/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c4e9293f4a99671e2767b002142110ac1001ef021de892c2fd0127dd35ae4685
|
4
|
+
data.tar.gz: 687e7411aeccb931a42c4e3859eea5c77d422711eac0c6236e156765bc8862aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86a7a1cb7311952b4b2abc0e67c05b0b13a0e95e780194ffbb13cc8e25d8bc0ebf407d01f897d0ca0fc0e9f635f718ff46842abcdbea590f5db00b12609737fe
|
7
|
+
data.tar.gz: 2d824568d04e95283335da026a76d386273a5c31d8a29a20b9f9e6f77e4052cde7f5c2bbd9e9f310893f94f6ee147b34f533cd449f30f2c5cfb692858a43448a
|
data/.travis.yml
CHANGED
data/guard-falcon.gemspec
CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |spec|
|
|
16
16
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
17
17
|
spec.require_paths = ["lib"]
|
18
18
|
|
19
|
-
spec.add_dependency("falcon", "~> 0.
|
19
|
+
spec.add_dependency("falcon", "~> 0.15.0")
|
20
20
|
|
21
21
|
spec.add_dependency("guard")
|
22
22
|
spec.add_dependency("guard-compat", "~> 1.2")
|
@@ -26,6 +26,7 @@ require 'rack/server'
|
|
26
26
|
require 'async/container/forked'
|
27
27
|
|
28
28
|
require 'async/io/host_endpoint'
|
29
|
+
require 'async/http/url_endpoint'
|
29
30
|
|
30
31
|
require 'falcon/server'
|
31
32
|
require 'falcon/adapters/rack'
|
@@ -34,8 +35,6 @@ module Guard
|
|
34
35
|
module Falcon
|
35
36
|
class Controller < Plugin
|
36
37
|
DEFAULT_OPTIONS = {
|
37
|
-
port: 9292,
|
38
|
-
host: 'localhost',
|
39
38
|
config: 'config.ru',
|
40
39
|
concurrency: 2,
|
41
40
|
}
|
@@ -60,14 +59,22 @@ module Guard
|
|
60
59
|
logger.error $!.backtrace
|
61
60
|
end
|
62
61
|
|
63
|
-
|
62
|
+
# Support existing use cases where only port: is specified.
|
63
|
+
if @options[:endpoint]
|
64
|
+
endpoint = @options[:endpoint]
|
65
|
+
elsif port = @options[:port]
|
66
|
+
host = @options[:host] || 'localhost'
|
67
|
+
endpoint = Async::IO::Endpoint.tcp(host, port, reuse_port: true)
|
68
|
+
else
|
69
|
+
endpoint = Async::HTTP::URLEndpoint.parse("http://localhost:9292", reuse_port: true)
|
70
|
+
end
|
64
71
|
|
65
|
-
logger.info("Starting Falcon HTTP server on #{
|
72
|
+
logger.info("Starting Falcon HTTP server on #{endpoint}.")
|
66
73
|
|
67
74
|
Async::Container::Forked.new(concurrency: @options[:concurrency]) do
|
68
|
-
server = ::Falcon::Server.new(::Falcon::Adapters::Rack.new(app),
|
75
|
+
server = ::Falcon::Server.new(::Falcon::Adapters::Rack.new(app), endpoint)
|
69
76
|
|
70
|
-
Process.setproctitle "Guard::Falcon HTTP Server #{
|
77
|
+
Process.setproctitle "Guard::Falcon HTTP Server: #{endpoint}"
|
71
78
|
|
72
79
|
server.run
|
73
80
|
end
|
data/lib/guard/falcon/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: guard-falcon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-05-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: falcon
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.15.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.15.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: guard
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|