guard-rack 2.1.0 → 2.1.1
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/CHANGELOG.md +5 -0
- data/RELEASING.md +2 -0
- data/lib/guard/rack/command.rb +8 -9
- data/lib/guard/rack/runner.rb +1 -1
- data/lib/guard/rack/version.rb +1 -1
- data/spec/lib/guard/rack/command_spec.rb +7 -7
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1693fd9ffffc04e573e62d07bb451f41c683f208
|
4
|
+
data.tar.gz: ae10b900e9a66affab8ca576d0b812088580c61e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf801856afb6a1c92995030f9e8c059fba2dccda7de9d3bacde809691cebc878fb00998c6fa5e0247a5088d0f260517118a14c7592561938235ebc802b86b88a
|
7
|
+
data.tar.gz: 75cf912170aa128c42e014711e17d7471db233d04ccd99f024dca57220047e1e6576204872bddc56038d25ee0cb9fa85431b724057f4d28470aabd82e5841ff2
|
data/CHANGELOG.md
CHANGED
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).
|
data/lib/guard/rack/command.rb
CHANGED
@@ -2,16 +2,13 @@ require 'guard/rack'
|
|
2
2
|
|
3
3
|
module Guard
|
4
4
|
class Rack < Plugin
|
5
|
-
class Command
|
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'
|
35
|
+
['--daemonize']
|
37
36
|
end
|
38
37
|
|
39
38
|
def debug
|
40
39
|
return unless options[:debugger]
|
41
40
|
|
42
|
-
['--debug'
|
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
|
data/lib/guard/rack/runner.rb
CHANGED
data/lib/guard/rack/version.rb
CHANGED
@@ -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 '
|
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.
|
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-
|
11
|
+
date: 2015-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: guard
|