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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aa42e7d35d1d4cc10ee6dd9a5f4e9d178cd60015
4
- data.tar.gz: ca8bc2c3c9f863335435246cbfabf2d72346c053
3
+ metadata.gz: 81c0c0cd4e8ab842c0781c27076ea8d84a78e13d
4
+ data.tar.gz: d70318306ba358549a3a93a1a911d5b22555494f
5
5
  SHA512:
6
- metadata.gz: e2e73c32c2e6fe69f813025c5e9d81a1bb1a7576d85e7df99aaf5f4a3fae204c51c4dc492a20cba180dd26ccecbe1ba5390b40bcf880f422f34c595f86f778bc
7
- data.tar.gz: 0a34e77741ce6afb948162f6df96dc1236feb5f12c3b9cde82307fbaca2a0341d4f28078a822154409044e12274b3113cb331cecab0680a5e48c32c9e0338a43
6
+ metadata.gz: eab367b5fa5f6812fbe5bf281903c3e4a512bab5387395558b2f2034544a3c5e1056e85e99fecac89238bea4743103ec323c579f4c5a3678b14dafd5dc232c0b
7
+ data.tar.gz: 0e4f4fa6a6ab8a93fe6116d77da8112050f872757464158ba6b932e718b51deb9f98cc62dc7195ce83bbabde085f005512122552765d8c70d918878e3d108085
@@ -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 = (options.delete(:control_token) || 'pumarules')
12
- @control = "0.0.0.0"
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 }
@@ -1,5 +1,5 @@
1
1
  module Guard
2
2
  module PumaVersion
3
- VERSION = "0.3.5"
3
+ VERSION = "0.3.6"
4
4
  end
5
5
  end
@@ -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("--control-token pumarules")
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.5
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-03-21 00:00:00.000000000 Z
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.8
153
+ rubygems_version: 2.6.11
154
154
  signing_key:
155
155
  specification_version: 4
156
156
  summary: Restart puma when files change