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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
7805eea3
Commit
7805eea3
authored
Jun 12, 2017
by
Tomasz Maczukin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor old formad handling in lib/ci/api/entities.rb
parent
fa0a326b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
6 deletions
+2
-6
lib/ci/api/entities.rb
lib/ci/api/entities.rb
+2
-6
No files found.
lib/ci/api/entities.rb
View file @
7805eea3
...
...
@@ -45,15 +45,13 @@ module Ci
expose
:artifacts_expire_at
,
if:
->
(
build
,
_
)
{
build
.
artifacts?
}
expose
:options
do
|
model
|
options
=
model
.
options
# This part ensures that output of old API is still the same after adding support
# for extended docker configuration options, used by new API
#
# I'm leaving this here, not in the model, because it should be removed at the same time
# when old API will be removed (planned for August 2017).
options
[
:image
]
=
options
[
:image
][
:name
]
if
options
[
:image
].
present?
&&
options
[
:image
].
is_a?
(
Hash
)
if
options
[
:services
].
present?
model
.
options
.
dup
.
tap
do
|
options
|
options
[
:image
]
=
options
[
:image
][
:name
]
if
options
[
:image
].
is_a?
(
Hash
)
options
[
:services
].
map!
do
|
service
|
if
service
.
is_a?
(
Hash
)
service
[
:name
]
...
...
@@ -62,8 +60,6 @@ module Ci
end
end
end
options
end
expose
:timeout
do
|
model
|
...
...
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