Class: Skylight::Util::Deploy::EmptyDeploy Private
- Defined in:
- lib/skylight/util/deploy.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Direct Known Subclasses
Instance Attribute Summary collapse
- #config ⇒ Object readonly private
- #timestamp ⇒ Object readonly private
Instance Method Summary collapse
- #description ⇒ Object private
- #git_sha ⇒ Object private
- #id ⇒ Object private
-
#initialize(config) ⇒ EmptyDeploy
constructor
private
A new instance of EmptyDeploy.
- #to_query_hash ⇒ Object private
Constructor Details
#initialize(config) ⇒ EmptyDeploy
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of EmptyDeploy.
18 19 20 21 |
# File 'lib/skylight/util/deploy.rb', line 18 def initialize(config) @config = config @timestamp = Time.now.to_i end |
Instance Attribute Details
#config ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
16 17 18 |
# File 'lib/skylight/util/deploy.rb', line 16 def config @config end |
#timestamp ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
16 17 18 |
# File 'lib/skylight/util/deploy.rb', line 16 def @timestamp end |
Instance Method Details
#description ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
31 32 33 |
# File 'lib/skylight/util/deploy.rb', line 31 def description nil end |
#git_sha ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
27 28 29 |
# File 'lib/skylight/util/deploy.rb', line 27 def git_sha nil end |
#id ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
23 24 25 |
# File 'lib/skylight/util/deploy.rb', line 23 def id git_sha end |
#to_query_hash ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
35 36 37 38 39 40 41 42 43 |
# File 'lib/skylight/util/deploy.rb', line 35 def to_query_hash hash = { timestamp: , deploy_id: id.to_s[0..100] # Keep this sane } hash[:git_sha] = git_sha.to_s[0..40] if git_sha # A valid SHA will never exceed 40 hash[:description] = description[0..255] if description # Avoid massive descriptions hash end |