filedesc 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/filedesc.rb +2 -2
- metadata +23 -32
data/lib/filedesc.rb
CHANGED
@@ -6,6 +6,7 @@ module FileDescription
|
|
6
6
|
@mime ||= get_output('-I')
|
7
7
|
@mime
|
8
8
|
end
|
9
|
+
|
9
10
|
def is_a_mime?(type)
|
10
11
|
return case type
|
11
12
|
when String
|
@@ -23,10 +24,9 @@ module FileDescription
|
|
23
24
|
def has_description?(regexp)
|
24
25
|
!(description !~ regexp)
|
25
26
|
end
|
26
|
-
|
27
27
|
|
28
28
|
def extension
|
29
|
-
self.path.scan(/\.([A-za-z0-9]+)$/).to_s
|
29
|
+
self.path.scan(/\.([A-za-z0-9]+)$/).flatten.last.to_s
|
30
30
|
end
|
31
31
|
|
32
32
|
def inspect
|
metadata
CHANGED
@@ -1,55 +1,46 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: filedesc
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.3
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
|
-
authors:
|
7
|
+
authors:
|
7
8
|
- Shairon Toledo
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
|
12
|
-
date: 2009-07-29 00:00:00 -04:00
|
13
|
-
default_executable:
|
12
|
+
date: 2012-09-19 00:00:00.000000000 Z
|
14
13
|
dependencies: []
|
15
|
-
|
16
14
|
description:
|
17
15
|
email: shairon.toledo@gmail.com
|
18
16
|
executables: []
|
19
|
-
|
20
17
|
extensions: []
|
21
|
-
|
22
18
|
extra_rdoc_files: []
|
23
|
-
|
24
|
-
files:
|
19
|
+
files:
|
25
20
|
- lib/filedesc.rb
|
26
|
-
has_rdoc: true
|
27
21
|
homepage: http://github.com/shairontoledo/filedesc
|
28
22
|
licenses: []
|
29
|
-
|
30
23
|
post_install_message:
|
31
24
|
rdoc_options: []
|
32
|
-
|
33
|
-
require_paths:
|
25
|
+
require_paths:
|
34
26
|
- lib
|
35
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
27
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
33
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
34
|
+
none: false
|
35
|
+
requirements:
|
36
|
+
- - ! '>='
|
37
|
+
- !ruby/object:Gem::Version
|
38
|
+
version: '0'
|
47
39
|
requirements: []
|
48
|
-
|
49
40
|
rubyforge_project:
|
50
|
-
rubygems_version: 1.
|
41
|
+
rubygems_version: 1.8.17
|
51
42
|
signing_key:
|
52
43
|
specification_version: 3
|
53
|
-
summary: A wrapper that works with ruby File class
|
44
|
+
summary: A wrapper that works with ruby File class and unix command 'file' to get
|
45
|
+
dynamic mime-type and content description
|
54
46
|
test_files: []
|
55
|
-
|