diff --git a/lib/person_data_export.rb b/lib/person_data_export.rb index d39f3c3..b1853fe 100644 --- a/lib/person_data_export.rb +++ b/lib/person_data_export.rb @@ -9,6 +9,14 @@ module PersonDataExport attrs = person_softwares_attrs(attrs, person) + attrs = person_data_attr_to_hash(attrs, person) + + attrs + end + + def person_data_attr_to_hash(attrs, person) + attrs['articles-count'] = person.articles.count + attrs['data'] = profile_attrs(person) attrs end @@ -51,7 +59,8 @@ module PersonDataExport profile = { "id" => profile.id, "identifier" => profile.identifier, - "name" => profile.name + "name" => profile.name, + "type" => profile.type } end -- libgit2 0.21.2