Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mimemagic
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ikcrm_common
mimemagic
Commits
62fc8719
Commit
62fc8719
authored
Mar 24, 2021
by
Jon Wood
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MimeMagic is a class, not a module
parent
d75f3ee5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletions
+4
-1
ext/mimemagic/Rakefile
+4
-1
No files found.
ext/mimemagic/Rakefile
View file @
62fc8719
...
...
@@ -14,6 +14,9 @@ def locate_mime_database
# Default path on Linux installs for the MIME types database.
return
"/usr/share/mime/packages/freedesktop.org.xml"
if
File
.
exist?
(
"/usr/share/mime/packages/freedesktop.org.xml"
)
# Default path when installed with Homebrew
return
"/usr/local/Cellar/shared-mime-info/2.1/share/shared-mime-info/packages/freedesktop.org.xml"
if
File
.
exist?
(
"/usr/local/Cellar/shared-mime-info/2.1/share/shared-mime-info/packages/freedesktop.org.xml"
)
raise
"No database of MIME types could be found. Ensure you have either installed the shared-mime-types package for your distribution, or obtain a version of freedesktop.org.xml, and set FREEDESKTOP_MIME_TYPES_PATH to the location of that file."
end
...
...
@@ -22,7 +25,7 @@ task :default do
mime_database_path
=
locate_mime_database
open
(
"../../lib/mimemagic/path.rb"
,
"w"
)
do
|
f
|
f
.
print
(
%Q{
module
MimeMagic
class
MimeMagic
DATABASE_PATH="
#{
mime_database_path
}
"
end
}
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment