Commit d516b02e authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix brakeman

parent 870f553b
...@@ -216,7 +216,7 @@ gem 'virtus', '~> 1.0.1' ...@@ -216,7 +216,7 @@ gem 'virtus', '~> 1.0.1'
group :development do group :development do
gem "foreman" gem "foreman"
gem 'brakeman', require: false gem 'brakeman', '3.0.1', require: false
gem "annotate", "~> 2.6.0" gem "annotate", "~> 2.6.0"
gem "letter_opener", '~> 1.1.2' gem "letter_opener", '~> 1.1.2'
......
...@@ -72,14 +72,14 @@ GEM ...@@ -72,14 +72,14 @@ GEM
bootstrap-sass (3.3.5) bootstrap-sass (3.3.5)
autoprefixer-rails (>= 5.0.0.1) autoprefixer-rails (>= 5.0.0.1)
sass (>= 3.2.19) sass (>= 3.2.19)
brakeman (3.0.5) brakeman (3.0.1)
erubis (~> 2.6) erubis (~> 2.6)
fastercsv (~> 1.5) fastercsv (~> 1.5)
haml (>= 3.0, < 5.0) haml (>= 3.0, < 5.0)
highline (~> 1.6.20) highline (~> 1.6.20)
multi_json (~> 1.2) multi_json (~> 1.2)
ruby2ruby (~> 2.1.1) ruby2ruby (~> 2.1.1)
ruby_parser (~> 3.7.0) ruby_parser (~> 3.5.0)
sass (~> 3.0) sass (~> 3.0)
terminal-table (~> 1.4) terminal-table (~> 1.4)
browser (1.0.0) browser (1.0.0)
...@@ -606,7 +606,7 @@ GEM ...@@ -606,7 +606,7 @@ GEM
ruby2ruby (2.1.4) ruby2ruby (2.1.4)
ruby_parser (~> 3.1) ruby_parser (~> 3.1)
sexp_processor (~> 4.0) sexp_processor (~> 4.0)
ruby_parser (3.7.1) ruby_parser (3.5.0)
sexp_processor (~> 4.1) sexp_processor (~> 4.1)
rubyntlm (0.5.2) rubyntlm (0.5.2)
rubypants (0.2.0) rubypants (0.2.0)
...@@ -791,7 +791,7 @@ DEPENDENCIES ...@@ -791,7 +791,7 @@ DEPENDENCIES
better_errors (~> 1.0.1) better_errors (~> 1.0.1)
binding_of_caller (~> 0.7.2) binding_of_caller (~> 0.7.2)
bootstrap-sass (~> 3.0) bootstrap-sass (~> 3.0)
brakeman brakeman (= 3.0.1)
browser (~> 1.0.0) browser (~> 1.0.0)
byebug byebug
cal-heatmap-rails (~> 0.0.1) cal-heatmap-rails (~> 0.0.1)
......
...@@ -4,9 +4,15 @@ module Ci ...@@ -4,9 +4,15 @@ module Ci
@scope = params[:scope] @scope = params[:scope]
@builds = Ci::Build.order('created_at DESC').page(params[:page]).per(30) @builds = Ci::Build.order('created_at DESC').page(params[:page]).per(30)
if ["pending", "running"].include? @scope @builds =
@builds = @builds.send(@scope) case @scope
end when "pending"
@builds.pending
when "running"
@builds.running
else
@builds
end
end end
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment