clamby 1.6.0 → 1.6.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
  SHA256:
3
- metadata.gz: 60db11bed3aec851cb64fe6f5ed12b18dc516f5f4af58942306bd4af347ea5ec
4
- data.tar.gz: 1e8aaf3f10c123cc8babc1aced65ebc2434cf18a75dff3c89f1d62cbdb7b3480
3
+ metadata.gz: cc73965f059691dd46a23b5d0fd7ba7d6e5d1103859bfe68124780c12ca56639
4
+ data.tar.gz: f666ead4b14e3dc024ed92ca6842928cc4256d424df0ff25299a7c5eb3c5762f
5
5
  SHA512:
6
- metadata.gz: 68b181d6a6e70063bcdef925521af068510ddc6cb2a1091048de176d220a01de8643ce6ad7b466e35dd8bda023a7b1d68f2636913bdfb89c05b69197b6545d77
7
- data.tar.gz: fa6c2040053c6ee41ea2a909041cb5bf9987c047203233b5a1ec8c8463ac4580612dc0227fd69e55a93d13aa8ec6533c84f94a5be1aeebbd67ab5905b1822d2b
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 '>= 1.5.3'
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
@@ -1,3 +1,6 @@
1
+ # v1.6.1
2
+ - [broder](https://github.com/kobaltz/clamby/commits?author=broder) - Fixed issue with detecting clamdscan version when using custom config file
3
+
1
4
  # v1.6.0
2
5
  - When checking version, use the executable configuration.
3
6
 
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Clamby
2
- VERSION = "1.6.0"
2
+ VERSION = "1.6.1"
3
3
  end
@@ -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(fdpass: false)
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(stream: false)
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(daemonize: false, stream: false, fdpass: false)
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.scan(good_path)
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, stream: false, fdpass: false)
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.scan(good_path)
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, stream: false, fdpass: false, config_file: 'clamd.conf')
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.scan(good_path)
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, stream: false, fdpass: false, config_file: 'clamd.conf')
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.scan(good_path)
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.0
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: 2018-12-03 00:00:00.000000000 Z
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
- rubyforge_project:
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