content_type 2.2.1 → 2.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/ext/content_type.c +4 -2
  2. metadata +78 -85
@@ -102,7 +102,8 @@ content_type_file_ext(VALUE self, char *ext)
102
102
  {
103
103
  char *filepath;
104
104
  char t;
105
- int i, j, k;
105
+ long i;
106
+ int j, k;
106
107
 
107
108
  filepath = RSTRING_PTR(rb_iv_get(self, "@filepath"));
108
109
 
@@ -183,6 +184,7 @@ file_content_type_wrap(VALUE self, VALUE path)
183
184
  {
184
185
  VALUE ct, args[1];
185
186
 
187
+ (void)self;
186
188
  SafeStringValue(path);
187
189
  args[0] = path;
188
190
  ct = rb_class_new_instance(1, args, content_type);
@@ -239,6 +241,6 @@ magic_fail(const char *error)
239
241
 
240
242
  error_message = malloc(sizeof(char *) * (strlen(format) + strlen(error)));
241
243
  sprintf((char *)error_message, format, error);
242
- rb_raise(rb_const_get(rb_cObject, rb_intern("RuntimeError")), error_message);
244
+ rb_raise(rb_const_get(rb_cObject, rb_intern("RuntimeError")), "%s", error_message);
243
245
  }
244
246
 
metadata CHANGED
@@ -1,125 +1,118 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: content_type
3
- version: !ruby/object:Gem::Version
4
- hash: 5
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.3.0
5
5
  prerelease:
6
- segments:
7
- - 2
8
- - 2
9
- - 1
10
- version: 2.2.1
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - David Turnbull
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2011-05-17 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
21
- version_requirements: &id001 !ruby/object:Gem::Requirement
22
- none: false
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- hash: 3
27
- segments:
28
- - 0
29
- version: "0"
12
+ date: 2013-02-03 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
30
15
  name: rake
31
- prerelease: false
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
32
22
  type: :runtime
33
- requirement: *id001
34
- - !ruby/object:Gem::Dependency
35
- version_requirements: &id002 !ruby/object:Gem::Requirement
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
36
25
  none: false
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- hash: 3
41
- segments:
42
- - 0
43
- version: "0"
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ - !ruby/object:Gem::Dependency
44
31
  name: rspec
45
- prerelease: false
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
46
38
  type: :runtime
47
- requirement: *id002
48
- - !ruby/object:Gem::Dependency
49
- version_requirements: &id003 !ruby/object:Gem::Requirement
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
50
41
  none: false
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- hash: 3
55
- segments:
56
- - 0
57
- version: "0"
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ - !ruby/object:Gem::Dependency
58
47
  name: jeweler
59
- prerelease: false
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
60
54
  type: :runtime
61
- requirement: *id003
62
- - !ruby/object:Gem::Dependency
63
- version_requirements: &id004 !ruby/object:Gem::Requirement
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
64
57
  none: false
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- hash: 27
69
- segments:
70
- - 0
71
- - 1
72
- - 0
73
- version: 0.1.0
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ - !ruby/object:Gem::Dependency
74
63
  name: should_be_faster
75
- prerelease: false
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: 0.1.0
76
70
  type: :runtime
77
- requirement: *id004
78
- description: " Provides ContentType#content_type, File#content_type, File::content_type\n and String#content_type methods to determine mime type\n"
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: 0.1.0
78
+ description: ! " Provides ContentType#content_type, File#content_type, File::content_type\n
79
+ \ and String#content_type methods to determine mime type\n"
79
80
  email: dsturnbull@me.com
80
81
  executables: []
81
-
82
- extensions:
82
+ extensions:
83
83
  - ext/extconf.rb
84
- extra_rdoc_files:
84
+ extra_rdoc_files:
85
85
  - README
86
- files:
86
+ files:
87
87
  - Rakefile
88
88
  - ext/content_type.c
89
89
  - ext/extconf.rb
90
90
  - README
91
91
  homepage: http://github.com/dsturnbull/content_type
92
92
  licenses: []
93
-
94
93
  post_install_message:
95
94
  rdoc_options: []
96
-
97
- require_paths:
95
+ require_paths:
98
96
  - lib
99
- required_ruby_version: !ruby/object:Gem::Requirement
97
+ required_ruby_version: !ruby/object:Gem::Requirement
100
98
  none: false
101
- requirements:
102
- - - ">="
103
- - !ruby/object:Gem::Version
104
- hash: 3
105
- segments:
99
+ requirements:
100
+ - - ! '>='
101
+ - !ruby/object:Gem::Version
102
+ version: '0'
103
+ segments:
106
104
  - 0
107
- version: "0"
108
- required_rubygems_version: !ruby/object:Gem::Requirement
105
+ hash: -1920763310540113862
106
+ required_rubygems_version: !ruby/object:Gem::Requirement
109
107
  none: false
110
- requirements:
111
- - - ">="
112
- - !ruby/object:Gem::Version
113
- hash: 3
114
- segments:
115
- - 0
116
- version: "0"
108
+ requirements:
109
+ - - ! '>='
110
+ - !ruby/object:Gem::Version
111
+ version: '0'
117
112
  requirements: []
118
-
119
113
  rubyforge_project:
120
- rubygems_version: 1.7.2
114
+ rubygems_version: 1.8.24
121
115
  signing_key:
122
116
  specification_version: 3
123
117
  summary: libmagic bindings to quickly determine content type of files
124
118
  test_files: []
125
-