foreman 0.37.0-java → 0.37.1-java

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 CHANGED
@@ -25,6 +25,7 @@ Manage Procfile-based applications
25
25
 
26
26
  * [man page](http://ddollar.github.com/foreman)
27
27
  * [wiki](http://github.com/ddollar/foreman/wiki)
28
+ * [changelog](https://github.com/ddollar/foreman/blob/master/Changelog.md)
28
29
 
29
30
  ## Authors
30
31
 
@@ -32,7 +33,7 @@ Manage Procfile-based applications
32
33
  David Dollar
33
34
 
34
35
  #### Patches contributed by
35
- Adam Wiggins, Chris Continanza, Chris Lowder, Craig R Webster, Dan Farina, Dan Peterson, David Dollar, Fletcher Nichol, Gabriel Burt, Gamaliel Toro, Greg Reinacker, Hugues Le Gendre, Hunter Nield, Iain Hecker, Jay Zeschin, Keith Rarick, Khaja Minhajuddin, Lincoln Stoll, Marcos Muino Garcia, Mark McGranaghan, Matt Griffin, Matt Haynes, Matthijs Langenberg, Michael Dwan, Michael van Rooijen, Mike Javorski, Nathan Broadbent, Nathan L Smith, Nick Zadrozny, Phil Hagelberg, Ricardo Chimal, Jr, Thom May, Tom Ward, brainopia, clifff, jc00ke
36
+ Adam Wiggins, Chris Continanza, Chris Lowder, Craig R Webster, Dan Farina, Dan Peterson, David Dollar, Fletcher Nichol, Florian Apolloner, Gabriel Burt, Gamaliel Toro, Greg Reinacker, Hugues Le Gendre, Hunter Nield, Iain Hecker, Jay Zeschin, Keith Rarick, Khaja Minhajuddin, Lincoln Stoll, Marcos Muino Garcia, Mark McGranaghan, Matt Griffin, Matt Haynes, Matthijs Langenberg, Michael Dwan, Michael van Rooijen, Mike Javorski, Nathan Broadbent, Nathan L Smith, Nick Zadrozny, Phil Hagelberg, Ricardo Chimal, Jr, Thom May, Tom Ward, brainopia, clifff, jc00ke
36
37
 
37
38
  ## License
38
39
 
@@ -1,2 +1,3 @@
1
1
  ticker: ruby ./ticker $PORT
2
2
  error: ruby ./error
3
+ utf8: ruby ./utf8
data/data/example/utf8 ADDED
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env ruby
2
+ # encoding: BINARY
3
+
4
+ $stdout.sync = true
5
+
6
+ while true
7
+ puts "\u65e5\u672c\u8a9e\u6587\u5b57\u5217"
8
+ puts "\u0915\u0932\u094d\u0907\u0928\u0643\u0637\u0628\u041a\u0430\u043b\u0438\u043d\u0430"
9
+ puts "\xff\x03"
10
+ sleep 1
11
+ end
@@ -58,7 +58,7 @@ private ######################################################################
58
58
  concurrency = Foreman::Utils.parse_concurrency(@options[:concurrency])
59
59
 
60
60
  procfile.entries.each do |entry|
61
- reader, writer = IO.pipe
61
+ reader, writer = (IO.method(:pipe).arity == 0 ? IO.pipe : IO.pipe("BINARY"))
62
62
  entry.spawn(concurrency[entry.name], writer, @directory, @environment, port_for(entry, 1, base_port)).each do |process|
63
63
  running_processes[process.pid] = process
64
64
  readers[process] = reader
@@ -94,19 +94,23 @@ private ######################################################################
94
94
  kill_all "SIGKILL"
95
95
  end
96
96
 
97
+ def poll_readers
98
+ rs, ws = IO.select(readers.values, [], [], 1)
99
+ (rs || []).each do |r|
100
+ data = r.gets
101
+ next unless data
102
+ ps, message = data.split(",", 2)
103
+ color = colors[ps.split(".").first]
104
+ info message, ps, color
105
+ end
106
+ end
107
+
97
108
  def watch_for_output
98
109
  Thread.new do
99
110
  require "win32console" if Foreman.windows?
100
111
  begin
101
112
  loop do
102
- rs, ws = IO.select(readers.values, [], [], 1)
103
- (rs || []).each do |r|
104
- data = r.gets
105
- next unless data
106
- ps, message = data.split(",", 2)
107
- color = colors[ps.split(".").first]
108
- info message, ps, color
109
- end
113
+ poll_readers
110
114
  end
111
115
  rescue Exception => ex
112
116
  puts ex.message
@@ -1,5 +1,5 @@
1
1
  module Foreman
2
2
 
3
- VERSION = "0.37.0"
3
+ VERSION = "0.37.1"
4
4
 
5
5
  end
data/man/foreman.1 CHANGED
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "FOREMAN" "1" "January 2012" "Foreman 0.33.1" "Foreman Manual"
4
+ .TH "FOREMAN" "1" "January 2012" "Foreman 0.37.1" "Foreman Manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBforeman\fR \- manage Procfile\-based applications
@@ -83,4 +83,23 @@ describe "Foreman::Engine", :fakefs do
83
83
  engine.start
84
84
  end
85
85
  end
86
+
87
+ describe "utf8" do
88
+ before(:each) do
89
+ File.open("Procfile", "w") do |file|
90
+ file.puts "utf8: #{resource_path("bin/utf8")}"
91
+ end
92
+ end
93
+
94
+ it "should spawn" do
95
+ stub(subject).watch_for_output
96
+ stub(subject).watch_for_termination
97
+ subject.start
98
+ sleep 1
99
+ mock(subject).info(/started with pid \d+/, "utf8.1", anything)
100
+ mock(subject).info("\xff\x03\n", "utf8.1", anything)
101
+ subject.send(:poll_readers)
102
+ subject.send(:poll_readers)
103
+ end
104
+ end
86
105
  end
@@ -36,6 +36,7 @@ describe Foreman::Process do
36
36
  def run_file(executable, code)
37
37
  file = File.open("#{basedir}/script", 'w') {|it| it << code }
38
38
  run "#{executable} #{file.path}"
39
+ sleep 1
39
40
  end
40
41
 
41
42
  context 'options' do
@@ -98,7 +99,6 @@ describe Foreman::Process do
98
99
  trap "TERM", "IGNORE"
99
100
  loop { sleep 1 }
100
101
  CODE
101
- sleep 1 # wait for ruby to start
102
102
  subject.should be_alive
103
103
  subject.kill 'TERM'
104
104
  subject.should be_alive
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env ruby
2
+ puts "\xff\x03"
data/spec/spec_helper.rb CHANGED
@@ -68,9 +68,13 @@ def load_export_templates_into_fakefs(type)
68
68
  end
69
69
  end
70
70
 
71
+ def resource_path(filename)
72
+ File.expand_path("../resources/#{filename}", __FILE__)
73
+ end
74
+
71
75
  def example_export_file(filename)
72
76
  FakeFS.deactivate!
73
- data = File.read(File.expand_path("../resources/export/#{filename}", __FILE__))
77
+ data = File.read(File.expand_path(resource_path("export/#{filename}"), __FILE__))
74
78
  FakeFS.activate!
75
79
  data
76
80
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.37.0
4
+ version: 0.37.1
5
5
  prerelease:
6
6
  platform: java
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-29 00:00:00.000000000 Z
12
+ date: 2012-01-29 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: term-ansicolor
16
- requirement: &70210539597980 !ruby/object:Gem::Requirement
16
+ requirement: &70189995772300 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 1.0.7
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70210539597980
24
+ version_requirements: *70189995772300
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: thor
27
- requirement: &70210539597040 !ruby/object:Gem::Requirement
27
+ requirement: &70189995754980 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 0.13.6
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70210539597040
35
+ version_requirements: *70189995754980
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: posix-spawn
38
- requirement: &70210539596220 !ruby/object:Gem::Requirement
38
+ requirement: &70189995753460 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: 0.3.6
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70210539596220
46
+ version_requirements: *70189995753460
47
47
  description: Process manager for applications with multiple components
48
48
  email: ddollar@gmail.com
49
49
  executables:
@@ -58,6 +58,7 @@ files:
58
58
  - data/example/Procfile
59
59
  - data/example/Procfile.without_colon
60
60
  - data/example/ticker
61
+ - data/example/utf8
61
62
  - data/export/bluepill/master.pill.erb
62
63
  - data/export/runit/log_run.erb
63
64
  - data/export/runit/run.erb
@@ -93,6 +94,7 @@ files:
93
94
  - spec/foreman/process_spec.rb
94
95
  - spec/foreman_spec.rb
95
96
  - spec/helper_spec.rb
97
+ - spec/resources/bin/utf8
96
98
  - spec/resources/export/bluepill/app-concurrency.pill
97
99
  - spec/resources/export/bluepill/app.pill
98
100
  - spec/resources/export/inittab/inittab.concurrency
@@ -131,7 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
131
133
  version: '0'
132
134
  requirements: []
133
135
  rubyforge_project:
134
- rubygems_version: 1.8.15
136
+ rubygems_version: 1.8.10
135
137
  signing_key:
136
138
  specification_version: 3
137
139
  summary: Process manager for applications with multiple components