Sha256: 00121311a36c55abd3007b2c3cf8238c0ef83bc1d8f1b717fbdc41006c4bb54a

Contents?: true

Size: 1.11 KB

Versions: 37

Compression:

Stored size: 1.11 KB

Contents

module Vx
  module Builder
    class Task

      attr_reader :name, :src, :sha, :deploy_key, :branch, :pull_request_id,
        :cache_url_prefix, :job_id, :build_id, :build_number, :job_number,
        :project_host

      def initialize(options = {})
        @name                 = options[:name]
        @src                  = options[:src]
        @sha                  = options[:sha]
        @job_id               = options[:job_id]
        @build_id             = options[:build_id]
        @deploy_key           = options[:deploy_key]
        @branch               = options[:branch]
        @pull_request_id      = options[:pull_request_id]
        @cache_url_prefix     = options[:cache_url_prefix]
        @build_number         = options[:build_number]
        @job_number           = options[:job_number]
        @project_host         = options[:project_host]

        validate!
      end

      private

        def validate!
          (name && src && sha && deploy_key && branch && job_id && build_id &&
            build_number && job_number && project_host) or
            raise(MissingKeys)
        end

    end
  end
end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
vx-builder-0.5.35 lib/vx/builder/task.rb
vx-builder-0.5.34 lib/vx/builder/task.rb
vx-builder-0.5.33 lib/vx/builder/task.rb
vx-builder-0.5.32 lib/vx/builder/task.rb
vx-builder-0.5.31 lib/vx/builder/task.rb
vx-builder-0.5.30 lib/vx/builder/task.rb
vx-builder-0.5.29 lib/vx/builder/task.rb
vx-builder-0.5.28 lib/vx/builder/task.rb
vx-builder-0.5.27 lib/vx/builder/task.rb
vx-builder-0.5.26 lib/vx/builder/task.rb
vx-builder-0.5.25 lib/vx/builder/task.rb
vx-builder-0.5.24 lib/vx/builder/task.rb
vx-builder-0.5.23 lib/vx/builder/task.rb
vx-builder-0.5.22 lib/vx/builder/task.rb
vx-builder-0.5.21 lib/vx/builder/task.rb
vx-builder-0.5.20 lib/vx/builder/task.rb
vx-builder-0.5.19 lib/vx/builder/task.rb
vx-builder-0.5.18 lib/vx/builder/task.rb
vx-builder-0.5.17 lib/vx/builder/task.rb
vx-builder-0.5.16 lib/vx/builder/task.rb