Skip to content

Commit

Permalink
Merge pull request #145 from khng/switch_to_mini_mime
Browse files Browse the repository at this point in the history
Replace mimemagic with mini_mime
  • Loading branch information
irphilli authored Apr 20, 2021
2 parents e06fdf6 + 679cd70 commit 0b6e811
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/tracker_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
require 'faraday'
require 'faraday_middleware'
require 'pathname'
require 'mimemagic'
require 'mini_mime'

if defined?(ActiveSupport)
require 'active_support/core_ext/object/blank'
Expand Down
2 changes: 1 addition & 1 deletion lib/tracker_api/file_utility.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module TrackerApi
class FileUtility
class << self
def get_file_upload(file)
mime_type = MimeMagic.by_path(file)
mime_type = MiniMime.lookup_by_filename(file)
{ :file => Faraday::UploadIO.new(file, mime_type) }
end

Expand Down
2 changes: 1 addition & 1 deletion tracker_api.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ Gem::Specification.new do |spec|
spec.add_dependency 'equalizer'
spec.add_dependency 'representable'
spec.add_dependency 'multi_json'
spec.add_dependency 'mimemagic'
spec.add_dependency 'mini_mime'
end

0 comments on commit 0b6e811

Please sign in to comment.