From 50bee8e9198f65a692e32710a32089270e166f6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= <remy@rymai.me> Date: Tue, 19 Apr 2016 11:08:48 +0200 Subject: [PATCH] Rename License entity to RepoLicense to avoid conflict with EE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémy Coutable <remy@rymai.me> --- lib/api/entities.rb | 2 +- lib/api/licenses.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/api/entities.rb b/lib/api/entities.rb index e7af928b0e9..716ca6f7ed9 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -440,7 +440,7 @@ module API expose :key, :value end - class License < Grape::Entity + class RepoLicense < Grape::Entity expose :key, :name, :nickname expose :featured, as: :popular expose :url, as: :html_url diff --git a/lib/api/licenses.rb b/lib/api/licenses.rb index f9536fc82bb..187d2c04703 100644 --- a/lib/api/licenses.rb +++ b/lib/api/licenses.rb @@ -24,7 +24,7 @@ module API options = { featured: params[:popular].present? ? true : nil } - present Licensee::License.all(options), with: Entities::License + present Licensee::License.all(options), with: Entities::RepoLicense end # Get text for specific license @@ -52,7 +52,7 @@ module API fullname = params[:fullname].presence || current_user.try(:name) license.content.gsub!(FULLNAME_TEMPLATE_REGEX, fullname) if fullname - present license, with: Entities::License + present license, with: Entities::RepoLicense end end end -- 2.30.9