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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
bfad4c61
Commit
bfad4c61
authored
Jul 04, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add minor improvements in readability in CI config
parent
eb151e77
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
6 additions
and
8 deletions
+6
-8
lib/gitlab/ci/config/node/configurable.rb
lib/gitlab/ci/config/node/configurable.rb
+1
-3
lib/gitlab/ci/config/node/stages.rb
lib/gitlab/ci/config/node/stages.rb
+1
-1
lib/gitlab/ci/config/node/validator.rb
lib/gitlab/ci/config/node/validator.rb
+1
-0
spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
+2
-2
spec/lib/gitlab/ci/config/node/boolean_spec.rb
spec/lib/gitlab/ci/config/node/boolean_spec.rb
+1
-1
spec/lib/gitlab/ci/config/node/configurable_spec.rb
spec/lib/gitlab/ci/config/node/configurable_spec.rb
+0
-1
No files found.
lib/gitlab/ci/config/node/configurable.rb
View file @
bfad4c61
...
@@ -26,9 +26,7 @@ module Gitlab
...
@@ -26,9 +26,7 @@ module Gitlab
private
private
def
create_node
(
key
,
factory
)
def
create_node
(
key
,
factory
)
factory
.
with
(
value:
@config
[
key
])
factory
.
with
(
value:
@config
[
key
],
key:
key
,
parent:
self
)
factory
.
with
(
parent:
self
)
factory
.
with
(
key:
key
)
factory
.
create!
factory
.
create!
end
end
...
...
lib/gitlab/ci/config/node/stages.rb
View file @
bfad4c61
...
@@ -13,7 +13,7 @@ module Gitlab
...
@@ -13,7 +13,7 @@ module Gitlab
end
end
def
self
.
default
def
self
.
default
%w
(build test deploy)
%w
[build test deploy]
end
end
end
end
end
end
...
...
lib/gitlab/ci/config/node/validator.rb
View file @
bfad4c61
...
@@ -23,6 +23,7 @@ module Gitlab
...
@@ -23,6 +23,7 @@ module Gitlab
def
unknown_keys
def
unknown_keys
return
[]
unless
config
.
is_a?
(
Hash
)
return
[]
unless
config
.
is_a?
(
Hash
)
config
.
keys
-
@node
.
class
.
nodes
.
keys
config
.
keys
-
@node
.
class
.
nodes
.
keys
end
end
...
...
spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
View file @
bfad4c61
...
@@ -551,8 +551,8 @@ module Ci
...
@@ -551,8 +551,8 @@ module Ci
config_processor
=
GitlabCiYamlProcessor
.
new
(
config
,
path
)
config_processor
=
GitlabCiYamlProcessor
.
new
(
config
,
path
)
##
##
# When variables config is empty, we as
umme this is a correct,
# When variables config is empty, we as
sume this is a valid
# see issue #18775
#
configuration,
see issue #18775
#
#
expect
(
config_processor
.
job_variables
(
:rspec
))
expect
(
config_processor
.
job_variables
(
:rspec
))
.
to
be_an_instance_of
(
Array
).
and
be_empty
.
to
be_an_instance_of
(
Array
).
and
be_empty
...
...
spec/lib/gitlab/ci/config/node/boolean_spec.rb
View file @
bfad4c61
...
@@ -21,7 +21,7 @@ describe Gitlab::Ci::Config::Node::Boolean do
...
@@ -21,7 +21,7 @@ describe Gitlab::Ci::Config::Node::Boolean do
end
end
context
'when entry value is not valid'
do
context
'when entry value is not valid'
do
let
(
:config
)
{
[
'incorrect'
]
}
let
(
:config
)
{
[
'incorrect'
]
}
describe
'#errors'
do
describe
'#errors'
do
it
'saves errors'
do
it
'saves errors'
do
...
...
spec/lib/gitlab/ci/config/node/configurable_spec.rb
View file @
bfad4c61
...
@@ -22,7 +22,6 @@ describe Gitlab::Ci::Config::Node::Configurable do
...
@@ -22,7 +22,6 @@ describe Gitlab::Ci::Config::Node::Configurable do
validator
.
validate
validator
.
validate
end
end
context
'when node validator is invalid'
do
context
'when node validator is invalid'
do
let
(
:instance
)
{
node
.
new
(
'ls'
)
}
let
(
:instance
)
{
node
.
new
(
'ls'
)
}
...
...
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