clamby 1.6.0 → 1.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -1
- data/CHANGELOG.md +3 -0
- data/lib/clamby/command.rb +1 -1
- data/lib/clamby/version.rb +1 -1
- data/spec/clamby/command_spec.rb +10 -18
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cc73965f059691dd46a23b5d0fd7ba7d6e5d1103859bfe68124780c12ca56639
|
4
|
+
data.tar.gz: f666ead4b14e3dc024ed92ca6842928cc4256d424df0ff25299a7c5eb3c5762f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dcdb2f76042a1cd6751095e30201d635adf0e847defeaeb4d61b174a52ea6c355e4afa567e4770df388b9a2ee79e8c5ef0826486adc46e9ea21d308b4ebc83c8
|
7
|
+
data.tar.gz: 65beb709c82e4cce7804fe696bbc71d81b6951a2c38cf22ea6c1e2bd42536b55ede204c06a1b78cbba10fe778ef7db0d6b436ec02a80c0e6cafc0b0238bce8f7
|
data/.travis.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
language: ruby
|
2
2
|
before_install:
|
3
|
-
- gem install bundler -v '
|
3
|
+
- gem install bundler -v '1.17.3'
|
4
4
|
- gem install rake
|
5
5
|
- gem install rspec
|
6
6
|
rvm:
|
@@ -8,6 +8,7 @@ rvm:
|
|
8
8
|
- 2.1.1
|
9
9
|
- 2.3.4
|
10
10
|
- 2.4.1
|
11
|
+
- 2.5.3
|
11
12
|
install:
|
12
13
|
- sudo apt-get install clamav
|
13
14
|
- sudo freshclam
|
data/CHANGELOG.md
CHANGED
data/lib/clamby/command.rb
CHANGED
@@ -21,7 +21,6 @@ module Clamby
|
|
21
21
|
if Clamby.config[:daemonize]
|
22
22
|
args << '--fdpass' if Clamby.config[:fdpass]
|
23
23
|
args << '--stream' if Clamby.config[:stream]
|
24
|
-
args << "--config-file=#{Clamby.config[:config_file]}" if Clamby.config[:config_file]
|
25
24
|
end
|
26
25
|
|
27
26
|
new.run scan_executable, *args
|
@@ -74,6 +73,7 @@ module Clamby
|
|
74
73
|
|
75
74
|
def default_args
|
76
75
|
args = []
|
76
|
+
args << "--config-file=#{Clamby.config[:config_file]}" if Clamby.config[:daemonize] && Clamby.config[:config_file]
|
77
77
|
args << '--quiet' if Clamby.config[:output_level] == 'low'
|
78
78
|
args << '--verbose' if Clamby.config[:output_level] == 'high'
|
79
79
|
args
|
data/lib/clamby/version.rb
CHANGED
data/spec/clamby/command_spec.rb
CHANGED
@@ -34,7 +34,7 @@ describe Clamby::Command do
|
|
34
34
|
|
35
35
|
describe 'passing file descriptor' do
|
36
36
|
it 'does not include fdpass in the command by default' do
|
37
|
-
Clamby.configure
|
37
|
+
Clamby.configure
|
38
38
|
expect(runner).to receive(:run).with('clamscan', good_path, '--no-summary')
|
39
39
|
allow(described_class).to receive(:new).and_return(runner)
|
40
40
|
|
@@ -60,7 +60,7 @@ describe Clamby::Command do
|
|
60
60
|
|
61
61
|
describe 'streaming files to clamd' do
|
62
62
|
it 'does not include stream in the command by default' do
|
63
|
-
Clamby.configure
|
63
|
+
Clamby.configure
|
64
64
|
expect(runner).to receive(:run).with('clamscan', good_path, '--no-summary')
|
65
65
|
allow(described_class).to receive(:new).and_return(runner)
|
66
66
|
|
@@ -86,32 +86,24 @@ describe Clamby::Command do
|
|
86
86
|
|
87
87
|
describe 'specifying config-file' do
|
88
88
|
it 'does not include the parameter in the clamscan command by default' do
|
89
|
-
Clamby.configure
|
90
|
-
expect(runner).to receive(:run).with('clamscan', good_path, '--no-summary')
|
91
|
-
allow(described_class).to receive(:new).and_return(runner)
|
89
|
+
Clamby.configure
|
92
90
|
|
93
|
-
described_class.
|
91
|
+
expect(described_class.new.send(:default_args)).not_to include(a_string_matching(/--config-file/))
|
94
92
|
end
|
95
93
|
it 'does not include the parameter in the clamdscan command by default' do
|
96
|
-
Clamby.configure(daemonize: true
|
97
|
-
expect(runner).to receive(:run).with('clamdscan', good_path, '--no-summary')
|
98
|
-
allow(described_class).to receive(:new).and_return(runner)
|
94
|
+
Clamby.configure(daemonize: true)
|
99
95
|
|
100
|
-
described_class.
|
96
|
+
expect(described_class.new.send(:default_args)).not_to include(a_string_matching(/--config-file/))
|
101
97
|
end
|
102
98
|
it 'omits the parameter when invoking clamscan if it is set' do
|
103
|
-
Clamby.configure(daemonize: false,
|
104
|
-
expect(runner).to receive(:run).with('clamscan', good_path, '--no-summary')
|
105
|
-
allow(described_class).to receive(:new).and_return(runner)
|
99
|
+
Clamby.configure(daemonize: false, config_file: 'clamd.conf')
|
106
100
|
|
107
|
-
described_class.
|
101
|
+
expect(described_class.new.send(:default_args)).not_to include('--config-file=clamd.conf')
|
108
102
|
end
|
109
103
|
it 'passes the parameter when invoking clamdscan if it is set' do
|
110
|
-
Clamby.configure(daemonize: true,
|
111
|
-
expect(runner).to receive(:run).with('clamdscan', good_path, '--no-summary', '--config-file=clamd.conf')
|
112
|
-
allow(described_class).to receive(:new).and_return(runner)
|
104
|
+
Clamby.configure(daemonize: true, config_file: 'clamd.conf')
|
113
105
|
|
114
|
-
described_class.
|
106
|
+
expect(described_class.new.send(:default_args)).to include('--config-file=clamd.conf')
|
115
107
|
end
|
116
108
|
end
|
117
109
|
|
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.6.
|
4
|
+
version: 1.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kobaltz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-01-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -101,8 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
101
101
|
- !ruby/object:Gem::Version
|
102
102
|
version: '0'
|
103
103
|
requirements: []
|
104
|
-
|
105
|
-
rubygems_version: 2.7.7
|
104
|
+
rubygems_version: 3.0.2
|
106
105
|
signing_key:
|
107
106
|
specification_version: 4
|
108
107
|
summary: Scan file uploads with ClamAV
|