ddr-antivirus 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +7 -1
- data/lib/ddr/antivirus.rb +1 -1
- data/lib/ddr/antivirus/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: efc14d484efb97bd6e33f5a48a91f6a44eeb6162
|
4
|
+
data.tar.gz: 5c92aff679720df52e4d1c56f657c3780da900b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8eb6bff2f990d90d76a0e5bbc88cd5244dc493f20803428647e8a43b57dd28d242344d9cf7ac3e387ca6ccd54fa0bf9845e611fa0f3d7dc782d98bc9928e2a7e
|
7
|
+
data.tar.gz: 9f716e898edd7973768eb2122e4bde72876af2ff2ee7724d87cdd9532d9c0ef1447373c740fe52a50da1673e942ad8d2c6f5bc4660f846af62b21fc75900dac3
|
data/README.md
CHANGED
@@ -24,17 +24,21 @@ Ddr::Antivirus intentionally does *not* include `clamav` as a runtime dependency
|
|
24
24
|
|
25
25
|
gem 'clamav'
|
26
26
|
|
27
|
-
Ddr::Antivirus will use an adapter class for ClamAV if the Ruby gem is installed.
|
27
|
+
Ddr::Antivirus will automatically use an adapter class for ClamAV if the Ruby gem is installed.
|
28
28
|
|
29
29
|
## Usage
|
30
30
|
|
31
31
|
### Scanning ###
|
32
32
|
|
33
|
+
Class: `Ddr::Antivirus::Scanner`
|
34
|
+
|
33
35
|
```ruby
|
34
36
|
require "ddr-antivirus"
|
35
37
|
|
38
|
+
# Using the class method .scan
|
36
39
|
result = Ddr::Antivirus::Scanner.scan(path)
|
37
40
|
|
41
|
+
# Using the instance method #scan with a block
|
38
42
|
Ddr::Antivirus::Scanner.new do |scanner|
|
39
43
|
result = scanner.scan(path)
|
40
44
|
end
|
@@ -42,6 +46,8 @@ end
|
|
42
46
|
|
43
47
|
### Results
|
44
48
|
|
49
|
+
Class: `Ddr::Antivirus::ScanResult`
|
50
|
+
|
45
51
|
```ruby
|
46
52
|
>> require "ddr-antivirus"
|
47
53
|
=> true
|
data/lib/ddr/antivirus.rb
CHANGED
@@ -30,7 +30,7 @@ module Ddr
|
|
30
30
|
# Custom logger
|
31
31
|
# Defaults to Rails logger if Rails is loaded; otherwise logs to STDERR.
|
32
32
|
mattr_accessor :logger do
|
33
|
-
defined?(Rails) ? Rails.logger : Logger.new(STDERR)
|
33
|
+
defined?(Rails) && Rails.logger ? Rails.logger : Logger.new(STDERR)
|
34
34
|
end
|
35
35
|
|
36
36
|
# Scanner adapter
|