guard-falcon 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ca8f7786cc49b12b390f9dc881dd08bb17c11a52
4
- data.tar.gz: bc9e3180f55c5ccd22f7ebf1324983c1832cbd51
3
+ metadata.gz: 8348f2d636de3155e43627d6f5f3d5fea404adf4
4
+ data.tar.gz: 97f22b9c5fbd8b01ffeb791025af7a85bf399e46
5
5
  SHA512:
6
- metadata.gz: 68b790dc399be8fa42a53543b196f786c14a75b100a86fbd4599bec61cda6931f05dbf7e874d7d5ca440d8e3c70d9492f4120b16a2918180db6b91f555e08e35
7
- data.tar.gz: b3f5b549ebc6bd313a6c0795cee8398e8d1427f75cb20de9b59126fb0a8d8991bc95bfbd410ee3a6d48e103eba8971883922170b775a2b8f516cec9caffe1359
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
+ [![Build Status](https://secure.travis-ci.org/socketry/guard-falcon.svg)](http://travis-ci.org/socketry/guard-falcon)
6
+ [![Code Climate](https://codeclimate.com/github/socketry/guard-falcon.svg)](https://codeclimate.com/github/socketry/guard-falcon)
7
+ [![Coverage Status](https://coveralls.io/repos/socketry/guard-falcon/badge.svg)](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
- :bind => "tcp://localhost:9000",
38
- :environment => default_env,
39
- :config => 'config.ru',
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
- logger.info("Starting Falcon HTTP server on #{@options[:bind]}.")
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
@@ -20,6 +20,6 @@
20
20
 
21
21
  module Guard
22
22
  module Falcon
23
- VERSION = "0.2.0"
23
+ VERSION = "0.3.0"
24
24
  end
25
25
  end
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.2.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-15 00:00:00.000000000 Z
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: []