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
67e90a12
Commit
67e90a12
authored
Jan 14, 2019
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make fabrication of default config entry more readable
parent
8b185467
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
lib/gitlab/ci/config/entry/job.rb
lib/gitlab/ci/config/entry/job.rb
+1
-1
lib/gitlab/config/entry/factory.rb
lib/gitlab/config/entry/factory.rb
+6
-4
No files found.
lib/gitlab/ci/config/entry/job.rb
View file @
67e90a12
...
@@ -150,7 +150,7 @@ module Gitlab
...
@@ -150,7 +150,7 @@ module Gitlab
stage:
stage_value
,
stage:
stage_value
,
cache:
cache_value
,
cache:
cache_value
,
only:
only_value
,
only:
only_value
,
except:
except_value
.
to_h
,
except:
except_value
,
variables:
variables_defined?
?
variables_value
:
nil
,
variables:
variables_defined?
?
variables_value
:
nil
,
environment:
environment_defined?
?
environment_value
:
nil
,
environment:
environment_defined?
?
environment_value
:
nil
,
environment_name:
environment_defined?
?
environment_value
[
:name
]
:
nil
,
environment_name:
environment_defined?
?
environment_value
[
:name
]
:
nil
,
...
...
lib/gitlab/config/entry/factory.rb
View file @
67e90a12
...
@@ -53,10 +53,12 @@ module Gitlab
...
@@ -53,10 +53,12 @@ module Gitlab
# If entry has a default value we fabricate concrete node
# If entry has a default value we fabricate concrete node
# with default value.
# with default value.
#
#
if
@entry
.
default
(
@attributes
).
nil?
@entry
.
default
(
@attributes
).
yield_self
do
|
default
|
if
default
.
nil?
fabricate
(
Entry
::
Undefined
)
fabricate
(
Entry
::
Undefined
)
else
else
fabricate
(
@entry
,
@entry
.
default
(
@attributes
))
fabricate
(
@entry
,
default
)
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