Sha256: 724f4d91e4002898978a32acca664bf8da41d602472b945f3541db041b7da890

Contents?: true

Size: 493 Bytes

Versions: 3

Compression:

Stored size: 493 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
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
predrags_dummy_pipelines-0.7.2 lib/predrags_dummy_pipelines/pipeline.rb
predrags_dummy_pipelines-0.7.1 lib/predrags_dummy_pipelines/pipeline.rb
predrags_dummy_pipelines-0.6.2 lib/predrags_dummy_pipelines/pipeline.rb