bowler 2.0.1 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bowler/cli.rb +10 -2
- data/lib/bowler/version.rb +1 -1
- data/spec/cli_spec.rb +10 -0
- 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: 566e2bb1de8cbdd34630ca2465221b1664d9caed
|
4
|
+
data.tar.gz: 6acf04cc64da0a0d83b7979e53f11d7aeb6cab9f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8304442c9b4350de78193206927cc16ad875c4549e69b823bd0a0903971a1a1f7f6dd52179449d8fe1bbe068ea1d00bb05190974b1b60ce34bba5f35380ed7a
|
7
|
+
data.tar.gz: e9b42f9e155ee2b5807d3f2829b74553c0078eb04e0f937a45df8a9a02602df60d3858be2fb861093dd68c8ba7dcc9c03a7dcd8b98ac2d0ad472b0d15e212ec4
|
data/lib/bowler/cli.rb
CHANGED
@@ -15,6 +15,10 @@ module Bowler
|
|
15
15
|
options[:without] << process.to_sym
|
16
16
|
end
|
17
17
|
|
18
|
+
opts.on_tail('-o', '--output-only', 'Output the apps to be started') do
|
19
|
+
options[:output_only] = true
|
20
|
+
end
|
21
|
+
|
18
22
|
opts.on_tail("-h", "--help", "Show this message") do
|
19
23
|
puts opts
|
20
24
|
exit
|
@@ -30,9 +34,13 @@ module Bowler
|
|
30
34
|
|
31
35
|
tree = Bowler::DependencyTree.load
|
32
36
|
to_launch = tree.dependencies_for(processes) - options[:without]
|
33
|
-
logger.info "Starting #{to_launch.join(', ')}..."
|
34
37
|
|
35
|
-
|
38
|
+
if options[:output_only]
|
39
|
+
puts to_launch.join("\n")
|
40
|
+
else
|
41
|
+
logger.info "Starting #{to_launch.join(', ')}..."
|
42
|
+
start_foreman_with( launch_string(to_launch) )
|
43
|
+
end
|
36
44
|
rescue PinfileNotFound
|
37
45
|
logger.error "Bowler could not find a Pinfile in the current directory."
|
38
46
|
rescue PinfileError => e
|
data/lib/bowler/version.rb
CHANGED
data/spec/cli_spec.rb
CHANGED
@@ -61,6 +61,16 @@ module Bowler
|
|
61
61
|
end
|
62
62
|
end
|
63
63
|
|
64
|
+
context 'with --output-only flag' do
|
65
|
+
it 'outputs the apps to be run' do
|
66
|
+
stub_dependency_tree(:myapp, :myapp2)
|
67
|
+
|
68
|
+
STDOUT.expects(:puts).with("myapp\nmyapp2")
|
69
|
+
|
70
|
+
CLI.start(['myapp', 'myapp2', '--output-only'])
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
64
74
|
it 'starts foreman with the provided processes' do
|
65
75
|
stub_dependency_tree(:a, :b)
|
66
76
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bowler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jordan Hatch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-07-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: foreman
|
@@ -124,7 +124,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
124
124
|
version: '0'
|
125
125
|
requirements: []
|
126
126
|
rubyforge_project:
|
127
|
-
rubygems_version: 2.
|
127
|
+
rubygems_version: 2.5.1
|
128
128
|
signing_key:
|
129
129
|
specification_version: 4
|
130
130
|
summary: A wrapper for large Foreman-managed apps with dependent processes
|