Fix brakeman

This commit is contained in:
Dmitriy Zaporozhets 2015-09-09 15:41:21 +02:00
parent 870f553bf3
commit d516b02eb4
3 changed files with 14 additions and 8 deletions

View file

@ -216,7 +216,7 @@ gem 'virtus', '~> 1.0.1'
group :development do
gem "foreman"
gem 'brakeman', require: false
gem 'brakeman', '3.0.1', require: false
gem "annotate", "~> 2.6.0"
gem "letter_opener", '~> 1.1.2'

View file

@ -72,14 +72,14 @@ GEM
bootstrap-sass (3.3.5)
autoprefixer-rails (>= 5.0.0.1)
sass (>= 3.2.19)
brakeman (3.0.5)
brakeman (3.0.1)
erubis (~> 2.6)
fastercsv (~> 1.5)
haml (>= 3.0, < 5.0)
highline (~> 1.6.20)
multi_json (~> 1.2)
ruby2ruby (~> 2.1.1)
ruby_parser (~> 3.7.0)
ruby_parser (~> 3.5.0)
sass (~> 3.0)
terminal-table (~> 1.4)
browser (1.0.0)
@ -606,7 +606,7 @@ GEM
ruby2ruby (2.1.4)
ruby_parser (~> 3.1)
sexp_processor (~> 4.0)
ruby_parser (3.7.1)
ruby_parser (3.5.0)
sexp_processor (~> 4.1)
rubyntlm (0.5.2)
rubypants (0.2.0)
@ -791,7 +791,7 @@ DEPENDENCIES
better_errors (~> 1.0.1)
binding_of_caller (~> 0.7.2)
bootstrap-sass (~> 3.0)
brakeman
brakeman (= 3.0.1)
browser (~> 1.0.0)
byebug
cal-heatmap-rails (~> 0.0.1)

View file

@ -4,9 +4,15 @@ module Ci
@scope = params[:scope]
@builds = Ci::Build.order('created_at DESC').page(params[:page]).per(30)
if ["pending", "running"].include? @scope
@builds = @builds.send(@scope)
end
@builds =
case @scope
when "pending"
@builds.pending
when "running"
@builds.running
else
@builds
end
end
end
end