summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-11-18 14:30:27 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-11-18 14:30:27 +0100
commitbf25b5f69d8343b1d1a39a49815c9c888896a758 (patch)
tree74c23a574db1cc9d90f823384d1f19c7be2c6cde /lib
parent65724301e6129440d0fba9cf9779297bc702c95b (diff)
downloadgitlab-ce-bf25b5f69d8343b1d1a39a49815c9c888896a758.tar.gz
Remove CI config helper with same name as an entry
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/ci/config.rb41
-rw-r--r--lib/gitlab/ci/config/entry/configurable.rb2
2 files changed, 35 insertions, 8 deletions
diff --git a/lib/gitlab/ci/config.rb b/lib/gitlab/ci/config.rb
index 06599238d22..f7ff7ea212e 100644
--- a/lib/gitlab/ci/config.rb
+++ b/lib/gitlab/ci/config.rb
@@ -4,12 +4,6 @@ module Gitlab
# Base GitLab CI Configuration facade
#
class Config
- ##
- # Temporary delegations that should be removed after refactoring
- #
- delegate :before_script, :image, :services, :after_script, :variables,
- :stages, :cache, :jobs, to: :@global
-
def initialize(config)
@config = Loader.new(config).load!
@@ -28,6 +22,41 @@ module Gitlab
def to_hash
@config
end
+
+ ##
+ # Temporary method that should be removed after refactoring
+ #
+ def before_script
+ @global.before_script_value
+ end
+
+ def image
+ @global.image_value
+ end
+
+ def services
+ @global.services_value
+ end
+
+ def after_script
+ @global.after_script_value
+ end
+
+ def variables
+ @global.variables_value
+ end
+
+ def stages
+ @global.stages_value
+ end
+
+ def cache
+ @global.cache_value
+ end
+
+ def jobs
+ @global.jobs_value
+ end
end
end
end
diff --git a/lib/gitlab/ci/config/entry/configurable.rb b/lib/gitlab/ci/config/entry/configurable.rb
index 0f438faeda2..833ae4a0ff3 100644
--- a/lib/gitlab/ci/config/entry/configurable.rb
+++ b/lib/gitlab/ci/config/entry/configurable.rb
@@ -66,8 +66,6 @@ module Gitlab
@entries[symbol].value
end
-
- alias_method symbol.to_sym, "#{symbol}_value".to_sym
end
end
end