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.15 lib/vx/builder/task.rb
vx-builder-0.5.14 lib/vx/builder/task.rb
vx-builder-0.5.13 lib/vx/builder/task.rb
vx-builder-0.5.12 lib/vx/builder/task.rb
vx-builder-0.5.11 lib/vx/builder/task.rb
vx-builder-0.5.10 lib/vx/builder/task.rb
vx-builder-0.5.9 lib/vx/builder/task.rb
vx-builder-0.5.8 lib/vx/builder/task.rb
vx-builder-0.5.7 lib/vx/builder/task.rb
vx-builder-0.5.6 lib/vx/builder/task.rb
vx-builder-0.5.5 lib/vx/builder/task.rb
vx-builder-0.5.4 lib/vx/builder/task.rb
vx-builder-0.5.3 lib/vx/builder/task.rb
vx-builder-0.5.2 lib/vx/builder/task.rb
vx-builder-0.5.1 lib/vx/builder/task.rb
vx-builder-0.5.0 lib/vx/builder/task.rb
vx-builder-0.4.0 lib/vx/builder/task.rb