Sha256: 73c9bcfe91a036b602146c7fabb91a347775d639ce26371a838c10f472cdffad

Contents?: true

Size: 518 Bytes

Versions: 76

Compression:

Stored size: 518 Bytes

Contents

module Vx
  module Builder
    class ScriptBuilder

      class Services < Base

        ALIASES = {
          'rabbitmq' => 'rabbitmq-server'
        }

        def call(env)
          env.source.services.each do |srv|
            srv = ALIASES[srv] || srv
            env.init << trace_sh_command("sudo service #{srv} start")
          end
          unless env.source.services.empty?
            env.init << trace_sh_command("sleep 3")
          end

          app.call(env)
        end

      end
    end
  end
end

Version data entries

76 entries across 76 versions & 1 rubygems

Version Path
vx-builder-0.5.41 lib/vx/builder/script_builder/services.rb
vx-builder-0.5.38 lib/vx/builder/script_builder/services.rb
vx-builder-0.5.37 lib/vx/builder/script_builder/services.rb
vx-builder-0.5.36 lib/vx/builder/script_builder/services.rb
vx-builder-0.5.35 lib/vx/builder/script_builder/services.rb
vx-builder-0.5.34 lib/vx/builder/script_builder/services.rb
vx-builder-0.5.33 lib/vx/builder/script_builder/services.rb
vx-builder-0.5.32 lib/vx/builder/script_builder/services.rb
vx-builder-0.5.31 lib/vx/builder/script_builder/services.rb
vx-builder-0.5.30 lib/vx/builder/script_builder/services.rb
vx-builder-0.5.29 lib/vx/builder/script_builder/services.rb
vx-builder-0.5.28 lib/vx/builder/script_builder/services.rb
vx-builder-0.5.27 lib/vx/builder/script_builder/services.rb
vx-builder-0.5.26 lib/vx/builder/script_builder/services.rb
vx-builder-0.5.25 lib/vx/builder/script_builder/services.rb
vx-builder-0.5.24 lib/vx/builder/script_builder/services.rb
vx-builder-0.5.23 lib/vx/builder/script_builder/services.rb
vx-builder-0.5.22 lib/vx/builder/script_builder/services.rb
vx-builder-0.5.21 lib/vx/builder/script_builder/services.rb
vx-builder-0.5.20 lib/vx/builder/script_builder/services.rb