Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
50bee8e9
Commit
50bee8e9
authored
Apr 19, 2016
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename License entity to RepoLicense to avoid conflict with EE
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
b2370fef
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
lib/api/entities.rb
lib/api/entities.rb
+1
-1
lib/api/licenses.rb
lib/api/licenses.rb
+2
-2
No files found.
lib/api/entities.rb
View file @
50bee8e9
...
@@ -440,7 +440,7 @@ module API
...
@@ -440,7 +440,7 @@ module API
expose
:key
,
:value
expose
:key
,
:value
end
end
class
License
<
Grape
::
Entity
class
Repo
License
<
Grape
::
Entity
expose
:key
,
:name
,
:nickname
expose
:key
,
:name
,
:nickname
expose
:featured
,
as: :popular
expose
:featured
,
as: :popular
expose
:url
,
as: :html_url
expose
:url
,
as: :html_url
...
...
lib/api/licenses.rb
View file @
50bee8e9
...
@@ -24,7 +24,7 @@ module API
...
@@ -24,7 +24,7 @@ module API
options
=
{
options
=
{
featured:
params
[
:popular
].
present?
?
true
:
nil
featured:
params
[
:popular
].
present?
?
true
:
nil
}
}
present
Licensee
::
License
.
all
(
options
),
with:
Entities
::
License
present
Licensee
::
License
.
all
(
options
),
with:
Entities
::
Repo
License
end
end
# Get text for specific license
# Get text for specific license
...
@@ -52,7 +52,7 @@ module API
...
@@ -52,7 +52,7 @@ module API
fullname
=
params
[
:fullname
].
presence
||
current_user
.
try
(
:name
)
fullname
=
params
[
:fullname
].
presence
||
current_user
.
try
(
:name
)
license
.
content
.
gsub!
(
FULLNAME_TEMPLATE_REGEX
,
fullname
)
if
fullname
license
.
content
.
gsub!
(
FULLNAME_TEMPLATE_REGEX
,
fullname
)
if
fullname
present
license
,
with:
Entities
::
License
present
license
,
with:
Entities
::
Repo
License
end
end
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment