Compare commits

..

3 Commits

Author SHA1 Message Date
David Dollar
79f376368c 0.9.1 2010-11-03 15:00:59 -07:00
David Dollar
3576ae82af use process order to determine port assignments 2010-11-03 15:00:35 -07:00
David Dollar
303d54155f uniq the order for safety 2010-11-03 14:13:06 -07:00
2 changed files with 3 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
module Foreman
VERSION = "0.9.0"
VERSION = "0.9.1"
class AppDoesNotExist < Exception; end

View File

@@ -36,7 +36,7 @@ class Foreman::Engine
def process_order
processes
@order
@order.uniq
end
def processes_in_order
@@ -69,7 +69,7 @@ class Foreman::Engine
def port_for(process, num, base_port=nil)
base_port ||= 5000
offset = processes.keys.sort.index(process.name) * 100
offset = processes_in_order.map(&:first).index(process.name) * 100
base_port.to_i + offset + num - 1
end