diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-06-09 15:48:40 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-06-15 15:09:21 +0300 |
commit | 76aea978c6b2d8c69881836408c4947d816d2db2 (patch) | |
tree | 231523b9561d126567452eed913e583d2f49ab7c /lib/gitlab/ci/config.rb | |
parent | 3222c752e8134aa536917730b877292b84b94f00 (diff) |
Add class that encapsulates error in new Ci config
Diffstat (limited to 'lib/gitlab/ci/config.rb')
-rw-r--r-- | lib/gitlab/ci/config.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/gitlab/ci/config.rb b/lib/gitlab/ci/config.rb index b48d3592f16..26028547fa0 100644 --- a/lib/gitlab/ci/config.rb +++ b/lib/gitlab/ci/config.rb @@ -4,8 +4,6 @@ module Gitlab # Base GitLab CI Configuration facade # class Config - delegate :valid?, :errors, to: :@global - ## # Temporary delegations that should be removed after refactoring # @@ -18,6 +16,14 @@ module Gitlab @global.process! end + def valid? + errors.none? + end + + def errors + @global.errors.map(&:to_s) + end + def to_hash @config end |