diff options
author | Valery Sizov <vsv2711@gmail.com> | 2015-06-09 16:26:50 +0300 |
---|---|---|
committer | Valery Sizov <vsv2711@gmail.com> | 2015-06-09 17:53:42 +0300 |
commit | 8fd43216598bc74b3dea2188ff7262081999de33 (patch) | |
tree | 38bb4b4464e4a9dea40af30af869151ef63e4029 /lib | |
parent | dedabbc0243cc7aa401c49f35b4e100ff2d95fa3 (diff) | |
download | gitlab-ci-8fd43216598bc74b3dea2188ff7262081999de33.tar.gz |
Lint implementation
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab_ci_yaml_processor.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/gitlab_ci_yaml_processor.rb b/lib/gitlab_ci_yaml_processor.rb index 3368232..216fb90 100644 --- a/lib/gitlab_ci_yaml_processor.rb +++ b/lib/gitlab_ci_yaml_processor.rb @@ -41,7 +41,7 @@ class GitlabCiYamlProcessor def deploy_builds_for_ref(ref) deploy_builds.select do |build_attrs| refs = build_attrs.delete(:refs) - refs.empty? || refs_matches?(refs, ref) + refs.blank? || refs_matches?(refs.split(",").map(&:strip), ref) end end @@ -84,11 +84,11 @@ class GitlabCiYamlProcessor def normalized_deploy_jobs @deploy_jobs.map do |job| if job.is_a?(String) - { script: job, runner: "", refs: [], name: job[0..10].strip } + { script: job, runner: "", refs: "", name: job[0..10].strip } else { script: normalized_script(job[:script]), - refs: (job[:refs] || "").split(",").map(&:strip), + refs: job[:refs] || "", name: job[:name] || job[:script][0..10].strip, runner: job[:runner] || "", } |