clamby 1.3.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: edb162206fdfb7dde77a731db954904ff0820e83
4
- data.tar.gz: '069980cc92fa7a0fafa00023bdb8c1b7149c1515'
3
+ metadata.gz: adc57fe159207dd73de944b79537cfc443fd1dea
4
+ data.tar.gz: 23d0a824e8ea4d1a4c2f492a96cb4e9b29a27b66
5
5
  SHA512:
6
- metadata.gz: 4ae23ce1f09e0459784dfe12d69a3abaff9baaa871cd53649ecfc2e3d6394d14594286201f51710d043f68e35f29fed522a788d6b75993900c1a594c861d6ed8
7
- data.tar.gz: 3f196f2bf45fcec04813d7e923d665d97c7e5ffbdd9c205afb75d3ac7b3048c395effdeeb75154200aaf9b2857cf3c088215a1963b3adfd5a60dd2e05710f14e
6
+ metadata.gz: f08b205ae90fde3ec92e6fa0bbfd192bc6687feffe489421683cc8f964f09700a0be558c95ae66e66da943d14f6f09ee0236df1ca22639684fcf2762c9ef5a1b
7
+ data.tar.gz: 3f8af7ce3aa9716d593ee1cbd107fe2b86814ccf1741fe646ef98441353c074267b0009fe9f416cea0e7cd291ff086534c80bc384e3d36e2326a34ad6c5f14e2
@@ -1,30 +1,33 @@
1
- #v1.3.0
1
+ # v1.3.1
2
+ - [zealot128](https://github.com/kobaltz/clamby/commits/master?author=zealot128) added `silence_output` option
3
+
4
+ # v1.3.0
2
5
  - Fixed Dangerous Send on `system_command` method
3
6
 
4
- #v1.2.5
7
+ # v1.2.5
5
8
  - [bess](https://github.com/kobaltz/clamby/commits/master?author=bess) added `fdpass` option
6
9
 
7
- #v1.2.3
10
+ # v1.2.3
8
11
  - Fixed typo in config check `error_clamscan_missing` instead of `error_clamdscan_missing`
9
12
 
10
- #v1.1.1
13
+ # v1.1.1
11
14
  - Daemonize option added
12
15
  - Refactor of logic
13
16
  - Cleanup
14
17
  - Thanks to @hderms for contributing!
15
18
 
16
- #v1.1.0
19
+ # v1.1.0
17
20
  - Changed `scan()` to `safe?()`
18
21
  - Added `virus?()`
19
22
  - Added/Changed `rspec` to accomodate new/changed functionality
20
23
 
21
- #v1.0.5
24
+ # v1.0.5
22
25
  - Made default virus detection not throw a warning
23
26
  - If scanning a file that doesn't exist, `scan(path)` will return nil.
24
27
  - If scanning a file where `clamscan` doesn't exist, `scan(path)` will return nil.
25
28
  - Added test for nil result on scanning a file that doesn't exist
26
29
 
27
- #v1.0.4
30
+ # v1.0.4
28
31
  - Added tests. This WILL download a file with a virus signature. It is a safe file, but is used for the purposes of testing the detection of a virus. Regardless, use caution when running rspec as this could be potentially harmful (doubtful, but be warned).
29
32
 
30
33
  ```ruby
@@ -56,7 +59,7 @@ Finished in 17.79 seconds
56
59
 
57
60
  - Changed `scanner_exists?` method to check `clamscan -V` for version instead of just `clamscan` which was causing a virus scan on the local folder. This ended up throwing false checks since I had a virus test file in the root of the directory.
58
61
 
59
- #v1.0.3
62
+ # v1.0.3
60
63
  - Added exceptions
61
64
  - New configuration options
62
65
 
data/README.md CHANGED
@@ -6,7 +6,7 @@ This gem depends on the [clamscan](http://www.clamav.net/) and `freshclam` daemo
6
6
 
7
7
  If you have a file upload on your site and you do not scan the files for viruses then you not only compromise your software, but also the users of the software and their files. This gem's function is to simply scan a given file.
8
8
 
9
- #Usage
9
+ # Usage
10
10
 
11
11
  [Drifting Ruby Screencast](https://www.driftingruby.com/episodes/antivirus-uploads-with-clamby?utm_source=github&utm_medium=social&utm_campaign=github)
12
12
 
@@ -81,7 +81,8 @@ Setting the `fdpass` configuration option to `true` will pass the `--fdpass` opt
81
81
  :error_clamscan_missing => false,
82
82
  :error_file_missing => false,
83
83
  :error_file_virus => false,
84
- :fdpass => false
84
+ :fdpass => false,
85
+ :silence_output => false
85
86
  })
86
87
  ```
87
88
 
@@ -8,7 +8,8 @@ module Clamby
8
8
  :error_clamscan_missing => true,
9
9
  :error_file_missing => true,
10
10
  :error_file_virus => false,
11
- :fdpass => false
11
+ :fdpass => false,
12
+ :silence_output => false
12
13
  }
13
14
 
14
15
  @valid_config_keys = @config.keys
@@ -32,6 +33,7 @@ module Clamby
32
33
  cmd << '--fdpass' if @config[:fdpass]
33
34
  cmd << path
34
35
  cmd << '--no-summary'
36
+ cmd << { out: File::NULL } if @config[:silence_output]
35
37
  end
36
38
  command
37
39
  end
@@ -49,7 +51,7 @@ module Clamby
49
51
 
50
52
  def self.scanner_exists?
51
53
  return true unless @config[:check]
52
- scanner = system(clamd_executable_name, '-V')
54
+ scanner = system(clamd_executable_name, '-V', @config[:silence_output] ? { out: File::NULL } : {})
53
55
 
54
56
  return true if scanner
55
57
  return false unless @config[:error_clamscan_missing]
@@ -70,7 +72,7 @@ module Clamby
70
72
  end
71
73
 
72
74
  def self.update
73
- system("freshclam")
75
+ system("freshclam", @config[:silence_output] ? { out: File::NULL } : {})
74
76
  end
75
77
 
76
78
  def self.config
@@ -1,3 +1,3 @@
1
1
  module Clamby
2
- VERSION = "1.3.0"
2
+ VERSION = "1.3.1"
3
3
  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.3.0
4
+ version: 1.3.1
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-26 00:00:00.000000000 Z
11
+ date: 2017-09-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -97,7 +97,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
97
97
  version: '0'
98
98
  requirements: []
99
99
  rubyforge_project:
100
- rubygems_version: 2.6.12
100
+ rubygems_version: 2.6.13
101
101
  signing_key:
102
102
  specification_version: 4
103
103
  summary: Scan file uploads with ClamAV