gitlab-org--gitlab-foss/app/serializers/analytics_commit_entity.rb

14 lines
274 B
Ruby
Raw Normal View History

2016-11-15 07:23:17 -05:00
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)
2016-11-15 07:23:17 -05:00
end
unexpose :author_name
unexpose :author_email
unexpose :message
end