First test

This commit is contained in:
Xavier J 2016-04-14 16:50:13 +02:00
parent 8812ba2507
commit 1a3c19f48c
4 changed files with 14 additions and 0 deletions

View file

@ -53,6 +53,8 @@ gem 'openid_connect'
gem 'rest-client'
gem 'clamav-client', require: 'clamav/client'
gem 'carrierwave'
gem 'pg'

View file

@ -100,6 +100,7 @@ GEM
chartkick (1.3.2)
childprocess (0.5.5)
ffi (~> 1.0, >= 1.0.11)
clamav-client (3.0.0)
cliver (0.3.2)
coderay (1.1.0)
coffee-rails (4.1.0)
@ -489,6 +490,7 @@ DEPENDENCIES
capybara
carrierwave
chartkick
clamav-client
coffee-rails (~> 4.1.0)
css_splitter
database_cleaner

View file

@ -0,0 +1,6 @@
class ClamavService
def self.safe_file? path
end
end

View file

@ -13,6 +13,10 @@ class PiecesJustificativesService
unless piece_justificative.save
errors << piece_justificative.errors.messages[:content][0]+" (#{piece_justificative.libelle})"+"<br>"
end
unless ClamavService.safe_file? piece_justificative.content
end
end
end
errors