Sha256: 36a857b853b9d415a5af37062cd0904181131623f96a7739059eea6832af45e2

Contents?: true

Size: 679 Bytes

Versions: 18

Compression:

Stored size: 679 Bytes

Contents

require "erb"
require "foreman/export"

class Foreman::Export::Upstart < Foreman::Export::Base

  def export
    super

    (Dir["#{location}/#{app}-*.conf"] << "#{location}/#{app}.conf").each do |file|
      clean file
    end

    write_template "upstart/master.conf.erb", "#{app}.conf", binding

    engine.each_process do |name, process|
      next if engine.formation[name] < 1
      write_template "upstart/process_master.conf.erb", "#{app}-#{name}.conf", binding

      1.upto(engine.formation[name]) do |num|
        port = engine.port_for(process, num)
        write_template "upstart/process.conf.erb", "#{app}-#{name}-#{num}.conf", binding
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
foreman-0.71.0 lib/foreman/export/upstart.rb
foreman-0.70.0 lib/foreman/export/upstart.rb
foreman-0.69.0-mingw32 lib/foreman/export/upstart.rb
foreman-0.69.0 lib/foreman/export/upstart.rb
foreman-0.67.0-mingw32 lib/foreman/export/upstart.rb
foreman-0.67.0-java lib/foreman/export/upstart.rb
foreman-0.67.0 lib/foreman/export/upstart.rb
foreman-0.66.0-mingw32 lib/foreman/export/upstart.rb
foreman-0.66.0-java lib/foreman/export/upstart.rb
foreman-0.66.0 lib/foreman/export/upstart.rb
foreman-0.65.0 lib/foreman/export/upstart.rb
foreman-0.64.0 lib/foreman/export/upstart.rb
mango-0.8.0 vendor/bundler/ruby/2.1.0/gems/foreman-0.63.0/lib/foreman/export/upstart.rb
mango-0.7.1 vendor/bundler/ruby/2.0.0/gems/foreman-0.63.0/lib/foreman/export/upstart.rb
mango-0.7.0 vendor/bundler/ruby/2.0.0/gems/foreman-0.63.0/lib/foreman/export/upstart.rb
foreman-0.63.0-mingw32 lib/foreman/export/upstart.rb
foreman-0.63.0-java lib/foreman/export/upstart.rb
foreman-0.63.0 lib/foreman/export/upstart.rb