Class: RailsPulse::Deployment

Inherits:
ApplicationRecord show all
Defined in:
app/models/rails_pulse/deployment.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.ransackable_associations(auth_object = nil) ⇒ Object



15
16
17
# File 'app/models/rails_pulse/deployment.rb', line 15

def self.ransackable_associations(auth_object = nil)
  []
end

.ransackable_attributes(auth_object = nil) ⇒ Object



11
12
13
# File 'app/models/rails_pulse/deployment.rb', line 11

def self.ransackable_attributes(auth_object = nil)
  %w[id revision started_at finished_at created_at]
end

Instance Method Details

#metadata_hashObject



19
20
21
22
23
24
# File 'app/models/rails_pulse/deployment.rb', line 19

def 
  return {} if .blank?
  JSON.parse()
rescue JSON::ParserError
  {}
end

#to_chart_markerObject



26
27
28
# File 'app/models/rails_pulse/deployment.rb', line 26

def to_chart_marker
  { timestamp: started_at.to_i * 1000, revision: revision, started_at: started_at.iso8601 }
end