guard-puma 0.3.5 → 0.3.6
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/lib/guard/puma/runner.rb +3 -2
- data/lib/guard/puma/version.rb +1 -1
- data/spec/lib/guard/puma/runner_spec.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: 81c0c0cd4e8ab842c0781c27076ea8d84a78e13d
|
4
|
+
data.tar.gz: d70318306ba358549a3a93a1a911d5b22555494f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eab367b5fa5f6812fbe5bf281903c3e4a512bab5387395558b2f2034544a3c5e1056e85e99fecac89238bea4743103ec323c579f4c5a3678b14dafd5dc232c0b
|
7
|
+
data.tar.gz: 0e4f4fa6a6ab8a93fe6116d77da8112050f872757464158ba6b932e718b51deb9f98cc62dc7195ce83bbabde085f005512122552765d8c70d918878e3d108085
|
data/lib/guard/puma/runner.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'net/http'
|
2
|
+
require 'puma/configuration'
|
2
3
|
|
3
4
|
module Guard
|
4
5
|
class PumaRunner
|
@@ -8,8 +9,8 @@ module Guard
|
|
8
9
|
attr_reader :options, :control_url, :control_token, :cmd_opts
|
9
10
|
|
10
11
|
def initialize(options)
|
11
|
-
@control_token =
|
12
|
-
@control = "
|
12
|
+
@control_token = options.delete(:control_token) { |_| ::Puma::Configuration.random_token }
|
13
|
+
@control = "localhost"
|
13
14
|
@control_port = (options.delete(:control_port) || '9293')
|
14
15
|
@control_url = "#{@control}:#{@control_port}"
|
15
16
|
@quiet = options.delete(:quiet) { true }
|
data/lib/guard/puma/version.rb
CHANGED
@@ -54,7 +54,7 @@ describe Guard::PumaRunner do
|
|
54
54
|
let(:options) {{ :config => path, :port => "4000", quiet: false, :environment => environment }}
|
55
55
|
it "assumes options are set in config" do
|
56
56
|
expect(runner.cmd_opts).to match("--config #{path}")
|
57
|
-
expect(runner.cmd_opts).to match(
|
57
|
+
expect(runner.cmd_opts).to match(/--control-token [0-9a-f]{10,}/)
|
58
58
|
expect(runner.cmd_opts).to match("--control tcp")
|
59
59
|
expect(runner.cmd_opts).to match("--environment #{environment}")
|
60
60
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: guard-puma
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jesse Cooke
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-04-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: guard
|
@@ -150,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
150
150
|
version: '0'
|
151
151
|
requirements: []
|
152
152
|
rubyforge_project:
|
153
|
-
rubygems_version: 2.6.
|
153
|
+
rubygems_version: 2.6.11
|
154
154
|
signing_key:
|
155
155
|
specification_version: 4
|
156
156
|
summary: Restart puma when files change
|