From a37cf9548c2772f5b8b7a976e4f90c0ed78a8722 Mon Sep 17 00:00:00 2001
From: "Akihiko Odaki (@fn_aki@pawoo.net)" <akihiko.odaki.4i@stu.hosei.ac.jp>
Date: Thu, 6 Jul 2017 06:58:03 +0900
Subject: [PATCH] Explicitly require MIME::Types (#4083)

---
 Gemfile                        | 1 +
 Gemfile.lock                   | 1 +
 app/models/media_attachment.rb | 2 ++
 3 files changed, 4 insertions(+)

diff --git a/Gemfile b/Gemfile
index aecd82702..6ee884a17 100644
--- a/Gemfile
+++ b/Gemfile
@@ -35,6 +35,7 @@ gem 'http_accept_language', '~> 2.1'
 gem 'httplog', '~> 0.99'
 gem 'kaminari', '~> 1.0'
 gem 'link_header', '~> 0.0'
+gem 'mime-types', '~> 3.1'
 gem 'nokogiri', '~> 1.7'
 gem 'oj', '~> 3.0'
 gem 'ostatus2', '~> 2.0'
diff --git a/Gemfile.lock b/Gemfile.lock
index dac6169d5..f0156529c 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -516,6 +516,7 @@ DEPENDENCIES
   link_header (~> 0.0)
   lograge (~> 0.5)
   microformats2 (~> 3.0)
+  mime-types (~> 3.1)
   nokogiri (~> 1.7)
   oj (~> 3.0)
   ostatus2 (~> 2.0)
diff --git a/app/models/media_attachment.rb b/app/models/media_attachment.rb
index 340109ab6..1e8c6d00a 100644
--- a/app/models/media_attachment.rb
+++ b/app/models/media_attachment.rb
@@ -18,6 +18,8 @@
 #  file_meta         :json
 #
 
+require 'mime/types'
+
 class MediaAttachment < ApplicationRecord
   self.inheritance_column = nil