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 /app/controllers | |
parent | dedabbc0243cc7aa401c49f35b4e100ff2d95fa3 (diff) | |
download | gitlab-ci-8fd43216598bc74b3dea2188ff7262081999de33.tar.gz |
Lint implementation
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/lints_controller.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/app/controllers/lints_controller.rb b/app/controllers/lints_controller.rb new file mode 100644 index 0000000..1a9cd92 --- /dev/null +++ b/app/controllers/lints_controller.rb @@ -0,0 +1,20 @@ +class LintsController < ApplicationController + def show + end + + def create + if params[:content].blank? + @status = false + @error = "Please provide content of your file" + else + @config_processor = GitlabCiYamlProcessor.new params[:content] + @status = true + end + rescue Psych::SyntaxError => e + @error = e.message + @status = false + rescue Exception => e + @error = "Undefined error" + @status = false + end +end
\ No newline at end of file |