lib/nonnative/pool.rb in nonnative-1.40.0 vs lib/nonnative/pool.rb in nonnative-1.41.0

- old
+ new

@@ -12,10 +12,15 @@ def stop(&block) [processes, servers].each { |t| process(t, :stop, :closed?, &block) } end + def process_by_name(name) + index = configuration.processes.find_index { |s| s.name == name } + processes[index].first + end + def server_by_name(name) index = configuration.servers.find_index { |s| s.name == name } servers[index].first end @@ -23,10 +28,10 @@ attr_reader :configuration def processes @processes ||= configuration.processes.map do |d| - [Nonnative::Command.new(d), Nonnative::Port.new(d)] + [Nonnative::Process.new(d), Nonnative::Port.new(d)] end end def servers @servers ||= configuration.servers.map do |d|