guard-falcon 0.2.0 → 0.3.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/README.md +4 -0
- data/guard-falcon.gemspec +1 -1
- data/lib/guard/falcon/controller.rb +8 -12
- data/lib/guard/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: 8348f2d636de3155e43627d6f5f3d5fea404adf4
|
4
|
+
data.tar.gz: 97f22b9c5fbd8b01ffeb791025af7a85bf399e46
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c0d171bbbc3a77f12e39744c107432c0d08652494081c043c2fa8fff46b773431920343dea2610b205f8d521d68e257feb420a4f85820e92c2c95394d984b72
|
7
|
+
data.tar.gz: 103cb6d1c9abdb98553c59956465544974ac3366749aefac9e5f110f3354c8a7abae038fbcd61c2f0020befb9eb924cf9d53dd82b5fd43237a189cb247846091
|
data/README.md
CHANGED
@@ -2,6 +2,10 @@
|
|
2
2
|
|
3
3
|
Efficiently runs a asynchronous Falcon server, restarting it as required by guard.
|
4
4
|
|
5
|
+
[](http://travis-ci.org/socketry/guard-falcon)
|
6
|
+
[](https://codeclimate.com/github/socketry/guard-falcon)
|
7
|
+
[](https://coveralls.io/r/socketry/guard-falcon)
|
8
|
+
|
5
9
|
## Installation
|
6
10
|
|
7
11
|
Add this line to your application's Gemfile:
|
data/guard-falcon.gemspec
CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |spec|
|
|
7
7
|
spec.authors = ["Samuel Williams"]
|
8
8
|
spec.email = ["samuel.williams@oriontransfer.co.nz"]
|
9
9
|
|
10
|
-
spec.summary = ""
|
10
|
+
spec.summary = "A guard plugin to run an instance of the falcon web server."
|
11
11
|
spec.homepage = "https://github.com/socketry/guard-falcon"
|
12
12
|
|
13
13
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
@@ -29,14 +29,10 @@ require 'falcon/server'
|
|
29
29
|
module Guard
|
30
30
|
module Falcon
|
31
31
|
class Controller < Plugin
|
32
|
-
def self.default_env
|
33
|
-
ENV.fetch('RACK_ENV', 'development')
|
34
|
-
end
|
35
|
-
|
36
32
|
DEFAULT_OPTIONS = {
|
37
|
-
:
|
38
|
-
:
|
39
|
-
:
|
33
|
+
port: 9292,
|
34
|
+
host: 'localhost',
|
35
|
+
config: 'config.ru',
|
40
36
|
}
|
41
37
|
|
42
38
|
def initialize(**options)
|
@@ -59,14 +55,14 @@ module Guard
|
|
59
55
|
logger.error $!.backtrace
|
60
56
|
end
|
61
57
|
|
62
|
-
|
58
|
+
server_address = Async::IO::Address.tcp(@options[:host], @options[:port], reuse_port: true)
|
59
|
+
|
60
|
+
logger.info("Starting Falcon HTTP server on #{server_address}.")
|
63
61
|
|
64
62
|
Async::Container::Forked.new(concurrency: 2) do
|
65
|
-
server = ::Falcon::Server.new(app, [
|
66
|
-
Async::IO::Address.parse(@options[:bind], reuse_port: true)
|
67
|
-
])
|
63
|
+
server = ::Falcon::Server.new(app, [server_address])
|
68
64
|
|
69
|
-
Process.setproctitle "Falcon HTTP #{@options[:bind]}"
|
65
|
+
Process.setproctitle "Guard::Falcon HTTP Server #{@options[:bind]}"
|
70
66
|
|
71
67
|
server.run
|
72
68
|
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.3.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: 2017-06-
|
11
|
+
date: 2017-06-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: falcon
|
@@ -134,5 +134,5 @@ rubyforge_project:
|
|
134
134
|
rubygems_version: 2.6.12
|
135
135
|
signing_key:
|
136
136
|
specification_version: 4
|
137
|
-
summary:
|
137
|
+
summary: A guard plugin to run an instance of the falcon web server.
|
138
138
|
test_files: []
|