Magic 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/ChangeLog +2 -0
  2. data/module/Magic.c +1 -2
  3. data/tests/ut_magic.rb +1 -1
  4. metadata +25 -45
data/ChangeLog CHANGED
@@ -1,3 +1,5 @@
1
+ 2013-03-04 : mkfs <mkfs@thoughtgang.org>
2
+ * Fixed build errors
1
3
  2013-03-03 : mkfs <mkfs@thoughtgang.org>
2
4
  * Updated Rakefile
3
5
  2010-09-19 : mkfs <mkfs@thoughtgang.org>
@@ -26,7 +26,6 @@ static const char * magic_for_io( magic_t magic, VALUE target ) {
26
26
  /* File : pass file descr to magic */
27
27
  /* NOTE: this closes the file descriptor! very bad! */
28
28
  int fd = NUM2INT(rb_funcall(target, idFileNo, 0));
29
- const char *m;
30
29
 
31
30
  rb_thread_schedule();
32
31
  return magic_descriptor( magic, fd );
@@ -40,7 +39,7 @@ static const char * magic_for_string( magic_t magic, VALUE target ) {
40
39
 
41
40
  static const char * magic_for_array( magic_t magic, VALUE target ) {
42
41
  /* Array: generate string to pass to magic */
43
- int i;
42
+ unsigned int i;
44
43
  const char * result;
45
44
  size_t buf_len = RARRAY_LEN(target);
46
45
  unsigned char * buf = calloc(buf_len, 1);
@@ -9,7 +9,7 @@ require 'Magic'
9
9
  class TC_MagicIdent < Test::Unit::TestCase
10
10
  def test_buffer
11
11
  buf = '<html><head></head><body></body></html>'
12
- assert_equal( 'HTML document text', Magic.identify(buf) )
12
+ assert_equal( 'HTML document text', Magic.identify(buf).split("\n").first )
13
13
  end
14
14
 
15
15
  def test_unix_exec_file
metadata CHANGED
@@ -1,37 +1,26 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: Magic
3
- version: !ruby/object:Gem::Version
4
- hash: 17
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.1.2
5
5
  prerelease:
6
- segments:
7
- - 1
8
- - 1
9
- - 1
10
- version: 1.1.1
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - TG Community
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2013-03-03 00:00:00 Z
12
+ date: 2013-03-05 00:00:00.000000000 Z
19
13
  dependencies: []
20
-
21
- description: |-
22
- This extension provides access to the libmagic
23
- library, which is used (e.g. by the file(1) command) to identify the
24
- type of a binary or text file based on its initial bytes. The module
25
- offers a simple interface, with the bulk of the interface with libmagic
26
- being performed behind-the-scenes.
14
+ description: ! "This extension provides access to the libmagic\n library, which is
15
+ used (e.g. by the file(1) command) to identify the\n type of a binary or text file
16
+ based on its initial bytes. The module\n offers a simple interface, with the bulk
17
+ of the interface with libmagic\n being performed behind-the-scenes."
27
18
  email: community@thoughtgang.org
28
19
  executables: []
29
-
30
- extensions:
20
+ extensions:
31
21
  - module/extconf.rb
32
22
  extra_rdoc_files: []
33
-
34
- files:
23
+ files:
35
24
  - module/Magic.c
36
25
  - module/ruby_compat.c
37
26
  - module/ruby_compat.h
@@ -47,39 +36,30 @@ files:
47
36
  - tests/ut_magic.rb
48
37
  - module/extconf.rb
49
38
  homepage: http://rubyforge.org/projects/opdis/
50
- licenses:
39
+ licenses:
51
40
  - GPLv3
52
41
  post_install_message:
53
42
  rdoc_options: []
54
-
55
- require_paths:
43
+ require_paths:
56
44
  - lib
57
- required_ruby_version: !ruby/object:Gem::Requirement
45
+ required_ruby_version: !ruby/object:Gem::Requirement
58
46
  none: false
59
- requirements:
60
- - - ">="
61
- - !ruby/object:Gem::Version
62
- hash: 59
63
- segments:
64
- - 1
65
- - 8
66
- - 6
47
+ requirements:
48
+ - - ! '>='
49
+ - !ruby/object:Gem::Version
67
50
  version: 1.8.6
68
- required_rubygems_version: !ruby/object:Gem::Requirement
51
+ required_rubygems_version: !ruby/object:Gem::Requirement
69
52
  none: false
70
- requirements:
71
- - - ">="
72
- - !ruby/object:Gem::Version
73
- hash: 3
74
- segments:
75
- - 0
76
- version: "0"
77
- requirements:
53
+ requirements:
54
+ - - ! '>='
55
+ - !ruby/object:Gem::Version
56
+ version: '0'
57
+ requirements:
78
58
  - libmagic dev file (library and header)
79
59
  rubyforge_project: opdis
80
- rubygems_version: 1.8.11
60
+ rubygems_version: 1.8.10
81
61
  signing_key:
82
62
  specification_version: 3
83
63
  summary: Ruby extension library providing an API to libmagic
84
- test_files:
64
+ test_files:
85
65
  - tests/ut_magic.rb