From a0a2dd945486cd11525060da3f0a69943e5d53e9 Mon Sep 17 00:00:00 2001 From: Chris Lowder Date: Wed, 18 Jan 2012 17:17:30 +0000 Subject: [PATCH] Don't expose the options hash. --- data/export/bluepill/master.pill.erb | 2 +- lib/foreman/export/base.rb | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/data/export/bluepill/master.pill.erb b/data/export/bluepill/master.pill.erb index 2b56d9d..69da4d7 100644 --- a/data/export/bluepill/master.pill.erb +++ b/data/export/bluepill/master.pill.erb @@ -5,7 +5,7 @@ Bluepill.application("<%= app %>", :foreground => false, :log_file => "/var/log/ <% engine.procfile.entries.each do |process| %> <% 1.upto(concurrency[process.name]) do |num| %> -<% port = engine.port_for(process, num, options[:port]) %> +<% port = engine.port_for(process, num, self.port) %> app.process("<%= process.name %>-<%=num%>") do |process| process.start_command = "<%= process.command.gsub("$PORT", port.to_s) %>" diff --git a/lib/foreman/export/base.rb b/lib/foreman/export/base.rb index 03477bb..c17f9d9 100644 --- a/lib/foreman/export/base.rb +++ b/lib/foreman/export/base.rb @@ -3,12 +3,11 @@ require "foreman/utils" class Foreman::Export::Base - attr_reader :location, :engine, :options, :app, :log, :port, :user, :template, :concurrency + attr_reader :location, :engine, :app, :log, :port, :user, :template, :concurrency def initialize(location, engine, options={}) @location = location @engine = engine - @options = options @app = options[:app] @log = options[:log] @port = options[:port]