clamby 1.2.5 → 1.3.0
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/.travis.yml +2 -1
- data/CHANGELOG.md +3 -0
- data/lib/clamby.rb +7 -5
- data/lib/clamby/version.rb +1 -1
- data/spec/clamby_spec.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: edb162206fdfb7dde77a731db954904ff0820e83
|
4
|
+
data.tar.gz: '069980cc92fa7a0fafa00023bdb8c1b7149c1515'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ae23ce1f09e0459784dfe12d69a3abaff9baaa871cd53649ecfc2e3d6394d14594286201f51710d043f68e35f29fed522a788d6b75993900c1a594c861d6ed8
|
7
|
+
data.tar.gz: 3f196f2bf45fcec04813d7e923d665d97c7e5ffbdd9c205afb75d3ac7b3048c395effdeeb75154200aaf9b2857cf3c088215a1963b3adfd5a60dd2e05710f14e
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/lib/clamby.rb
CHANGED
@@ -27,17 +27,19 @@ module Clamby
|
|
27
27
|
# @param [String] path path to the file being scanned
|
28
28
|
# @return [String] command to be executed
|
29
29
|
def self.system_command(path)
|
30
|
-
command =
|
31
|
-
|
32
|
-
|
33
|
-
|
30
|
+
command = [].tap do |cmd|
|
31
|
+
cmd << clamd_executable_name
|
32
|
+
cmd << '--fdpass' if @config[:fdpass]
|
33
|
+
cmd << path
|
34
|
+
cmd << '--no-summary'
|
35
|
+
end
|
34
36
|
command
|
35
37
|
end
|
36
38
|
|
37
39
|
def self.virus?(path)
|
38
40
|
return nil unless scanner_exists?
|
39
41
|
return nil unless file_exists?(path)
|
40
|
-
scanner = system(system_command(path))
|
42
|
+
scanner = system(*system_command(path))
|
41
43
|
|
42
44
|
return false if scanner
|
43
45
|
return true unless @config[:error_file_virus]
|
data/lib/clamby/version.rb
CHANGED
data/spec/clamby_spec.rb
CHANGED
@@ -61,11 +61,11 @@ describe Clamby do
|
|
61
61
|
end
|
62
62
|
it 'does not include fdpass in the command by default' do
|
63
63
|
Clamby.configure(fdpass: false)
|
64
|
-
expect(Clamby.system_command(good_path)).to eq "clamscan
|
64
|
+
expect(Clamby.system_command(good_path)).to eq ["clamscan", good_path, "--no-summary"]
|
65
65
|
end
|
66
66
|
it 'passes the fdpass option when invoking clamscan if it is set' do
|
67
67
|
Clamby.configure(fdpass: true)
|
68
|
-
expect(Clamby.system_command(good_path)).to eq "clamscan --fdpass
|
68
|
+
expect(Clamby.system_command(good_path)).to eq ["clamscan", "--fdpass", good_path, "--no-summary"]
|
69
69
|
end
|
70
70
|
end
|
71
71
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: clamby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kobaltz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-08-
|
11
|
+
date: 2017-08-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|