Compare commits
13 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
af5a9b1c5b | |
|
|
0907a5e7a1 | |
|
|
fe1e3d563c | |
|
|
286ac30820 | |
|
|
3dd4c8e095 | |
|
|
574ae9e402 | |
|
|
9128261e0e | |
|
|
af947faab9 | |
|
|
a886e96fc9 | |
|
|
ffcff44bc1 | |
|
|
49effbd463 | |
|
|
8d8c50a5d9 | |
|
|
d12f3cc16e |
|
|
@ -2,5 +2,12 @@
|
|||
*.gem
|
||||
Gemfile.lock
|
||||
.bundle
|
||||
|
||||
# doc
|
||||
.yardoc
|
||||
vendor
|
||||
doc/
|
||||
|
||||
vendor
|
||||
|
||||
# don't include generated files
|
||||
lib/mimemagic/path.rb
|
||||
|
|
|
|||
|
|
@ -1,2 +1,6 @@
|
|||
--markup-provider=redcarpet
|
||||
--markup=markdown
|
||||
--no-private
|
||||
- README.md
|
||||
- README.md
|
||||
- LICENSE
|
||||
- CHANGELOG.md
|
||||
|
|
|
|||
22
CHANGELOG.md
22
CHANGELOG.md
|
|
@ -21,6 +21,17 @@ None
|
|||
### Fixed
|
||||
|
||||
None
|
||||
## 0.4.3
|
||||
|
||||
* Improve the development/test experience (@coldnebo, @kachick)
|
||||
|
||||
* Ensure the gem works in environments with gem caching (@haines)
|
||||
|
||||
* Add support for MacPorts installed dependencies (@brlanier)
|
||||
|
||||
* Allow using a dummy XML file in cases where the gem is just a transient
|
||||
dependency. (@Scharrels)
|
||||
|
||||
|
||||
## 0.4.2
|
||||
|
||||
|
|
@ -41,6 +52,17 @@ to avoid conflicting with other dependencies in people's applications.
|
|||
|
||||
Yanked release.
|
||||
|
||||
## 0.3.10
|
||||
|
||||
* Improve the development/test experience (@coldnebo, @kachick)
|
||||
|
||||
* Ensure the gem works in environments with gem caching (@haines)
|
||||
|
||||
* Add support for MacPorts installed dependencies (@brlanier)
|
||||
|
||||
* Allow using a dummy XML file in cases where the gem is just a transient
|
||||
dependency. (@Scharrels)
|
||||
|
||||
## 0.3.9 (2021-03-25)
|
||||
|
||||
* Resolve issues parsing the version of freedesktop.org.xml shipped with
|
||||
|
|
|
|||
3
Gemfile
3
Gemfile
|
|
@ -1,3 +1,6 @@
|
|||
source 'https://rubygems.org/'
|
||||
gemspec
|
||||
|
||||
gem 'yard'
|
||||
gem 'redcarpet'
|
||||
gem 'github-markup'
|
||||
|
|
|
|||
|
|
@ -46,10 +46,10 @@ http://www.rubydoc.info/github/mimemagicrb/mimemagic
|
|||
Tests
|
||||
=====
|
||||
|
||||
```
|
||||
bundle install
|
||||
```console
|
||||
$ bundle install
|
||||
|
||||
rake test
|
||||
$ bundle exec rake test
|
||||
```
|
||||
|
||||
Authors
|
||||
|
|
@ -62,4 +62,4 @@ Authors
|
|||
LICENSE
|
||||
=======
|
||||
|
||||
MIT
|
||||
{file:LICENSE MIT}
|
||||
|
|
|
|||
8
Rakefile
8
Rakefile
|
|
@ -1,9 +1,15 @@
|
|||
require 'rake/testtask'
|
||||
require 'rake/clean'
|
||||
|
||||
namespace :ext do
|
||||
load 'ext/mimemagic/Rakefile'
|
||||
end
|
||||
CLOBBER.include("lib/mimemagic/path.rb")
|
||||
|
||||
task :default => %w(test)
|
||||
|
||||
desc 'Run tests with minitest'
|
||||
Rake::TestTask.new do |t|
|
||||
Rake::TestTask.new("test" => "ext:default") do |t|
|
||||
t.libs << 'test'
|
||||
t.pattern = 'test/*_test.rb'
|
||||
end
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ def locate_mime_database
|
|||
(File.expand_path(ENV["FREEDESKTOP_MIME_TYPES_PATH"]) if ENV["FREEDESKTOP_MIME_TYPES_PATH"]),
|
||||
"/usr/local/share/mime/packages/freedesktop.org.xml",
|
||||
"/opt/homebrew/share/mime/packages/freedesktop.org.xml",
|
||||
"/opt/local/share/mime/packages/freedesktop.org.xml",
|
||||
"/usr/share/mime/packages/freedesktop.org.xml"
|
||||
].compact
|
||||
path = possible_paths.find { |candidate| File.exist?(candidate) }
|
||||
|
|
@ -23,11 +24,15 @@ end
|
|||
desc "Build a file pointing at the database"
|
||||
task :default do
|
||||
mime_database_path = locate_mime_database
|
||||
open("../../lib/mimemagic/path.rb", "w") do |f|
|
||||
f.print(%Q{
|
||||
target_dir = "#{ENV.fetch("RUBYARCHDIR", "../lib")}/mimemagic"
|
||||
mkdir_p target_dir
|
||||
|
||||
open("#{target_dir}/path.rb", "w") do |f|
|
||||
f.print(<<~SOURCE
|
||||
class MimeMagic
|
||||
DATABASE_PATH="#{mime_database_path}"
|
||||
end
|
||||
})
|
||||
SOURCE
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
class MimeMagic
|
||||
# MimeMagic version string
|
||||
# @api public
|
||||
VERSION = '0.4.2'
|
||||
VERSION = '0.4.3'
|
||||
end
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ Gem::Specification.new do |s|
|
|||
s.extensions = %w(ext/mimemagic/Rakefile)
|
||||
|
||||
s.summary = 'Fast mime detection by extension or content'
|
||||
s.description = 'Fast mime detection by extension or content in pure ruby (Uses freedesktop.org.xml shared-mime-info database)'
|
||||
s.description = 'Fast mime detection by extension or content (Uses freedesktop.org.xml shared-mime-info database)'
|
||||
s.homepage = 'https://github.com/mimemagicrb/mimemagic'
|
||||
s.license = 'MIT'
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue