vs_rails 0.0.3 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/vs_rails/scans_controller.rb +0 -3
- data/app/models/scan.rb +9 -1
- data/lib/vs_rails/version.rb +1 -1
- metadata +18 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e3502750275c27a11a95adad1581c97550532dc9
|
4
|
+
data.tar.gz: abe3df4e2406173bc5b83a4394f52664845e3c18
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5093ce489438986af9eacc1b46b275b206ca598f58aa533b95f88747509c4f80574b667eb1eee5755598bfe66f7eeff097304615c8be52c6d564c359bde40ff5
|
7
|
+
data.tar.gz: e32ce25f0abeb1987bee2e46b4090c0c2805828dc34ae2506a969e001eac96bce0870210c110df9754ea10c125335ea2da118015425a008608071b727ea40ee4
|
@@ -7,13 +7,10 @@ class VsRails::ScansController < ApplicationController
|
|
7
7
|
|
8
8
|
if params[:status] == "clean"
|
9
9
|
scan.update_attribute(:status, "clean")
|
10
|
-
flash[:notice] = "File is OK"
|
11
10
|
elsif params[:status] == "infected"
|
12
11
|
scan.update_attribute(:status, "infected")
|
13
|
-
flash[:error] = "File is infected"
|
14
12
|
else
|
15
13
|
scan.update_attribute(:status, "unknown")
|
16
|
-
flash[:alert] = "File status unknown"
|
17
14
|
end
|
18
15
|
|
19
16
|
render nothing: true
|
data/app/models/scan.rb
CHANGED
@@ -1,3 +1,11 @@
|
|
1
1
|
class Scan < ActiveRecord::Base
|
2
|
-
|
2
|
+
validates :uuid, :filename, presence: true
|
3
|
+
validates :uuid, uniqueness: true
|
4
|
+
|
5
|
+
#TODO Move to enum
|
6
|
+
# enum status: %w(scanning clean infected error unknown)
|
7
|
+
|
8
|
+
def clean?
|
9
|
+
self.status == "clean"
|
10
|
+
end
|
3
11
|
end
|
data/lib/vs_rails/version.rb
CHANGED
metadata
CHANGED
@@ -1,29 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vs_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bit Zesty Ltd
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 4.2.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 4.2.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: virus-scanner
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.0.4
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.0.4
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: sqlite3
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|