ruby-filemagic 0.5.0 → 0.5.1
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 +4 -4
- data/ChangeLog +5 -0
- data/README +4 -5
- data/Rakefile +2 -3
- data/ext/{extconf.rb → filemagic/extconf.rb} +1 -1
- data/ext/{filemagic.c → filemagic/filemagic.c} +1 -1
- data/ext/{filemagic.h → filemagic/filemagic.h} +1 -1
- data/lib/filemagic.rb +6 -2
- data/lib/filemagic/version.rb +1 -1
- data/lib/ruby-filemagic.rb +1 -0
- metadata +60 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc404160b6bdf763a0a5545a8dcc3494dca9c875
|
4
|
+
data.tar.gz: 2d3998f17942cc9a98f88dfb86a9ceaf563139a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 16897fa6cf7f428b2873fe1e1386ddcfd743dfd466d4e46dbd1278ba4c817a7428516b55a3822ccd6cdfd09194f3bb3314e0c3ccb36945bd8ecfd99279fdf4c9
|
7
|
+
data.tar.gz: 276914ae240cd3412b2d7361b061a8d010cd5f552ef1c08d26f55b9e2d097b8b5f265e8699bef19ddf920bb6c15bbc1d0b519f03f1429c09fb61427078ac3bb8
|
data/ChangeLog
CHANGED
data/README
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
== VERSION
|
4
4
|
|
5
|
-
This documentation refers to filemagic version 0.5.
|
5
|
+
This documentation refers to filemagic version 0.5.1
|
6
6
|
|
7
7
|
|
8
8
|
== DESCRIPTION
|
@@ -42,11 +42,10 @@ Travis
|
|
42
42
|
|
43
43
|
== LINKS
|
44
44
|
|
45
|
-
<b></b>
|
46
45
|
Homepage (defunct):: http://grub.ath.cx/filemagic/
|
47
|
-
Documentation::
|
48
|
-
Source code::
|
49
|
-
RubyGem::
|
46
|
+
Documentation:: https://blackwinter.github.io/ruby-filemagic/
|
47
|
+
Source code:: https://github.com/blackwinter/ruby-filemagic
|
48
|
+
RubyGem:: https://rubygems.org/gems/ruby-filemagic
|
50
49
|
|
51
50
|
|
52
51
|
== AUTHORS
|
data/Rakefile
CHANGED
@@ -15,9 +15,8 @@ begin
|
|
15
15
|
:extra_files => FileList['info/*'].to_a,
|
16
16
|
:dependencies => %w[],
|
17
17
|
:extension => {
|
18
|
-
:name => '
|
19
|
-
:
|
20
|
-
:lib_dir => 'lib',
|
18
|
+
:name => 'ruby_filemagic',
|
19
|
+
:ext_name => 'filemagic',
|
21
20
|
:cross_compile => false
|
22
21
|
}
|
23
22
|
}
|
@@ -5,7 +5,7 @@ dir_config('magic')
|
|
5
5
|
|
6
6
|
if have_library('magic', 'magic_open') && have_header('magic.h')
|
7
7
|
have_header('file/patchlevel.h')
|
8
|
-
create_makefile('filemagic')
|
8
|
+
create_makefile('filemagic/ruby_filemagic')
|
9
9
|
else
|
10
10
|
abort '*** ERROR: missing required library to compile this module'
|
11
11
|
end
|
data/lib/filemagic.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require 'filemagic
|
1
|
+
require 'filemagic/ruby_filemagic'
|
2
2
|
require 'filemagic/version'
|
3
3
|
|
4
4
|
class FileMagic
|
@@ -43,7 +43,7 @@ class FileMagic
|
|
43
43
|
SIMPLE_RE = %r{([.\w\/-]+)}
|
44
44
|
|
45
45
|
@fm = Hash.new { |fm, flags|
|
46
|
-
fm.
|
46
|
+
fm.key?(key = flags.to_s) ? fm[key] : fm[key] = new(*flags)
|
47
47
|
}
|
48
48
|
|
49
49
|
class << self
|
@@ -89,6 +89,10 @@ class FileMagic
|
|
89
89
|
@simplified
|
90
90
|
end
|
91
91
|
|
92
|
+
def io(io, length = 8)
|
93
|
+
buffer(io.read(length))
|
94
|
+
end
|
95
|
+
|
92
96
|
def inspect
|
93
97
|
super.insert(-2, closed? ? ' (closed)' : '')
|
94
98
|
end
|
data/lib/filemagic/version.rb
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
require 'filemagic'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-filemagic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Travis Whitton
|
@@ -9,32 +9,75 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
13
|
-
dependencies:
|
12
|
+
date: 2014-04-15 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: hen
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - ">="
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '0'
|
21
|
+
type: :development
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '0'
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: rake
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - ">="
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '0'
|
35
|
+
type: :development
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ">="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '0'
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: test-unit
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - ">="
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '0'
|
49
|
+
type: :development
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - ">="
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '0'
|
14
56
|
description: Ruby bindings to the magic(4) library
|
15
57
|
email:
|
16
58
|
- tinymountain@gmail.com
|
17
59
|
- jens.wille@gmail.com
|
18
60
|
executables: []
|
19
61
|
extensions:
|
20
|
-
- ext/extconf.rb
|
62
|
+
- ext/filemagic/extconf.rb
|
21
63
|
extra_rdoc_files:
|
22
64
|
- README
|
23
65
|
- ChangeLog
|
24
|
-
- ext/filemagic.c
|
66
|
+
- ext/filemagic/filemagic.c
|
25
67
|
files:
|
26
|
-
- lib/filemagic.rb
|
27
|
-
- lib/filemagic/ext.rb
|
28
|
-
- lib/filemagic/version.rb
|
29
|
-
- info/example.rb
|
30
|
-
- info/filemagic.rd
|
31
68
|
- ChangeLog
|
32
69
|
- README
|
33
70
|
- Rakefile
|
34
71
|
- TODO
|
35
|
-
- ext/extconf.rb
|
36
|
-
- ext/filemagic.c
|
37
|
-
- ext/filemagic.h
|
72
|
+
- ext/filemagic/extconf.rb
|
73
|
+
- ext/filemagic/filemagic.c
|
74
|
+
- ext/filemagic/filemagic.h
|
75
|
+
- info/example.rb
|
76
|
+
- info/filemagic.rd
|
77
|
+
- lib/filemagic.rb
|
78
|
+
- lib/filemagic/ext.rb
|
79
|
+
- lib/filemagic/version.rb
|
80
|
+
- lib/ruby-filemagic.rb
|
38
81
|
- test/excel-example.xls
|
39
82
|
- test/filemagic_test.rb
|
40
83
|
- test/leaktest.rb
|
@@ -49,15 +92,14 @@ licenses:
|
|
49
92
|
metadata: {}
|
50
93
|
post_install_message: |2+
|
51
94
|
|
52
|
-
ruby-filemagic-0.5.
|
95
|
+
ruby-filemagic-0.5.1 [2014-04-15]:
|
53
96
|
|
54
|
-
*
|
55
|
-
{#8399}[https://bugs.ruby-lang.org/issues/8399]).
|
97
|
+
* New method FileMagic#io.
|
56
98
|
* Housekeeping.
|
57
99
|
|
58
100
|
rdoc_options:
|
59
101
|
- "--title"
|
60
|
-
- ruby-filemagic Application documentation (v0.5.
|
102
|
+
- ruby-filemagic Application documentation (v0.5.1)
|
61
103
|
- "--charset"
|
62
104
|
- UTF-8
|
63
105
|
- "--line-numbers"
|
@@ -78,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
78
120
|
version: '0'
|
79
121
|
requirements: []
|
80
122
|
rubyforge_project:
|
81
|
-
rubygems_version: 2.
|
123
|
+
rubygems_version: 2.2.2
|
82
124
|
signing_key:
|
83
125
|
specification_version: 4
|
84
126
|
summary: Ruby bindings to the magic(4) library
|