BigW Consortium Gitlab

analytics_commit_entity.rb 274 Bytes
Newer Older
1 2 3 4 5 6
class AnalyticsCommitEntity < CommitEntity
  include EntityDateHelper

  expose :short_id, as: :short_sha

  expose :total_time do |commit|
7
    distance_of_time_as_hash(request.total_time.to_f)
8 9 10 11 12 13
  end

  unexpose :author_name
  unexpose :author_email
  unexpose :message
end