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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 07356afadfc5b20e33d7d3ca999de568da15066a
4
- data.tar.gz: d9647a4763966736db61d308ac23a7c8288c500e
3
+ metadata.gz: efc14d484efb97bd6e33f5a48a91f6a44eeb6162
4
+ data.tar.gz: 5c92aff679720df52e4d1c56f657c3780da900b3
5
5
  SHA512:
6
- metadata.gz: 345204eb970ad8926c7931c67a2c049be6b886a0281378c6796bd2af60539f4c2fe0bf5f3e020aacc72114f68d6e8782929e76afc04fb0e9cd38ee9b5b0286e2
7
- data.tar.gz: ebf82da16aa825f54c55e9de6a1e1048dd25989f4eea8515f5a51b5dafb0a3b3c22dfee5e63ce9c7851a0e8260087cf894ce2b4ff61b042371e3a53ef04cc620
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
@@ -1,5 +1,5 @@
1
1
  module Ddr
2
2
  module Antivirus
3
- VERSION = "1.0.0"
3
+ VERSION = "1.0.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ddr-antivirus
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Chandek-Stark