clamby 1.2.1 → 1.2.2

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: 3e9d5666b0aa8c0173ee6cc55ce51ffb7a651080
4
- data.tar.gz: 4fe92a7a06170042068c2f632b1736877c84b261
3
+ metadata.gz: 7d45e76216b8af229b23a32724859ebc87fdc287
4
+ data.tar.gz: de0b1c950d815d68259d7644f44ec6fd67abebe5
5
5
  SHA512:
6
- metadata.gz: 969f3a0091ac774b8e1f9f52926e7ff59533c8aa68ba0574290e9640d927433228a5d27c13b672ecb4edb35b0252799c52fb63cc08647b20866a99933b49b48e
7
- data.tar.gz: 0f4cae4fcda52a48c438b0a7ac8720df80fd0add365861f6f7f1ca5d7b2c9ef91fdc17dca78edd5291ba7bf6a5c069ab7a5dea3fe3b840d3193553943887309f
6
+ metadata.gz: ffbc18671aeee3f99fb5b28b6f1b26af16a1c551a6ff0ca8cfbbd3c97b575e11ef8f1463acdcea888a55cf75b6d6c58e10f26bfebe9a3771b73c8bb7d56c4a8a
7
+ data.tar.gz: 4b478297a7833b47bc29358554dfd8314e17cd2db42cfe75354471b8944058b109fb7fde9ce1446401e84a6864233a3f14acb1bb82084e7b89b97264dc22b7d4
@@ -1,4 +1,10 @@
1
- #v1.10
1
+ #v1.1.1
2
+ - Daemonize option added
3
+ - Refactor of logic
4
+ - Cleanup
5
+ - Thanks to @hderms for contributing!
6
+
7
+ #v1.1.0
2
8
  - Changed `scan()` to `safe?()`
3
9
  - Added `virus?()`
4
10
  - Added/Changed `rspec` to accomodate new/changed functionality
data/README.md CHANGED
@@ -73,12 +73,15 @@ There has been added additional functionality where you can override exceptions.
73
73
  ```ruby
74
74
  Clamby.configure({
75
75
  :check => false,
76
+ :daemonize => false,
76
77
  :error_clamscan_missing => false,
77
78
  :error_file_missing => false,
78
79
  :error_file_virus => false
79
80
  })
80
81
  ```
81
82
 
83
+ I highly recommend using the `daemonize` set to true. This will allow for clamscan to remain in memory and will not have to load for each virus scan. It will save several seconds per request.
84
+
82
85
  #Dependencies
83
86
 
84
87
  ***Ubuntu***
@@ -107,7 +110,7 @@ This opens the root crontab file in a text editor. Add the following line
107
110
 
108
111
  #LICENSE
109
112
 
110
- Copyright (c) 2014 kobaltz
113
+ Copyright (c) 2016 kobaltz
111
114
 
112
115
  MIT License
113
116
 
@@ -25,7 +25,7 @@ module Clamby
25
25
  def self.virus?(path)
26
26
  return nil unless scanner_exists?
27
27
  return nil unless file_exists?(path)
28
- scanner = system("#{clamd_executable_name} #{path} --no-summary")
28
+ scanner = system(clamd_executable_name, path, '--no-summary')
29
29
 
30
30
  return false if scanner
31
31
  return true unless @config[:error_file_virus]
@@ -35,7 +35,7 @@ module Clamby
35
35
 
36
36
  def self.scanner_exists?
37
37
  return true unless @config[:check]
38
- scanner = system('#{clamd_executable_name} -V')
38
+ scanner = system(clamd_executable_name, '-V')
39
39
 
40
40
  return true if scanner
41
41
  return false unless @config[:error_clamdscan_missing]
@@ -1,3 +1,3 @@
1
1
  module Clamby
2
- VERSION = "1.2.1"
2
+ VERSION = "1.2.2"
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.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - kobaltz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-03 00:00:00.000000000 Z
11
+ date: 2016-02-17 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.4.5
100
+ rubygems_version: 2.5.2
101
101
  signing_key:
102
102
  specification_version: 4
103
103
  summary: Scan file uploads with ClamAV