clamav 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,6 @@
1
+ *.o
2
+ *.so
3
+ *.log
4
+ nbproject
5
+ pkg
6
+ Makefile
data/ChangeLog CHANGED
@@ -1,5 +1,12 @@
1
1
  ChangeLog
2
2
 
3
+ Wed Nov 11 20:33:00 MSK 2009
4
+ ----------------------------
5
+ V 0.3.1
6
+ * Fix to work on 64-bit systems
7
+ * Update to ClamAV-0.95.3
8
+ * Using Jeweler
9
+
3
10
  Tue Apr 07 20:57:00 MSK 2009
4
11
  ----------------------------
5
12
  V 0.3.0
@@ -8,7 +8,7 @@ $ sudo gem install clamav
8
8
 
9
9
  == REQUIREMENTS:
10
10
 
11
- clamav >= 0.95, libclamav6, libclamav-dev
11
+ clamav >= 0.95.3, libclamav6, libclamav-dev
12
12
 
13
13
  == SYNOPSIS:
14
14
 
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.3.1
@@ -0,0 +1,71 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{clamav}
8
+ s.version = "0.3.1"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Alexander Oryol"]
12
+ s.date = %q{2009-10-16}
13
+ s.description = %q{ClamAV Ruby bindings}
14
+ s.email = %q{eagle.alex@gmail.com}
15
+ s.extensions = ["ext/clamav/extconf.rb"]
16
+ s.extra_rdoc_files = [
17
+ "ChangeLog",
18
+ "README.rdoc"
19
+ ]
20
+ s.files = [
21
+ ".gitignore",
22
+ "ChangeLog",
23
+ "README.rdoc",
24
+ "VERSION",
25
+ "clamav.gemspec",
26
+ "ext/clamav/clamav.c",
27
+ "ext/clamav/const.h",
28
+ "ext/clamav/extconf.rb",
29
+ "rakefile",
30
+ "spec/clamav-testfiles/clam-p.rar",
31
+ "spec/clamav-testfiles/clam-ph.rar",
32
+ "spec/clamav-testfiles/clam-v2.rar",
33
+ "spec/clamav-testfiles/clam-v3.rar",
34
+ "spec/clamav-testfiles/clam.cab",
35
+ "spec/clamav-testfiles/clam.exe",
36
+ "spec/clamav-testfiles/clam.exe.bz2",
37
+ "spec/clamav-testfiles/clam.zip",
38
+ "spec/clamav-testfiles/eicar.com",
39
+ "spec/clamav-testfiles/jquery.tooltip.pack.js",
40
+ "spec/clamav-testfiles/multi.zip",
41
+ "spec/clamav-testfiles/program.doc",
42
+ "spec/clamav-testfiles/robots.txt",
43
+ "spec/clamav-testfiles/test.rar",
44
+ "spec/clamav-testfiles/test.txt",
45
+ "spec/clamav-testfiles/\320\237\321\200\320\276\320\263\321\200\320\260\320\274\320\274\320\260.doc",
46
+ "spec/spec",
47
+ "spec/spec_helper.rb",
48
+ "spec/unit/clamav_spec.rb",
49
+ "tools/rakehelp.rb"
50
+ ]
51
+ s.homepage = %q{http://github.com/eagleas/clamav}
52
+ s.rdoc_options = ["--charset=UTF-8"]
53
+ s.require_paths = ["lib"]
54
+ s.rubyforge_project = %q{clamav}
55
+ s.rubygems_version = %q{1.3.5}
56
+ s.summary = %q{ClamAV Ruby bindings}
57
+ s.test_files = [
58
+ "spec/spec_helper.rb",
59
+ "spec/unit/clamav_spec.rb"
60
+ ]
61
+
62
+ if s.respond_to? :specification_version then
63
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
64
+ s.specification_version = 3
65
+
66
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
67
+ else
68
+ end
69
+ else
70
+ end
71
+ end
@@ -26,8 +26,8 @@ static VALUE clamavr_new(argc, argv, klass)
26
26
  VALUE klass;
27
27
  {
28
28
  const char *v_fname;
29
- int v_options;
30
- int v_db_options;
29
+ VALUE v_options;
30
+ VALUE v_db_options;
31
31
  rb_scan_args(argc, argv, "02", &v_options, &v_db_options);
32
32
  if(NIL_P(v_options)){
33
33
  v_options = INT2FIX(CL_SCAN_STDOPT); /* default value */
@@ -151,7 +151,7 @@ static VALUE clamavr_scanfile(argc, argv, klass)
151
151
  Data_Get_Struct(klass, struct ClamAV_R, ptr);
152
152
 
153
153
  const char *v_fname;
154
- int v_options;
154
+ VALUE v_options;
155
155
  rb_scan_args(argc, argv, "11", &v_fname, &v_options);
156
156
  if(NIL_P(v_options)){
157
157
  v_options = ptr->options; /* stored value */
@@ -187,7 +187,7 @@ static VALUE clamavr_dbreload(VALUE self) {
187
187
  }
188
188
  cl_statfree(&ptr->dbstat);
189
189
  cl_statinidir(dbdir, &ptr->dbstat);
190
- }
190
+ }
191
191
  return INT2FIX(state);
192
192
  }
193
193
 
@@ -44,6 +44,7 @@
44
44
  rb_define_const(cClamAV, "CL_DB_PUA_INCLUDE", INT2FIX(CL_DB_PUA_INCLUDE));
45
45
  rb_define_const(cClamAV, "CL_DB_PUA_EXCLUDE", INT2FIX(CL_DB_PUA_EXCLUDE));
46
46
  rb_define_const(cClamAV, "CL_DB_COMPILED", INT2FIX(CL_DB_COMPILED)); /* internal */
47
+ rb_define_const(cClamAV, "CL_DB_DIRECTORY", INT2FIX(CL_DB_DIRECTORY)); /* internal */
47
48
 
48
49
  /* recommended db settings */
49
50
  rb_define_const(cClamAV, "CL_DB_STDOPT", INT2FIX(CL_DB_STDOPT));
@@ -75,19 +76,19 @@
75
76
 
76
77
  rb_define_const(cClamAV, "CL_INIT_DEFAULT", INT2FIX(CL_INIT_DEFAULT));
77
78
 
78
- rb_define_const(cClamAV, "CL_ENGINE_MAX_SCANSIZE", INT2FIX(CL_ENGINE_MAX_SCANSIZE));
79
- rb_define_const(cClamAV, "CL_ENGINE_MAX_FILESIZE", INT2FIX(CL_ENGINE_MAX_FILESIZE));
80
- rb_define_const(cClamAV, "CL_ENGINE_MAX_RECURSION", INT2FIX(CL_ENGINE_MAX_RECURSION));
81
- rb_define_const(cClamAV, "CL_ENGINE_MAX_FILES", INT2FIX(CL_ENGINE_MAX_FILES));
82
- rb_define_const(cClamAV, "CL_ENGINE_MIN_CC_COUNT", INT2FIX(CL_ENGINE_MIN_CC_COUNT));
83
- rb_define_const(cClamAV, "CL_ENGINE_MIN_SSN_COUNT", INT2FIX(CL_ENGINE_MIN_SSN_COUNT));
84
- rb_define_const(cClamAV, "CL_ENGINE_PUA_CATEGORIES", INT2FIX(CL_ENGINE_PUA_CATEGORIES));
85
- rb_define_const(cClamAV, "CL_ENGINE_DB_OPTIONS", INT2FIX(CL_ENGINE_DB_OPTIONS));
86
- rb_define_const(cClamAV, "CL_ENGINE_DB_VERSION", INT2FIX(CL_ENGINE_DB_VERSION));
87
- rb_define_const(cClamAV, "CL_ENGINE_DB_TIME", INT2FIX(CL_ENGINE_DB_TIME));
88
- rb_define_const(cClamAV, "CL_ENGINE_AC_ONLY", INT2FIX(CL_ENGINE_AC_ONLY));
89
- rb_define_const(cClamAV, "CL_ENGINE_AC_MINDEPTH", INT2FIX(CL_ENGINE_AC_MINDEPTH));
90
- rb_define_const(cClamAV, "CL_ENGINE_AC_MAXDEPTH", INT2FIX(CL_ENGINE_AC_MAXDEPTH));
91
- rb_define_const(cClamAV, "CL_ENGINE_TMPDIR", INT2FIX(CL_ENGINE_TMPDIR));
92
- rb_define_const(cClamAV, "CL_ENGINE_KEEPTMP", INT2FIX(CL_ENGINE_KEEPTMP));
79
+ rb_define_const(cClamAV, "CL_ENGINE_MAX_SCANSIZE", INT2FIX(CL_ENGINE_MAX_SCANSIZE)); /* uint64_t */
80
+ rb_define_const(cClamAV, "CL_ENGINE_MAX_FILESIZE", INT2FIX(CL_ENGINE_MAX_FILESIZE)); /* uint64_t */
81
+ rb_define_const(cClamAV, "CL_ENGINE_MAX_RECURSION", INT2FIX(CL_ENGINE_MAX_RECURSION)); /* uint32_t */
82
+ rb_define_const(cClamAV, "CL_ENGINE_MAX_FILES", INT2FIX(CL_ENGINE_MAX_FILES)); /* uint32_t */
83
+ rb_define_const(cClamAV, "CL_ENGINE_MIN_CC_COUNT", INT2FIX(CL_ENGINE_MIN_CC_COUNT)); /* uint32_t */
84
+ rb_define_const(cClamAV, "CL_ENGINE_MIN_SSN_COUNT", INT2FIX(CL_ENGINE_MIN_SSN_COUNT)); /* uint32_t */
85
+ rb_define_const(cClamAV, "CL_ENGINE_PUA_CATEGORIES", INT2FIX(CL_ENGINE_PUA_CATEGORIES)); /* (char *) */
86
+ rb_define_const(cClamAV, "CL_ENGINE_DB_OPTIONS", INT2FIX(CL_ENGINE_DB_OPTIONS)); /* uint32_t */
87
+ rb_define_const(cClamAV, "CL_ENGINE_DB_VERSION", INT2FIX(CL_ENGINE_DB_VERSION)); /* uint32_t */
88
+ rb_define_const(cClamAV, "CL_ENGINE_DB_TIME", INT2FIX(CL_ENGINE_DB_TIME)); /* time_t */
89
+ rb_define_const(cClamAV, "CL_ENGINE_AC_ONLY", INT2FIX(CL_ENGINE_AC_ONLY)); /* uint32_t */
90
+ rb_define_const(cClamAV, "CL_ENGINE_AC_MINDEPTH", INT2FIX(CL_ENGINE_AC_MINDEPTH)); /* uint32_t */
91
+ rb_define_const(cClamAV, "CL_ENGINE_AC_MAXDEPTH", INT2FIX(CL_ENGINE_AC_MAXDEPTH)); /* uint32_t */
92
+ rb_define_const(cClamAV, "CL_ENGINE_TMPDIR", INT2FIX(CL_ENGINE_TMPDIR)); /* (char *) */
93
+ rb_define_const(cClamAV, "CL_ENGINE_KEEPTMP", INT2FIX(CL_ENGINE_KEEPTMP)); /* uint32_t */
93
94
 
data/rakefile CHANGED
@@ -5,8 +5,6 @@ require 'rake/gempackagetask'
5
5
  require 'tools/rakehelp'
6
6
  require 'spec/rake/spectask'
7
7
 
8
- GEM_VERSION="0.3.0"
9
-
10
8
  setup_extension('clamav', 'clamav')
11
9
 
12
10
  desc "Compile native extension"
@@ -20,42 +18,30 @@ Spec::Rake::SpecTask.new do |task|
20
18
  task.verbose = true
21
19
  end
22
20
 
23
- gemspec = Gem::Specification.new do |gemspec|
24
- gemspec.name = "clamav"
25
- gemspec.version = GEM_VERSION
26
- gemspec.author = "Alexander Oryol"
27
- gemspec.email = "eagle.alex@gmail.com"
28
- gemspec.summary = "ClamAV Ruby bindings"
29
- gemspec.homepage = "http://github.com/eagleas/clamav"
30
- gemspec.rubyforge_project = 'clamav'
31
- gemspec.description = <<-EOF
32
- ClamAV Ruby bindings.
33
- EOF
34
- gemspec.files = %w( rakefile README.rdoc ChangeLog ) +
35
- Dir.glob( 'lib/*.rb' ) +
36
- Dir.glob( 'spec/*.rb' ) +
37
- Dir.glob( 'spec/unit/*.rb' ) +
38
- Dir.glob( 'spec/clamav-testfiles/*' ) +
39
- Dir.glob( 'ext/**/*.{c,rb,h}' ) +
40
- Dir.glob( 'tools/*.rb' )
41
- gemspec.require_path = 'lib'
42
- gemspec.has_rdoc = 'false'
43
- # gemspec.add_dependency('builder')
44
-
45
- if RUBY_PLATFORM.match("win32")
46
- gemspec.platform = Gem::Platform::WIN32
47
- gemspec.files += []
48
- else
49
- gemspec.platform = Gem::Platform::RUBY
50
- gemspec.extensions = Dir.glob( 'ext/**/extconf.rb' )
21
+ begin
22
+ require 'jeweler'
23
+ Jeweler::Tasks.new do |gemspec|
24
+ gemspec.name = "clamav"
25
+ gemspec.author = "Alexander Oryol"
26
+ gemspec.email = "eagle.alex@gmail.com"
27
+ gemspec.summary = "ClamAV Ruby bindings"
28
+ gemspec.homepage = "http://github.com/eagleas/clamav"
29
+ gemspec.rubyforge_project = 'clamav'
30
+ gemspec.description = "ClamAV Ruby bindings"
31
+ gemspec.require_path = 'lib'
32
+
33
+ if RUBY_PLATFORM.match("win32")
34
+ gemspec.platform = Gem::Platform::WIN32
35
+ else
36
+ gemspec.platform = Gem::Platform::RUBY
37
+ gemspec.extensions = Dir.glob( 'ext/**/extconf.rb' )
38
+ end
51
39
  end
40
+ rescue LoadError
41
+ puts "Jeweler not available. Install it with: sudo gem install jeweler -s http://gemcutter.org"
52
42
  end
53
43
 
54
44
  task :package => [:clean, :compile, :spec]
55
- Rake::GemPackageTask.new( gemspec ) do |task|
56
- task.gem_spec = gemspec
57
- task.need_tar = true
58
- end
59
45
 
60
46
  setup_clean ["ext/clamav/*.{so,o}", "ext/clamav/Makefile", "lib/clamav.so", "pkg", "*.gem"]
61
47
 
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ require 'rubygems'
3
+ require 'spec'
4
+ exit ::Spec::Runner::CommandLine.run(::Spec::Runner::OptionParser.parse(ARGV, STDERR, STDOUT))
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clamav
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Oryol
@@ -9,49 +9,58 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-04-07 00:00:00 +04:00
12
+ date: 2009-11-11 00:00:00 +03:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
16
- description: ClamAV Ruby bindings.
16
+ description: ClamAV Ruby bindings
17
17
  email: eagle.alex@gmail.com
18
18
  executables: []
19
19
 
20
20
  extensions:
21
21
  - ext/clamav/extconf.rb
22
- extra_rdoc_files: []
23
-
24
- files:
25
- - rakefile
22
+ extra_rdoc_files:
23
+ - ChangeLog
26
24
  - README.rdoc
25
+ files:
26
+ - .gitignore
27
27
  - ChangeLog
28
- - spec/spec_helper.rb
29
- - spec/unit/clamav_spec.rb
30
- - spec/clamav-testfiles/multi.zip
28
+ - README.rdoc
29
+ - VERSION
30
+ - clamav.gemspec
31
+ - ext/clamav/clamav.c
32
+ - ext/clamav/const.h
33
+ - ext/clamav/extconf.rb
34
+ - rakefile
35
+ - spec/clamav-testfiles/clam-p.rar
36
+ - spec/clamav-testfiles/clam-ph.rar
37
+ - spec/clamav-testfiles/clam-v2.rar
38
+ - spec/clamav-testfiles/clam-v3.rar
39
+ - spec/clamav-testfiles/clam.cab
40
+ - spec/clamav-testfiles/clam.exe
31
41
  - spec/clamav-testfiles/clam.exe.bz2
32
42
  - spec/clamav-testfiles/clam.zip
33
43
  - spec/clamav-testfiles/eicar.com
34
- - spec/clamav-testfiles/test.rar
35
- - "spec/clamav-testfiles/\xD0\x9F\xD1\x80\xD0\xBE\xD0\xB3\xD1\x80\xD0\xB0\xD0\xBC\xD0\xBC\xD0\xB0.doc"
36
44
  - spec/clamav-testfiles/jquery.tooltip.pack.js
45
+ - spec/clamav-testfiles/multi.zip
46
+ - spec/clamav-testfiles/program.doc
37
47
  - spec/clamav-testfiles/robots.txt
38
- - spec/clamav-testfiles/clam-v3.rar
39
- - spec/clamav-testfiles/clam.exe
40
- - spec/clamav-testfiles/clam-ph.rar
48
+ - spec/clamav-testfiles/test.rar
41
49
  - spec/clamav-testfiles/test.txt
42
- - spec/clamav-testfiles/clam.cab
43
- - spec/clamav-testfiles/clam-v2.rar
44
- - spec/clamav-testfiles/program.doc
45
- - spec/clamav-testfiles/clam-p.rar
46
- - ext/clamav/clamav.c
47
- - ext/clamav/extconf.rb
48
- - ext/clamav/const.h
50
+ - !binary |
51
+ c3BlYy9jbGFtYXYtdGVzdGZpbGVzL9Cf0YDQvtCz0YDQsNC80LzQsC5kb2M=
52
+
53
+ - spec/spec
54
+ - spec/spec_helper.rb
55
+ - spec/unit/clamav_spec.rb
49
56
  - tools/rakehelp.rb
50
- has_rdoc: "false"
57
+ has_rdoc: true
51
58
  homepage: http://github.com/eagleas/clamav
52
- post_install_message:
53
- rdoc_options: []
59
+ licenses: []
54
60
 
61
+ post_install_message:
62
+ rdoc_options:
63
+ - --charset=UTF-8
55
64
  require_paths:
56
65
  - lib
57
66
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -69,9 +78,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
69
78
  requirements: []
70
79
 
71
80
  rubyforge_project: clamav
72
- rubygems_version: 1.3.1
81
+ rubygems_version: 1.3.5
73
82
  signing_key:
74
- specification_version: 2
83
+ specification_version: 3
75
84
  summary: ClamAV Ruby bindings
76
- test_files: []
77
-
85
+ test_files:
86
+ - spec/unit/clamav_spec.rb
87
+ - spec/spec_helper.rb