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
Tatuya Kamada
gitlab-ce
Commits
5abfc7fa
Commit
5abfc7fa
authored
Jun 10, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Define ci entry accessor instead of method_missing
parent
12080ba1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
7 deletions
+6
-7
lib/gitlab/ci/config/node/configurable.rb
lib/gitlab/ci/config/node/configurable.rb
+6
-0
lib/gitlab/ci/config/node/entry.rb
lib/gitlab/ci/config/node/entry.rb
+0
-7
No files found.
lib/gitlab/ci/config/node/configurable.rb
View file @
5abfc7fa
...
...
@@ -55,6 +55,12 @@ module Gitlab
{
class:
entry_class
,
description:
metadata
[
:description
]
}
}
define_method
(
symbol
)
do
raise
Entry
::
InvalidError
unless
valid?
@nodes
[
symbol
].
try
(
:value
)
end
(
@allowed_nodes
||=
{}).
merge!
(
node
)
end
end
...
...
lib/gitlab/ci/config/node/entry.rb
View file @
5abfc7fa
...
...
@@ -52,13 +52,6 @@ module Gitlab
{}
end
def
method_missing
(
name
,
*
args
)
super
unless
allowed_nodes
.
has_key?
(
name
)
raise
InvalidError
unless
valid?
@nodes
[
name
].
try
(
:value
)
end
def
add_node
(
key
,
entry
)
raise
NotImplementedError
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