Class: Drone::BuildRepresenter
- Inherits:
-
Representable::Decorator
- Object
- Representable::Decorator
- Drone::BuildRepresenter
- Includes:
- Representable::JSON
- Defined in:
- lib/drone/models/build_representer.rb
Overview
Transform ‘build` JSON payload
Instance Attribute Summary collapse
-
#author ⇒ String
The commit author.
-
#author_avatar ⇒ String
The link to author avatar.
-
#author_email ⇒ String
The email of the author.
-
#branch ⇒ String
The branch of the build.
-
#commit ⇒ String
The commit hash of the build.
-
#created_at ⇒ Time
The time when the build have been created.
-
#deploy_to ⇒ String
The target of the deploy.
-
#enqueued_at ⇒ Time
The time when the build have been enqueued.
-
#event ⇒ String
The event of the build.
-
#finished_at ⇒ Time
The time when the build have been finished.
-
#id ⇒ Integer
The ID of the build.
-
#link ⇒ String
The link to the current build.
-
#message ⇒ String
The commit message of the build.
-
#number ⇒ Integer
The number of the build.
-
#ref ⇒ String
The reference of the build.
-
#refspec ⇒ String
The reference spec of the build.
-
#remote ⇒ String
The remote name of the build.
-
#started_at ⇒ Time
The time when the build have been started.
-
#status ⇒ String
The status of the build.
-
#timestamp ⇒ Time
The timestamp of the build.
-
#title ⇒ String
The title of the build.
Instance Attribute Details
#author ⇒ String
Returns the commit author.
81 |
# File 'lib/drone/models/build_representer.rb', line 81 property :author |
#author_avatar ⇒ String
Returns the link to author avatar.
85 |
# File 'lib/drone/models/build_representer.rb', line 85 property :author_avatar |
#author_email ⇒ String
Returns the email of the author.
89 |
# File 'lib/drone/models/build_representer.rb', line 89 property :author_email |
#branch ⇒ String
Returns the branch of the build.
52 |
# File 'lib/drone/models/build_representer.rb', line 52 property :branch |
#commit ⇒ String
Returns the commit hash of the build.
48 |
# File 'lib/drone/models/build_representer.rb', line 48 property :commit |
#created_at ⇒ Time
Returns the time when the build have been created.
111 112 113 114 115 116 |
# File 'lib/drone/models/build_representer.rb', line 111 property :created_at, setter: lambda { || # rubocop:disable Style/BlockDelimiters [:represented].created_at = Time.at( [:fragment] ).utc } |
#deploy_to ⇒ String
Returns the target of the deploy.
44 |
# File 'lib/drone/models/build_representer.rb', line 44 property :deploy_to |
#enqueued_at ⇒ Time
Returns the time when the build have been enqueued.
102 103 104 105 106 107 |
# File 'lib/drone/models/build_representer.rb', line 102 property :enqueued_at, setter: lambda { || # rubocop:disable Style/BlockDelimiters [:represented].enqueued_at = Time.at( [:fragment] ).utc } |
#event ⇒ String
Returns the event of the build.
36 |
# File 'lib/drone/models/build_representer.rb', line 36 property :event |
#finished_at ⇒ Time
Returns the time when the build have been finished.
129 130 131 132 133 134 |
# File 'lib/drone/models/build_representer.rb', line 129 property :finished_at, setter: lambda { || # rubocop:disable Style/BlockDelimiters [:represented].finished_at = Time.at( [:fragment] ).utc } |
#id ⇒ Integer
Returns the ID of the build.
28 |
# File 'lib/drone/models/build_representer.rb', line 28 property :id |
#link ⇒ String
Returns the link to the current build.
76 77 |
# File 'lib/drone/models/build_representer.rb', line 76 property :link, as: :link_url |
#message ⇒ String
Returns the commit message of the build.
72 |
# File 'lib/drone/models/build_representer.rb', line 72 property :message |
#number ⇒ Integer
Returns the number of the build.
32 |
# File 'lib/drone/models/build_representer.rb', line 32 property :number |
#ref ⇒ String
Returns the reference of the build.
56 |
# File 'lib/drone/models/build_representer.rb', line 56 property :ref |
#refspec ⇒ String
Returns the reference spec of the build.
60 |
# File 'lib/drone/models/build_representer.rb', line 60 property :refspec |
#remote ⇒ String
Returns the remote name of the build.
64 |
# File 'lib/drone/models/build_representer.rb', line 64 property :remote |
#started_at ⇒ Time
Returns the time when the build have been started.
120 121 122 123 124 125 |
# File 'lib/drone/models/build_representer.rb', line 120 property :started_at, setter: lambda { || # rubocop:disable Style/BlockDelimiters [:represented].started_at = Time.at( [:fragment] ).utc } |
#status ⇒ String
Returns the status of the build.
40 |
# File 'lib/drone/models/build_representer.rb', line 40 property :status |
#timestamp ⇒ Time
Returns the timestamp of the build.
93 94 95 96 97 98 |
# File 'lib/drone/models/build_representer.rb', line 93 property :timestamp, setter: lambda { || # rubocop:disable Style/BlockDelimiters [:represented]. = Time.at( [:fragment] ).utc } |
#title ⇒ String
Returns the title of the build.
68 |
# File 'lib/drone/models/build_representer.rb', line 68 property :title |