foreman 0.31.0 → 0.50.0
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.
- data/README.md +46 -0
- data/bin/foreman-runner +32 -0
- data/bin/taskman +8 -0
- data/data/example/Procfile +4 -2
- data/data/example/spawnee +14 -0
- data/data/example/spawner +7 -0
- data/data/example/utf8 +11 -0
- data/data/export/bluepill/master.pill.erb +11 -10
- data/data/export/launchd/launchd.plist.erb +22 -0
- data/data/export/runit/log/run.erb +7 -0
- data/data/export/runit/run.erb +2 -2
- data/data/export/supervisord/app.conf.erb +27 -0
- data/data/export/upstart/master.conf.erb +2 -2
- data/data/export/upstart/process.conf.erb +3 -3
- data/lib/foreman/cli.rb +83 -34
- data/lib/foreman/engine/cli.rb +105 -0
- data/lib/foreman/engine.rb +232 -140
- data/lib/foreman/env.rb +27 -0
- data/lib/foreman/export/base.rb +108 -6
- data/lib/foreman/export/bluepill.rb +4 -20
- data/lib/foreman/export/inittab.rb +11 -16
- data/lib/foreman/export/launchd.rb +15 -0
- data/lib/foreman/export/runit.rb +15 -41
- data/lib/foreman/export/supervisord.rb +16 -0
- data/lib/foreman/export/upstart.rb +10 -28
- data/lib/foreman/export.rb +23 -0
- data/lib/foreman/helpers.rb +45 -0
- data/lib/foreman/process.rb +80 -46
- data/lib/foreman/procfile.rb +68 -14
- data/lib/foreman/version.rb +1 -1
- data/lib/foreman.rb +12 -7
- data/man/foreman.1 +29 -3
- data/spec/foreman/cli_spec.rb +54 -60
- data/spec/foreman/engine_spec.rb +64 -46
- data/spec/foreman/export/base_spec.rb +19 -0
- data/spec/foreman/export/bluepill_spec.rb +24 -6
- data/spec/foreman/export/inittab_spec.rb +40 -0
- data/spec/foreman/export/launchd_spec.rb +21 -0
- data/spec/foreman/export/runit_spec.rb +23 -22
- data/spec/foreman/export/supervisord_spec.rb +36 -0
- data/spec/foreman/export/upstart_spec.rb +49 -16
- data/spec/foreman/export_spec.rb +22 -0
- data/spec/foreman/helpers_spec.rb +26 -0
- data/spec/foreman/process_spec.rb +48 -2
- data/spec/foreman/procfile_spec.rb +41 -0
- data/spec/foreman_spec.rb +3 -20
- data/spec/helper_spec.rb +18 -0
- data/spec/resources/Procfile +4 -0
- data/spec/resources/bin/echo +2 -0
- data/spec/resources/bin/env +2 -0
- data/spec/resources/bin/test +2 -0
- data/spec/resources/bin/utf8 +2 -0
- data/spec/resources/export/bluepill/app-concurrency.pill +49 -0
- data/spec/resources/export/bluepill/app.pill +6 -25
- data/spec/resources/export/inittab/inittab.concurrency +4 -0
- data/spec/resources/export/inittab/inittab.default +4 -0
- data/spec/resources/export/launchd/launchd-a.default +22 -0
- data/spec/resources/export/launchd/launchd-b.default +22 -0
- data/spec/resources/export/supervisord/app-alpha-1.conf +24 -0
- data/spec/resources/export/supervisord/app-alpha-2.conf +24 -0
- data/spec/spec_helper.rb +93 -10
- metadata +72 -76
- data/README.markdown +0 -49
- data/bin/runner +0 -2
- data/data/export/runit/log_run.erb +0 -7
- data/lib/foreman/procfile_entry.rb +0 -22
- data/lib/foreman/utils.rb +0 -15
- /data/spec/resources/export/runit/{app-alpha-1-log-run → app-alpha-1/log/run} +0 -0
- /data/spec/resources/export/runit/{app-alpha-1-run → app-alpha-1/run} +0 -0
- /data/spec/resources/export/runit/{app-alpha-2-log-run → app-alpha-2/log/run} +0 -0
- /data/spec/resources/export/runit/{app-alpha-2-run → app-alpha-2/run} +0 -0
- /data/spec/resources/export/runit/{app-bravo-1-log-run → app-bravo-1/log/run} +0 -0
- /data/spec/resources/export/runit/{app-bravo-1-run → app-bravo-1/run} +0 -0
metadata
CHANGED
|
@@ -1,147 +1,143 @@
|
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: foreman
|
|
3
|
-
version: !ruby/object:Gem::Version
|
|
4
|
-
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.50.0
|
|
5
5
|
prerelease:
|
|
6
|
-
segments:
|
|
7
|
-
- 0
|
|
8
|
-
- 31
|
|
9
|
-
- 0
|
|
10
|
-
version: 0.31.0
|
|
11
6
|
platform: ruby
|
|
12
|
-
authors:
|
|
7
|
+
authors:
|
|
13
8
|
- David Dollar
|
|
14
9
|
autorequire:
|
|
15
10
|
bindir: bin
|
|
16
11
|
cert_chain: []
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
|
23
|
-
none: false
|
|
24
|
-
requirements:
|
|
25
|
-
- - ~>
|
|
26
|
-
- !ruby/object:Gem::Version
|
|
27
|
-
hash: 29
|
|
28
|
-
segments:
|
|
29
|
-
- 1
|
|
30
|
-
- 0
|
|
31
|
-
- 5
|
|
32
|
-
version: 1.0.5
|
|
33
|
-
version_requirements: *id001
|
|
34
|
-
prerelease: false
|
|
35
|
-
name: term-ansicolor
|
|
36
|
-
- !ruby/object:Gem::Dependency
|
|
37
|
-
type: :runtime
|
|
38
|
-
requirement: &id002 !ruby/object:Gem::Requirement
|
|
12
|
+
date: 2012-07-11 00:00:00.000000000 Z
|
|
13
|
+
dependencies:
|
|
14
|
+
- !ruby/object:Gem::Dependency
|
|
15
|
+
name: thor
|
|
16
|
+
requirement: &70273928866960 !ruby/object:Gem::Requirement
|
|
39
17
|
none: false
|
|
40
|
-
requirements:
|
|
41
|
-
- -
|
|
42
|
-
- !ruby/object:Gem::Version
|
|
43
|
-
hash: 39
|
|
44
|
-
segments:
|
|
45
|
-
- 0
|
|
46
|
-
- 13
|
|
47
|
-
- 6
|
|
18
|
+
requirements:
|
|
19
|
+
- - ! '>='
|
|
20
|
+
- !ruby/object:Gem::Version
|
|
48
21
|
version: 0.13.6
|
|
49
|
-
|
|
22
|
+
type: :runtime
|
|
50
23
|
prerelease: false
|
|
51
|
-
|
|
24
|
+
version_requirements: *70273928866960
|
|
52
25
|
description: Process manager for applications with multiple components
|
|
53
26
|
email: ddollar@gmail.com
|
|
54
|
-
executables:
|
|
27
|
+
executables:
|
|
55
28
|
- foreman
|
|
56
29
|
extensions: []
|
|
57
|
-
|
|
58
30
|
extra_rdoc_files: []
|
|
59
|
-
|
|
60
|
-
files:
|
|
31
|
+
files:
|
|
61
32
|
- bin/foreman
|
|
62
|
-
- bin/runner
|
|
33
|
+
- bin/foreman-runner
|
|
34
|
+
- bin/taskman
|
|
63
35
|
- data/example/error
|
|
64
36
|
- data/example/log/neverdie.log
|
|
65
37
|
- data/example/Procfile
|
|
66
38
|
- data/example/Procfile.without_colon
|
|
39
|
+
- data/example/spawnee
|
|
40
|
+
- data/example/spawner
|
|
67
41
|
- data/example/ticker
|
|
42
|
+
- data/example/utf8
|
|
68
43
|
- data/export/bluepill/master.pill.erb
|
|
69
|
-
- data/export/
|
|
44
|
+
- data/export/launchd/launchd.plist.erb
|
|
45
|
+
- data/export/runit/log/run.erb
|
|
70
46
|
- data/export/runit/run.erb
|
|
47
|
+
- data/export/supervisord/app.conf.erb
|
|
71
48
|
- data/export/upstart/master.conf.erb
|
|
72
49
|
- data/export/upstart/process.conf.erb
|
|
73
50
|
- data/export/upstart/process_master.conf.erb
|
|
74
51
|
- lib/foreman/cli.rb
|
|
75
52
|
- lib/foreman/distribution.rb
|
|
53
|
+
- lib/foreman/engine/cli.rb
|
|
76
54
|
- lib/foreman/engine.rb
|
|
55
|
+
- lib/foreman/env.rb
|
|
77
56
|
- lib/foreman/export/base.rb
|
|
78
57
|
- lib/foreman/export/bluepill.rb
|
|
79
58
|
- lib/foreman/export/inittab.rb
|
|
59
|
+
- lib/foreman/export/launchd.rb
|
|
80
60
|
- lib/foreman/export/runit.rb
|
|
61
|
+
- lib/foreman/export/supervisord.rb
|
|
81
62
|
- lib/foreman/export/upstart.rb
|
|
82
63
|
- lib/foreman/export.rb
|
|
64
|
+
- lib/foreman/helpers.rb
|
|
83
65
|
- lib/foreman/process.rb
|
|
84
66
|
- lib/foreman/procfile.rb
|
|
85
|
-
- lib/foreman/procfile_entry.rb
|
|
86
|
-
- lib/foreman/utils.rb
|
|
87
67
|
- lib/foreman/version.rb
|
|
88
68
|
- lib/foreman.rb
|
|
89
|
-
- README.
|
|
69
|
+
- README.md
|
|
90
70
|
- spec/foreman/cli_spec.rb
|
|
91
71
|
- spec/foreman/engine_spec.rb
|
|
72
|
+
- spec/foreman/export/base_spec.rb
|
|
92
73
|
- spec/foreman/export/bluepill_spec.rb
|
|
74
|
+
- spec/foreman/export/inittab_spec.rb
|
|
75
|
+
- spec/foreman/export/launchd_spec.rb
|
|
93
76
|
- spec/foreman/export/runit_spec.rb
|
|
77
|
+
- spec/foreman/export/supervisord_spec.rb
|
|
94
78
|
- spec/foreman/export/upstart_spec.rb
|
|
95
79
|
- spec/foreman/export_spec.rb
|
|
80
|
+
- spec/foreman/helpers_spec.rb
|
|
96
81
|
- spec/foreman/process_spec.rb
|
|
82
|
+
- spec/foreman/procfile_spec.rb
|
|
97
83
|
- spec/foreman_spec.rb
|
|
84
|
+
- spec/helper_spec.rb
|
|
85
|
+
- spec/resources/bin/echo
|
|
86
|
+
- spec/resources/bin/env
|
|
87
|
+
- spec/resources/bin/test
|
|
88
|
+
- spec/resources/bin/utf8
|
|
89
|
+
- spec/resources/export/bluepill/app-concurrency.pill
|
|
98
90
|
- spec/resources/export/bluepill/app.pill
|
|
99
|
-
- spec/resources/export/
|
|
100
|
-
- spec/resources/export/
|
|
101
|
-
- spec/resources/export/
|
|
102
|
-
- spec/resources/export/
|
|
103
|
-
- spec/resources/export/runit/app-
|
|
104
|
-
- spec/resources/export/runit/app-
|
|
91
|
+
- spec/resources/export/inittab/inittab.concurrency
|
|
92
|
+
- spec/resources/export/inittab/inittab.default
|
|
93
|
+
- spec/resources/export/launchd/launchd-a.default
|
|
94
|
+
- spec/resources/export/launchd/launchd-b.default
|
|
95
|
+
- spec/resources/export/runit/app-alpha-1/log/run
|
|
96
|
+
- spec/resources/export/runit/app-alpha-1/run
|
|
97
|
+
- spec/resources/export/runit/app-alpha-2/log/run
|
|
98
|
+
- spec/resources/export/runit/app-alpha-2/run
|
|
99
|
+
- spec/resources/export/runit/app-bravo-1/log/run
|
|
100
|
+
- spec/resources/export/runit/app-bravo-1/run
|
|
101
|
+
- spec/resources/export/supervisord/app-alpha-1.conf
|
|
102
|
+
- spec/resources/export/supervisord/app-alpha-2.conf
|
|
105
103
|
- spec/resources/export/upstart/app-alpha-1.conf
|
|
106
104
|
- spec/resources/export/upstart/app-alpha-2.conf
|
|
107
105
|
- spec/resources/export/upstart/app-alpha.conf
|
|
108
106
|
- spec/resources/export/upstart/app-bravo-1.conf
|
|
109
107
|
- spec/resources/export/upstart/app-bravo.conf
|
|
110
108
|
- spec/resources/export/upstart/app.conf
|
|
109
|
+
- spec/resources/Procfile
|
|
111
110
|
- spec/spec_helper.rb
|
|
112
111
|
- man/foreman.1
|
|
113
112
|
homepage: http://github.com/ddollar/foreman
|
|
114
113
|
licenses: []
|
|
115
|
-
|
|
116
114
|
post_install_message:
|
|
117
115
|
rdoc_options: []
|
|
118
|
-
|
|
119
|
-
require_paths:
|
|
116
|
+
require_paths:
|
|
120
117
|
- lib
|
|
121
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
|
118
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
122
119
|
none: false
|
|
123
|
-
requirements:
|
|
124
|
-
- -
|
|
125
|
-
- !ruby/object:Gem::Version
|
|
126
|
-
|
|
127
|
-
segments:
|
|
120
|
+
requirements:
|
|
121
|
+
- - ! '>='
|
|
122
|
+
- !ruby/object:Gem::Version
|
|
123
|
+
version: '0'
|
|
124
|
+
segments:
|
|
128
125
|
- 0
|
|
129
|
-
|
|
130
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
126
|
+
hash: 2988122177042669007
|
|
127
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
131
128
|
none: false
|
|
132
|
-
requirements:
|
|
133
|
-
- -
|
|
134
|
-
- !ruby/object:Gem::Version
|
|
135
|
-
|
|
136
|
-
segments:
|
|
129
|
+
requirements:
|
|
130
|
+
- - ! '>='
|
|
131
|
+
- !ruby/object:Gem::Version
|
|
132
|
+
version: '0'
|
|
133
|
+
segments:
|
|
137
134
|
- 0
|
|
138
|
-
|
|
135
|
+
hash: 2988122177042669007
|
|
139
136
|
requirements: []
|
|
140
|
-
|
|
141
137
|
rubyforge_project:
|
|
142
|
-
rubygems_version: 1.8.
|
|
138
|
+
rubygems_version: 1.8.11
|
|
143
139
|
signing_key:
|
|
144
140
|
specification_version: 3
|
|
145
141
|
summary: Process manager for applications with multiple components
|
|
146
142
|
test_files: []
|
|
147
|
-
|
|
143
|
+
has_rdoc:
|
data/README.markdown
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
# Foreman
|
|
2
|
-
|
|
3
|
-
## Installation
|
|
4
|
-
|
|
5
|
-
* Rubygems
|
|
6
|
-
|
|
7
|
-
gem install foreman
|
|
8
|
-
|
|
9
|
-
* OSX
|
|
10
|
-
|
|
11
|
-
http://assets.foreman.io/foreman/foreman.pkg
|
|
12
|
-
|
|
13
|
-
* Standalone Tarball
|
|
14
|
-
|
|
15
|
-
http://assets.foreman.io/foreman/foreman.tgz
|
|
16
|
-
|
|
17
|
-
## Description
|
|
18
|
-
|
|
19
|
-
http://blog.daviddollar.org/2011/05/06/introducing-foreman.html
|
|
20
|
-
|
|
21
|
-
## Manual
|
|
22
|
-
|
|
23
|
-
See the [man page](http://ddollar.github.com/foreman) for usage.
|
|
24
|
-
|
|
25
|
-
## Authorship
|
|
26
|
-
|
|
27
|
-
Created by David Dollar
|
|
28
|
-
|
|
29
|
-
Patches contributed by:
|
|
30
|
-
|
|
31
|
-
* Adam Wiggins
|
|
32
|
-
* Dan Peterson
|
|
33
|
-
* Hunter Nield
|
|
34
|
-
* Jay Zeschin
|
|
35
|
-
* Keith Rarick
|
|
36
|
-
* Khaja Minhajuddin
|
|
37
|
-
* Matt Haynes
|
|
38
|
-
* Michael van Rooijen
|
|
39
|
-
* Mike Javorski
|
|
40
|
-
* Nathan L Smith
|
|
41
|
-
* Nick Zadrozny
|
|
42
|
-
* Ricardo Chimal, Jr
|
|
43
|
-
* Thom May
|
|
44
|
-
* clifff
|
|
45
|
-
* Greg Reinacker
|
|
46
|
-
|
|
47
|
-
## License
|
|
48
|
-
|
|
49
|
-
MIT
|
data/bin/runner
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
require "foreman"
|
|
2
|
-
|
|
3
|
-
class Foreman::ProcfileEntry
|
|
4
|
-
|
|
5
|
-
attr_reader :name
|
|
6
|
-
attr_reader :command
|
|
7
|
-
attr_accessor :color
|
|
8
|
-
|
|
9
|
-
def initialize(name, command)
|
|
10
|
-
@name = name
|
|
11
|
-
@command = command
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
def spawn(num, pipe, basedir, environment, base_port)
|
|
15
|
-
(1..num).to_a.map do |n|
|
|
16
|
-
process = Foreman::Process.new(self, n, base_port + (n-1))
|
|
17
|
-
process.run(pipe, basedir, environment)
|
|
18
|
-
process
|
|
19
|
-
end
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
end
|
data/lib/foreman/utils.rb
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
require "foreman"
|
|
2
|
-
|
|
3
|
-
class Foreman::Utils
|
|
4
|
-
|
|
5
|
-
def self.parse_concurrency(concurrency)
|
|
6
|
-
begin
|
|
7
|
-
pairs = concurrency.to_s.gsub(/\s/, "").split(",")
|
|
8
|
-
pairs.inject(Hash.new(1)) do |hash, pair|
|
|
9
|
-
process, amount = pair.split("=")
|
|
10
|
-
hash.update(process => amount.to_i)
|
|
11
|
-
end
|
|
12
|
-
end
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
end
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|