summaryrefslogtreecommitdiff
path: root/app/serializers/analytics_commit_entity.rb
blob: b25c603c9f0bb8706acf044483de56e57046fd76 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

class AnalyticsCommitEntity < CommitEntity
  include EntityDateHelper

  expose :short_id, as: :short_sha

  expose :total_time do |commit|
    distance_of_time_as_hash(request.total_time.to_f)
  end

  unexpose :author_name
  unexpose :author_email
  unexpose :message
end