guard-rack 2.1.0 → 2.1.1

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: be1ee005670e98318b8fc1f54989a8396d3b05ba
4
- data.tar.gz: 37507ca4a46c703f04d9548b3189f53e92525447
3
+ metadata.gz: 1693fd9ffffc04e573e62d07bb451f41c683f208
4
+ data.tar.gz: ae10b900e9a66affab8ca576d0b812088580c61e
5
5
  SHA512:
6
- metadata.gz: 98780f4397b3f1ccb4ee6644faf3314ce4bac063cea5080a8582612437592f0004ae96bcbd637b1e77533d539c2f549b91812552d76a24727f662672f95e5716
7
- data.tar.gz: 2b154ec06be93fae99db4e0ab3224905237351adbf80303a78b659c251fe343267366af07b45cbd9a7fb92106b4fe8c20a57af208ab287e4155ba4b62817d9dc
6
+ metadata.gz: bf801856afb6a1c92995030f9e8c059fba2dccda7de9d3bacde809691cebc878fb00998c6fa5e0247a5088d0f260517118a14c7592561938235ebc802b86b88a
7
+ data.tar.gz: 75cf912170aa128c42e014711e17d7471db233d04ccd99f024dca57220047e1e6576204872bddc56038d25ee0cb9fa85431b724057f4d28470aabd82e5841ff2
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ 2.1.1 (03/07/2015)
2
+ ============
3
+
4
+ * Fixed an issue with the command syntax that was preventing the spawner from running - [@michaelherold](https://github.com/michaelherold).
5
+
1
6
  2.1.0 (03/06/2015)
2
7
  ============
3
8
 
data/RELEASING.md CHANGED
@@ -12,6 +12,8 @@ bundle install
12
12
  rake
13
13
  ```
14
14
 
15
+ Check that the current master branch can successfully run [grape-on-rack](https://github.com/dblock/grape-on-rack).
16
+
15
17
  Check that the last build succeeded in [Travis CI](https://travis-ci.org/dblock/guard-rack) for all supported platforms.
16
18
 
17
19
  Increment the version, modify [lib/guard/rack/version.rb](lib/guard/rack/version.rb).
@@ -2,16 +2,13 @@ require 'guard/rack'
2
2
 
3
3
  module Guard
4
4
  class Rack < Plugin
5
- class Command < String
5
+ class Command
6
6
  attr_reader :options
7
7
 
8
8
  def initialize(options = {})
9
9
  @options = options
10
- super(build.join(' '))
11
10
  end
12
11
 
13
- private
14
-
15
12
  def build
16
13
  cmd = [options[:cmd]]
17
14
 
@@ -26,6 +23,8 @@ module Guard
26
23
  cmd.flatten.compact
27
24
  end
28
25
 
26
+ private
27
+
29
28
  def configuration
30
29
  [options[:config]]
31
30
  end
@@ -33,17 +32,17 @@ module Guard
33
32
  def daemon
34
33
  return unless options[:daemon]
35
34
 
36
- ['--daemonize', options[:daemon]]
35
+ ['--daemonize']
37
36
  end
38
37
 
39
38
  def debug
40
39
  return unless options[:debugger]
41
40
 
42
- ['--debug', options[:debugger]]
41
+ ['--debug']
43
42
  end
44
43
 
45
44
  def environment
46
- ['--env', options[:environment]]
45
+ ['--env', options[:environment].to_s]
47
46
  end
48
47
 
49
48
  def host
@@ -51,13 +50,13 @@ module Guard
51
50
  end
52
51
 
53
52
  def port
54
- ['--port', options[:port]]
53
+ ['--port', options[:port].to_s]
55
54
  end
56
55
 
57
56
  def server
58
57
  return unless options[:server]
59
58
 
60
- ['--server', options[:server]]
59
+ ['--server', options[:server].to_s]
61
60
  end
62
61
  end
63
62
  end
@@ -61,7 +61,7 @@ module Guard
61
61
  end
62
62
 
63
63
  def run_rack_command!
64
- command = Guard::Rack::Command.new(options)
64
+ command = Guard::Rack::Command.new(options).build
65
65
  UI.debug("Running Rack with command: #{command}")
66
66
  spawn(*command)
67
67
  end
@@ -1,5 +1,5 @@
1
1
  module Guard
2
2
  module RackVersion
3
- VERSION = '2.1.0'
3
+ VERSION = '2.1.1'
4
4
  end
5
5
  end
@@ -8,14 +8,14 @@ describe Guard::Rack::Command do
8
8
  let(:options) { default_options }
9
9
  let(:command) { Guard::Rack::Command.new(options) }
10
10
 
11
- describe '.initialize' do
12
- subject { command }
11
+ describe '#build' do
12
+ subject { command.build }
13
13
 
14
14
  it { is_expected.to start_with('rackup') }
15
15
  it { is_expected.to include('config.ru') }
16
- it { is_expected.to include('--env development') }
17
- it { is_expected.to include('--host 0.0.0.0') }
18
- it { is_expected.to include('--port 3000') }
16
+ it { is_expected.to include('--env').and include('development') }
17
+ it { is_expected.to include('--host').and include('0.0.0.0') }
18
+ it { is_expected.to include('--port').and include('3000') }
19
19
  it { is_expected.not_to include('--daemonize') }
20
20
  it { is_expected.not_to include('--debug') }
21
21
  it { is_expected.not_to include('--server') }
@@ -41,13 +41,13 @@ describe Guard::Rack::Command do
41
41
  context 'with an environment configuration' do
42
42
  let(:options) { default_options.merge(environment: 'custom') }
43
43
 
44
- it { is_expected.to include('--env custom') }
44
+ it { is_expected.to include('--env').and include('custom') }
45
45
  end
46
46
 
47
47
  context 'with a server configuration' do
48
48
  let(:options) { default_options.merge(server: 'thin') }
49
49
 
50
- it { is_expected.to include('--server thin') }
50
+ it { is_expected.to include('--server').and include('thin') }
51
51
  end
52
52
 
53
53
  context 'with a custom config file configuration' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guard-rack
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Doubrovkine
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-06 00:00:00.000000000 Z
11
+ date: 2015-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: guard