clamrb 0.0.3 → 0.0.4

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
  SHA256:
3
- metadata.gz: 2571458cad6146ed01c79bd0f97752529fbd8f33831248f23f4a98a60f4059ec
4
- data.tar.gz: c4e2c4d64025d751a79173785647bbf5ecabdb65a31f0896f53f0d6bd5cac4ac
3
+ metadata.gz: edae5b1daaf257d6492cf0618dd3ae8f0720de57167e9eaa4c205ba6d314183e
4
+ data.tar.gz: f04b48f11fdfdaa4ef44d59360a86dff5d7bb1e616e7c7df3d74c18211eaa7de
5
5
  SHA512:
6
- metadata.gz: 554560cc7c1dda6a7b68d8639cb89d6dd68ff4b72c050d4bcbd63425b54ed0500ca9f55f414f7b318782d700ef87aed325c7c48ad35ede6f6ae5809a2b10fcff
7
- data.tar.gz: 181929942e2f0494cb6fcb525e47e1ba234f3012aeb0504cd832330d2df8bc6586a7b12dd0b24db45c3b1d0f5332a0ad3654f62a00c16ef009f5111cea12ed8b
6
+ metadata.gz: 93262571c569c10ed803dca31178db1868529396e83ed606a7b577d355609846692d6090a595c7fd48bd32cc5ddd69af0a061707af3aae586fcf3ff1d0b72f5d
7
+ data.tar.gz: aa4fad33101cabc1eff5e036d9e75dfa80c5e9895d64bc5151ed3bf9af02cfde07ac1956d638f6256147cabdb72d0a1cc1056d23508321fa51056f1842484daf
data/.gitignore CHANGED
@@ -3,3 +3,4 @@
3
3
  *.gem
4
4
  Makefile
5
5
  *.log
6
+ tmp
data/.travis.yml CHANGED
@@ -6,6 +6,7 @@ rvm:
6
6
  - 2.3
7
7
  - 2.4
8
8
  - 2.5
9
+ - 2.6
9
10
  before_install:
10
11
  - sudo apt-get install gcc make pkg-config clamav libclamav-dev clamav-freshclam
11
12
  - sudo freshclam
data/Gemfile.lock CHANGED
@@ -7,21 +7,22 @@ PATH
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- power_assert (1.1.3)
11
- rake (10.5.0)
12
- rake-compiler (1.0.5)
10
+ power_assert (2.0.4)
11
+ rake (13.2.1)
12
+ rake-compiler (1.2.8)
13
13
  rake
14
- test-unit (3.2.8)
14
+ test-unit (3.6.2)
15
15
  power_assert
16
16
 
17
17
  PLATFORMS
18
18
  ruby
19
+ x86_64-linux-gnu
19
20
 
20
21
  DEPENDENCIES
21
- bundler (~> 1.16)
22
+ bundler (~> 2.5)
22
23
  clamrb!
23
- rake (~> 10.0)
24
+ rake (>= 12.3.3)
24
25
  test-unit (~> 3.2)
25
26
 
26
27
  BUNDLED WITH
27
- 1.16.6
28
+ 2.5.21
data/README.md CHANGED
@@ -1,4 +1,5 @@
1
- # clamrb [![Build Status](https://secure.travis-ci.org/abedra/clamrb.png)](http://travis-ci.org/abedra/clamrb?branch=master) ![](https://ruby-gem-downloads-badge.herokuapp.com/clamrb) [![Gem Version](https://badge.fury.io/rb/clamrb.svg)](https://badge.fury.io/rb/clamrb)
1
+ # clamrb [![Build Status](https://secure.travis-ci.org/abedra/clamrb.png)](http://travis-ci.org/abedra/clamrb?branch=master) ![Gem](https://img.shields.io/gem/dt/clamrb.svg) [![Gem Version](http://img.shields.io/gem/v/clamrb.svg)](https://rubygems.org/gems/clamrb)
2
+
2
3
 
3
4
  This project is a Ruby gem that interfaces with the Clam AV engine using libclamav.
4
5
 
data/clamrb.gemspec CHANGED
@@ -5,7 +5,7 @@ require "clamrb/version"
5
5
  Gem::Specification.new do |s|
