ddr-antivirus 2.0.0.rc1 → 2.0.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e16210de6035eef0c49f80ce61c7f2dee7b3fc88
4
- data.tar.gz: bb79eb5e1a8aa063773e160855589f28e54f4dfd
3
+ metadata.gz: 2ffd5af9529ee049dc5a71899538eca4cf560f4e
4
+ data.tar.gz: fc1260b30ffee28a9c87f1f3dac85c48b1f325b7
5
5
  SHA512:
6
- metadata.gz: 6d7e101d5f4d85ff8067c2ccc8a98e88cb763cc96df60f719ca6831048058aed7c3b36fa18a68fa4acb65099b78b393ff6fc1b09da5992bbd00e9a9c5d2ff1d5
7
- data.tar.gz: 7c48dd3ef7c397e26ac8fa3a0b7860336b6af332ade18327e5be016b1b98b79136f4aa8d445edeb5cdc50a139a3185ae274d9a22e2512baecf751aa283fb0e59
6
+ metadata.gz: e0b7a6bb15154227d1b17ccd1c655c45aea988d7763829032585b3194d9efc43b299b46e394f4e4f031e60aaa653373e4df1e279547af7915792fea4698866e9
7
+ data.tar.gz: 54fa84c8457471de9c657777974377887370aafc2a88ed3666f4fef4ab0525a6637ae60298632587ca0c5877f8a17a312ce66dd554f66384abdcea84528b2790
@@ -10,8 +10,18 @@ module Ddr
10
10
  module Antivirus
11
11
 
12
12
  class Error < ::StandardError; end
13
- class VirusFoundError < Error; end
14
- class ScannerError < Error; end
13
+
14
+ class ResultError < Error
15
+ attr_reader :result
16
+ def initialize(result)
17
+ super(result.to_s)
18
+ @result = result
19
+ end
20
+ end
21
+
22
+ class VirusFoundError < ResultError; end
23
+
24
+ class ScannerError < ResultError; end
15
25
 
16
26
  class << self
17
27
  attr_accessor :logger, :scanner_adapter
@@ -17,9 +17,9 @@ module Ddr::Antivirus
17
17
  when 0
18
18
  result
19
19
  when 1
20
- raise VirusFoundError, result.to_s
20
+ raise VirusFoundError.new(result)
21
21
  when 2
22
- raise ScannerError, result.to_s
22
+ raise ScannerError.new(result)
23
23
  end
24
24
  end
25
25
 
@@ -1,5 +1,5 @@
1
1
  module Ddr
2
2
  module Antivirus
3
- VERSION = "2.0.0.rc1"
3
+ VERSION = "2.0.0.rc2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ddr-antivirus
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.rc1
4
+ version: 2.0.0.rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Chandek-Stark
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-11 00:00:00.000000000 Z
11
+ date: 2015-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler