bowler 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/bowler/cli.rb +6 -2
- data/lib/bowler/version.rb +1 -1
- data/spec/cli_spec.rb +38 -0
- data/spec/dependency_tree_spec.rb +2 -2
- data/spec/dsl_spec.rb +2 -2
- data/spec/spec_helper.rb +11 -0
- metadata +48 -24
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 7f3029134b99712158fefc7f67192400f1ce3a66
|
4
|
+
data.tar.gz: 0cb0f7b2a4b43674be3eeb773f662f4a4db0bf2b
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: ae91243c358bbd57f95730e4f2dad029ad8ed51927b0221f31a3c40ed391eb26140d78665083452a51009018710acaf7e8a85fcf22493cd65f9b321ad9f2db2a
|
7
|
+
data.tar.gz: 603644789457344e7b59a96ad9ead3aa20c9458a6e777148f2441258710a24a8f875616147dad4895a1723ed795289ff6b61443d49a4ee70660136afb95b4b92
|
data/lib/bowler/cli.rb
CHANGED
@@ -23,7 +23,7 @@ module Bowler
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def self.build_command(launch_string)
|
26
|
-
"
|
26
|
+
"#{self.foreman_exec} start -c #{launch_string}"
|
27
27
|
end
|
28
28
|
|
29
29
|
private
|
@@ -31,5 +31,9 @@ module Bowler
|
|
31
31
|
exec ( self.build_command launch_string )
|
32
32
|
end
|
33
33
|
|
34
|
+
def self.foreman_exec
|
35
|
+
ENV["BOWLER_FOREMAN_EXEC"] || "foreman"
|
36
|
+
end
|
37
|
+
|
34
38
|
end
|
35
|
-
end
|
39
|
+
end
|
data/lib/bowler/version.rb
CHANGED
data/spec/cli_spec.rb
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
require_relative 'spec_helper'
|
2
|
+
require 'bowler/cli'
|
3
|
+
|
4
|
+
module Bowler
|
5
|
+
|
6
|
+
describe CLI do
|
7
|
+
|
8
|
+
context "build_command" do
|
9
|
+
it "should build a command from the launch string and the executable" do
|
10
|
+
CLI.expects(:foreman_exec).returns("fort")
|
11
|
+
CLI.build_command("foo").should == "fort start -c foo"
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
context "foreman_exec" do
|
16
|
+
before(:each) do
|
17
|
+
@existing_env_var = ENV["BOWLER_FOREMAN_EXEC"]
|
18
|
+
ENV["BOWLER_FOREMAN_EXEC"] = nil
|
19
|
+
end
|
20
|
+
|
21
|
+
after(:each) do
|
22
|
+
ENV["BOWLER_FOREMAN_EXEC"] = @existing_env_var
|
23
|
+
end
|
24
|
+
|
25
|
+
it "should return the BOWLER_FOREMAN_EXEC env variable when set" do
|
26
|
+
ENV["BOWLER_FOREMAN_EXEC"] = "a_process"
|
27
|
+
CLI.foreman_exec.should == "a_process"
|
28
|
+
end
|
29
|
+
|
30
|
+
it "should return 'foreman' when the env variable is empty" do
|
31
|
+
ENV["BOWLER_FOREMAN_EXEC"] = nil
|
32
|
+
CLI.foreman_exec.should == "foreman"
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
37
|
+
|
38
|
+
end
|
data/spec/dsl_spec.rb
CHANGED
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
gem_path = File.dirname(__FILE__) + "/../lib"
|
2
|
+
$:.unshift(gem_path) unless $:.include?(gem_path)
|
3
|
+
|
4
|
+
require 'rspec/core'
|
5
|
+
require 'bowler'
|
6
|
+
|
7
|
+
require_relative 'helpers/definition_helper'
|
8
|
+
|
9
|
+
RSpec.configure do |config|
|
10
|
+
config.mock_framework = :mocha
|
11
|
+
end
|
metadata
CHANGED
@@ -1,36 +1,32 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bowler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
5
|
-
prerelease:
|
4
|
+
version: 1.1.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Jordan Hatch
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2014-08-05 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: foreman
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: 0.35.0
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - '>='
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: 0.35.0
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: rake
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
31
|
- - ~>
|
36
32
|
- !ruby/object:Gem::Version
|
@@ -38,27 +34,52 @@ dependencies:
|
|
38
34
|
type: :development
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
38
|
- - ~>
|
44
39
|
- !ruby/object:Gem::Version
|
45
40
|
version: 0.9.2.2
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
|
-
name: rspec
|
42
|
+
name: rspec-core
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
45
|
- - ~>
|
52
46
|
- !ruby/object:Gem::Version
|
53
|
-
version: 2.
|
47
|
+
version: 2.14.7
|
54
48
|
type: :development
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
52
|
- - ~>
|
60
53
|
- !ruby/object:Gem::Version
|
61
|
-
version: 2.
|
54
|
+
version: 2.14.7
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec-expectations
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 2.14.4
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ~>
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 2.14.4
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: mocha
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ~>
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 0.14.0
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ~>
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 0.14.0
|
62
83
|
description:
|
63
84
|
email:
|
64
85
|
- jordan@jordanh.net
|
@@ -67,48 +88,51 @@ executables:
|
|
67
88
|
extensions: []
|
68
89
|
extra_rdoc_files: []
|
69
90
|
files:
|
91
|
+
- README.md
|
92
|
+
- Rakefile
|
93
|
+
- bin/bowl
|
94
|
+
- lib/bowler.rb
|
70
95
|
- lib/bowler/cli.rb
|
71
96
|
- lib/bowler/dependency_tree.rb
|
72
97
|
- lib/bowler/dsl.rb
|
73
98
|
- lib/bowler/version.rb
|
74
|
-
-
|
75
|
-
- README.md
|
76
|
-
- Rakefile
|
99
|
+
- spec/cli_spec.rb
|
77
100
|
- spec/dependency_tree_spec.rb
|
78
101
|
- spec/dsl_spec.rb
|
79
102
|
- spec/fixtures/dependency_tree_pinfile
|
80
103
|
- spec/fixtures/dsl_invalid_pinfile
|
81
104
|
- spec/fixtures/dsl_valid_pinfile
|
82
105
|
- spec/helpers/definition_helper.rb
|
83
|
-
-
|
106
|
+
- spec/spec_helper.rb
|
84
107
|
homepage:
|
85
108
|
licenses: []
|
109
|
+
metadata: {}
|
86
110
|
post_install_message:
|
87
111
|
rdoc_options: []
|
88
112
|
require_paths:
|
89
113
|
- lib
|
90
114
|
required_ruby_version: !ruby/object:Gem::Requirement
|
91
|
-
none: false
|
92
115
|
requirements:
|
93
|
-
- -
|
116
|
+
- - '>='
|
94
117
|
- !ruby/object:Gem::Version
|
95
118
|
version: '0'
|
96
119
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
120
|
requirements:
|
99
|
-
- -
|
121
|
+
- - '>='
|
100
122
|
- !ruby/object:Gem::Version
|
101
123
|
version: '0'
|
102
124
|
requirements: []
|
103
125
|
rubyforge_project:
|
104
|
-
rubygems_version:
|
126
|
+
rubygems_version: 2.2.2
|
105
127
|
signing_key:
|
106
|
-
specification_version:
|
128
|
+
specification_version: 4
|
107
129
|
summary: A wrapper for large Foreman-managed apps with dependent processes
|
108
130
|
test_files:
|
131
|
+
- spec/cli_spec.rb
|
109
132
|
- spec/dependency_tree_spec.rb
|
110
133
|
- spec/dsl_spec.rb
|
111
134
|
- spec/fixtures/dependency_tree_pinfile
|
112
135
|
- spec/fixtures/dsl_invalid_pinfile
|
113
136
|
- spec/fixtures/dsl_valid_pinfile
|
114
137
|
- spec/helpers/definition_helper.rb
|
138
|
+
- spec/spec_helper.rb
|