6
6
  s.name = 'clamrb'
7
7
  s.version = Clamrb::VERSION
8
- s.date = '2018-11-23'
8
+ s.date = '2024-10-04'
9
9
  s.licenses = ['MIT']
10
10
  s.summary = 'Ruby interface to Clam AV'
11
11
  s.description = 'Native Ruby extension for running clamav scans'
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
17
17
  s.files = %x{git ls-files}.split("\n").reject {|file| file =~ /^(test)/ }
18
18
  s.test_files = %x{git ls-files}.split("\n").select {|file| file =~ /^(test)/ }
19
19
  s.add_dependency "rake-compiler", "~> 1.0"
20
- s.add_development_dependency "bundler", "~> 1.16"
21
- s.add_development_dependency "rake", "~> 10.0"
20
+ s.add_development_dependency "bundler", "~> 2.5"
21
+ s.add_development_dependency "rake", "~> 12.3.3"
22
22
  s.add_development_dependency "test-unit", "~> 3.2"
23
23
  end
data/ext/clamrb/clamrb.c CHANGED
@@ -33,7 +33,11 @@ VALUE scan(VALUE self, VALUE filename)
33
33
  Data_Get_Struct(self, struct cl_engine, engine);
34
34
  const char *name = NULL;
35
35
  long unsigned int scanned = 0;
36
- int ret = cl_scanfile(StringValueCStr(filename), &name, &scanned, engine, CL_SCAN_STDOPT);
36
+ struct cl_scan_options scanoptions;
37
+ memset(&scanoptions, 0, sizeof(struct cl_scan_options));
38
+ scanoptions.parse |= -0;
39
+ scanoptions.general |= CL_SCAN_GENERAL_ALLMATCHES;
40
+ int ret = cl_scanfile(StringValueCStr(filename), &name, &scanned, engine, &scanoptions);
37
41
 
38
42
  VALUE clamrb = rb_const_get(rb_cObject, rb_intern("Clamrb"));
39
43
  VALUE clamrb_result = rb_const_get(clamrb, rb_intern("Result"));
@@ -58,4 +62,5 @@ void Init_clamrb(void)
58
62
  VALUE klass = rb_define_class("Clamrb", rb_cObject);
59
63
  rb_define_singleton_method(klass, "new", constructor, 0);
60
64
  rb_define_method(klass, "scan", scan, 1);
65
+ rb_undef_alloc_func(klass);
61
66
  }
@@ -1,3 +1,3 @@
1
1
  class Clamrb
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
data/test/clamrb_test.rb CHANGED
@@ -21,7 +21,7 @@ class ClamrbTest < Test::Unit::TestCase
21
21
  def test_infected_file
22
22
  result = @@clamrb.scan "test/files/eicar.txt"
23
23
  assert_equal(:infected, result.status)
24
- assert_equal("Eicar-Test-Signature", result.identifier)
24
+ assert_equal("Eicar-Signature", result.identifier)
25
25
  assert_true(result.virus?)
26
26
  end
27
27
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clamrb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Bedra
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-11-23 00:00:00.000000000 Z
11
+ date: 2024-10-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake-compiler
@@ -30,28 +30,28 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '1.16'
33
+ version: '2.5'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '1.16'
40
+ version: '2.5'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '10.0'
47
+ version: 12.3.3
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '10.0'
54
+ version: 12.3.3
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: test-unit
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -96,7 +96,7 @@ homepage: https://github.com/abedra/clamrb
96
96
  licenses:
97
97
  - MIT
98
98
  metadata: {}
99
- post_install_message:
99
+ post_install_message:
100
100
  rdoc_options: []
101
101
  require_paths:
102
102
  - lib
@@ -111,9 +111,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
111
111
  - !ruby/object:Gem::Version
112
112
  version: '0'
113
113
  requirements: []
114
- rubyforge_project:
115
- rubygems_version: 2.7.8
116
- signing_key:
114
+ rubygems_version: 3.4.20
115
+ signing_key:
117
116
  specification_version: 4
118
117
  summary: Ruby interface to Clam AV
119
118
  test_files: