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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 668fdfadd1b65f431446cf35e8047a67cac1b18454671c3969e7e7ea7695f690
4
- data.tar.gz: 040edd8cf535f44dbf41189b23bab6969f000035b572526f2662eaabc08f6812
3
+ metadata.gz: c4e9293f4a99671e2767b002142110ac1001ef021de892c2fd0127dd35ae4685
4
+ data.tar.gz: 687e7411aeccb931a42c4e3859eea5c77d422711eac0c6236e156765bc8862aa
5
5
  SHA512:
6
- metadata.gz: 1c750c400f323bd87574751842fcd5dba6ac6db668efa0ccf05fbb0318d2570520b54521740bcd2e28545718b190a28063640ea776b25cfc78398c7b3ca4bc67
7
- data.tar.gz: 737a5acb59c4fbc1f08bca9a162ddda6c268e229da24fc0929812b1c225c0ec75c02e4822f9d74459f85698e19f2eb06f4ce48c789f231a953891575123a3e63
6
+ metadata.gz: 86a7a1cb7311952b4b2abc0e67c05b0b13a0e95e780194ffbb13cc8e25d8bc0ebf407d01f897d0ca0fc0e9f635f718ff46842abcdbea590f5db00b12609737fe
7
+ data.tar.gz: 2d824568d04e95283335da026a76d386273a5c31d8a29a20b9f9e6f77e4052cde7f5c2bbd9e9f310893f94f6ee147b34f533cd449f30f2c5cfb692858a43448a
@@ -2,8 +2,12 @@ language: ruby
2
2
  sudo: false
3
3
  dist: trusty
4
4
  cache: bundler
5
+
6
+ before_script:
7
+ - gem update --system
8
+ - gem install bundler
9
+
5
10
  rvm:
6
- - 2.2
7
11
  - 2.3
8
12
  - 2.4
9
13
  - 2.5
@@ -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.14.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
- server_address = Async::IO::Endpoint.tcp(@options[:host], @options[:port], reuse_port: true)
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 #{server_address}.")
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), server_address)
75
+ server = ::Falcon::Server.new(::Falcon::Adapters::Rack.new(app), endpoint)
69
76
 
70
- Process.setproctitle "Guard::Falcon HTTP Server #{@options[:bind]}"
77
+ Process.setproctitle "Guard::Falcon HTTP Server: #{endpoint}"
71
78
 
72
79
  server.run
73
80
  end
@@ -20,6 +20,6 @@
20
20
 
21
21
  module Guard
22
22
  module Falcon
23
- VERSION = "0.7.0"
23
+ VERSION = "0.8.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.7.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-04-30 00:00:00.000000000 Z
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.14.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.14.0
26
+ version: 0.15.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: guard
29
29
  requirement: !ruby/object:Gem::Requirement