class Foreman::Export::Base
Attributes
engine[R]
formation[R]
location[R]
options[R]
port[R]
deprecated
Public Class Methods
new(location, engine, options={})
click to toggle source
# File lib/foreman/export/base.rb, line 16 def initialize(location, engine, options={}) @location = location @engine = engine @options = options.dup @formation = engine.formation # deprecated def port Foreman::Export::Base.warn_deprecation! engine.base_port end # deprecated def template Foreman::Export::Base.warn_deprecation! options[:template] end # deprecated def @engine.procfile Foreman::Export::Base.warn_deprecation! @processes.map do |process| OpenStruct.new( :name => @names[process], :process => process ) end end end
Public Instance Methods
app()
click to toggle source
# File lib/foreman/export/base.rb, line 53 def app options[:app] || "app" end
export()
click to toggle source
# File lib/foreman/export/base.rb, line 46 def export error("Must specify a location") unless location FileUtils.mkdir_p(location) rescue error("Could not create: #{location}") chown user, log chown user, run end
log()
click to toggle source
# File lib/foreman/export/base.rb, line 57 def log options[:log] || "/var/log/#{app}" end
run()
click to toggle source
# File lib/foreman/export/base.rb, line 61 def run options[:run] || "/var/run/#{app}" end
template()
click to toggle source
deprecated
# File lib/foreman/export/base.rb, line 29 def template Foreman::Export::Base.warn_deprecation! options[:template] end
user()
click to toggle source
# File lib/foreman/export/base.rb, line 65 def user options[:user] || app end