diff options
author | Alfredo Sumaran <alfredo@gitlab.com> | 2016-04-20 12:24:42 -0500 |
---|---|---|
committer | Alfredo Sumaran <alfredo@gitlab.com> | 2016-04-20 12:24:42 -0500 |
commit | a45924348fca7eff4e26b3d9e47117b9fb3669ec (patch) | |
tree | 17531b97fd4a26e4f530dc5d35c2962fc0ed4f06 /lib/api/entities.rb | |
parent | b41ddf9c6977e311b5085de8467ab450aa81b71b (diff) | |
parent | 832cdd3d516698d0e6a7257b3d94292819a0436a (diff) | |
download | gitlab-ce-a45924348fca7eff4e26b3d9e47117b9fb3669ec.tar.gz |
Merge remote-tracking branch 'origin/master' into issue_14904
Diffstat (limited to 'lib/api/entities.rb')
-rw-r--r-- | lib/api/entities.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 60b9f5e0ece..716ca6f7ed9 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -439,5 +439,17 @@ module API class Variable < Grape::Entity expose :key, :value end + + class RepoLicense < Grape::Entity + expose :key, :name, :nickname + expose :featured, as: :popular + expose :url, as: :html_url + expose(:source_url) { |license| license.meta['source'] } + expose(:description) { |license| license.meta['description'] } + expose(:conditions) { |license| license.meta['conditions'] } + expose(:permissions) { |license| license.meta['permissions'] } + expose(:limitations) { |license| license.meta['limitations'] } + expose :content + end end end |