Sha256: 195424ec035aea3f2d71396336cb172594a7ba249668659c997b126b391fd755

Contents?: true

Size: 570 Bytes

Versions: 1

Compression:

Stored size: 570 Bytes

Contents

module PredragsDummyPipelines

  class Pipeline
    def initialize(actions)
      @build   = Exec.new(actions["build"], "build")
      deploys  = actions.select {|a,b| a != "build"}
      @deploys = deploys.map {|key, value| Exec.new(value, key)}
    end

    def run
      @build.run
      @deploys.map {|deploy|  deploy.run  }
    end

    def show
      puts @build.show
      @deploys.map {|deploy| puts deploy.show }
    end

    def build_results
      @build.results
    end

    def deploy_results
      @deploys.map {|deploy| deploy.results}
    end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
predrags_dummy_pipelines-0.7.3 lib/predrags_dummy_pipelines/pipeline.rb