File tree Expand file tree Collapse file tree 4 files changed +5
-4
lines changed Expand file tree Collapse file tree 4 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 1
1
## unreleased
2
2
3
3
* Fix request marshaling (https://github.com/jnunemaker/httparty/pull/767 )
4
+ * [ Replace ` mime-types ` with ` mini_mime ` ] ( https://github.com/jnunemaker/httparty/pull/769 )
4
5
5
6
## 0.20.0
6
7
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ Gem::Specification.new do |s|
16
16
s . required_ruby_version = '>= 2.3.0'
17
17
18
18
s . add_dependency 'multi_xml' , ">= 0.5.2"
19
- s . add_dependency ( 'mime-types ', "~> 3.0" )
19
+ s . add_dependency 'mini_mime ', ">= 1.0.0"
20
20
21
21
# If this line is removed, all hard partying will cease.
22
22
s . post_install_message = "When you HTTParty, you must party hard!"
Original file line number Diff line number Diff line change 5
5
require 'uri'
6
6
require 'zlib'
7
7
require 'multi_xml'
8
- require 'mime/types '
8
+ require 'mini_mime '
9
9
require 'json'
10
10
require 'csv'
11
11
Original file line number Diff line number Diff line change @@ -84,8 +84,8 @@ def content_body(object)
84
84
85
85
def content_type ( object )
86
86
return object . content_type if object . respond_to? ( :content_type )
87
- mime = MIME :: Types . type_for ( object . path )
88
- mime . empty? ? 'application/octet-stream' : mime [ 0 ] . content_type
87
+ mime = MiniMime . lookup_by_filename ( object . path )
88
+ mime ? mime . content_type : 'application/octet-stream'
89
89
end
90
90
91
91
def file_name ( object )
You can’t perform that action at this time.
0 commit comments