Sha256: 3fa92c3d0ba68decf9f2d86a67a1ffb2a728e80c7b2021ae4db3ccf67e418e63

Contents?: true

Size: 685 Bytes

Versions: 31

Compression:

Stored size: 685 Bytes

Contents

# -*- encoding: utf-8 -*-
module Bluepill
  class AppProxy
    APP_ATTRIBUTES = [:working_dir, :uid, :gid, :environment, :auto_start ]

    attr_accessor *APP_ATTRIBUTES
    attr_reader :app

    def initialize(app_name, options)
      @app = Application.new(app_name.to_s, options)
    end

    def process(process_name, &process_block)
      attributes = {}
      APP_ATTRIBUTES.each { |a| attributes[a] = self.send(a) }

      process_factory = ProcessFactory.new(attributes, process_block)

      process = process_factory.create_process(process_name, @app.pids_dir)
      group = process_factory.attributes.delete(:group)

      @app.add_process(process, group)
    end
  end
end

Version data entries

31 entries across 31 versions & 6 rubygems

Version Path
bluepill-rwgps-0.0.63 lib/bluepill/dsl/app_proxy.rb
bluepill-rwgps-0.0.62 lib/bluepill/dsl/app_proxy.rb
bluepill-rwgps-0.0.61 lib/bluepill/dsl/app_proxy.rb
cloud66-bluepill-0.0.64 lib/bluepill/dsl/app_proxy.rb
bluepill-0.0.68 lib/bluepill/dsl/app_proxy.rb
bluepill-0.0.67 lib/bluepill/dsl/app_proxy.rb
bluepill-rwgps-0.0.60 lib/bluepill/dsl/app_proxy.rb
bluepill-0.0.66 lib/bluepill/dsl/app_proxy.rb
bluepill-0.0.65 lib/bluepill/dsl/app_proxy.rb
bluepill-0.0.64 lib/bluepill/dsl/app_proxy.rb
cloud66-bluepill-0.0.63 lib/bluepill/dsl/app_proxy.rb
bluepill-0.0.63 lib/bluepill/dsl/app_proxy.rb
cloud66-bluepill-0.0.62 lib/bluepill/dsl/app_proxy.rb
bluepill-0.0.62 lib/bluepill/dsl/app_proxy.rb
bluepill-0.0.61 lib/bluepill/dsl/app_proxy.rb
kostya-bluepill-0.0.60.3 lib/bluepill/dsl/app_proxy.rb
kostya-bluepill-0.0.60.2 lib/bluepill/dsl/app_proxy.rb
kostya-bluepill-0.0.60.1 lib/bluepill/dsl/app_proxy.rb
skalar-bluepill-0.0.60.1 lib/bluepill/dsl/app_proxy.rb
bluepill-0.0.60 lib/bluepill/dsl/app_proxy.rb