Sha256: a70e1b001724955a1876a0bc2dcee90f536f922b03099833f08026baca7bd161

Contents?: true

Size: 522 Bytes

Versions: 22

Compression:

Stored size: 522 Bytes

Contents

class TaskSerializer < ActiveModel::Serializer
  include ConditionalAttributes

  has_one :author
  has_one :revision, serializer: ShortCommitSerializer

  attributes :id, :url, :html_url, :output_url, :type, :status, :updated_at, :created_at

  def revision
    object.until_commit
  end

  def url
    api_stack_task_url(object.stack, object)
  end

  def html_url
    stack_task_url(object.stack, object)
  end

  def output_url
    api_stack_task_output_url(object.stack, object)
  end

  def type
    :task
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
shipit-engine-0.5.2 app/serializers/task_serializer.rb
shipit-engine-0.5.1 app/serializers/task_serializer.rb
shipit-engine-0.5.0 app/serializers/task_serializer.rb
shipit-engine-0.4.10 app/serializers/task_serializer.rb
shipit-engine-0.4.9 app/serializers/task_serializer.rb
shipit-engine-0.4.8 app/serializers/task_serializer.rb
shipit-engine-0.4.7 app/serializers/task_serializer.rb
shipit-engine-0.4.6 app/serializers/task_serializer.rb
shipit-engine-0.4.5 app/serializers/task_serializer.rb
shipit-engine-0.4.4 app/serializers/task_serializer.rb
shipit-engine-0.4.3 app/serializers/task_serializer.rb
shipit-engine-0.4.2 app/serializers/task_serializer.rb
shipit-engine-0.4.1 app/serializers/task_serializer.rb
shipit-engine-0.4.0 app/serializers/task_serializer.rb
shipit-engine-0.3.1 app/serializers/task_serializer.rb
shipit-engine-0.3.0 app/serializers/task_serializer.rb
shipit-engine-0.2.3 app/serializers/task_serializer.rb
shipit-engine-0.2.2 app/serializers/task_serializer.rb
shipit-engine-0.2.1 app/serializers/task_serializer.rb
shipit-engine-0.2.0 app/serializers/task_serializer.rb