Compare commits

..

No commits in common. "master" and "v0.4.2" have entirely different histories.

9 changed files with 12 additions and 59 deletions

9
.gitignore vendored
View File

@ -2,12 +2,5 @@
*.gem
Gemfile.lock
.bundle
# doc
.yardoc
doc/
vendor
# don't include generated files
lib/mimemagic/path.rb
vendor

View File

@ -1,6 +1,2 @@
--markup-provider=redcarpet
--markup=markdown
--no-private
- README.md
- LICENSE
- CHANGELOG.md
- README.md

View File

@ -21,17 +21,6 @@ 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
@ -52,17 +41,6 @@ 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

View File

@ -1,6 +1,3 @@
source 'https://rubygems.org/'
gemspec
gem 'yard'
gem 'redcarpet'
gem 'github-markup'

View File

@ -46,10 +46,10 @@ http://www.rubydoc.info/github/mimemagicrb/mimemagic
Tests
=====
```console
$ bundle install
```
bundle install
$ bundle exec rake test
rake test
```
Authors
@ -62,4 +62,4 @@ Authors
LICENSE
=======
{file:LICENSE MIT}
MIT

View File

@ -1,15 +1,9 @@
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("test" => "ext:default") do |t|
Rake::TestTask.new do |t|
t.libs << 'test'
t.pattern = 'test/*_test.rb'
end

View File

@ -6,7 +6,6 @@ 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) }
@ -24,15 +23,11 @@ end
desc "Build a file pointing at the database"
task :default do
mime_database_path = locate_mime_database
target_dir = "#{ENV.fetch("RUBYARCHDIR", "../lib")}/mimemagic"
mkdir_p target_dir
open("#{target_dir}/path.rb", "w") do |f|
f.print(<<~SOURCE
open("../../lib/mimemagic/path.rb", "w") do |f|
f.print(%Q{
class MimeMagic
DATABASE_PATH="#{mime_database_path}"
end
SOURCE
)
})
end
end

View File

@ -1,5 +1,5 @@
class MimeMagic
# MimeMagic version string
# @api public
VERSION = '0.4.3'
VERSION = '0.4.2'
end

View File

@ -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 (Uses freedesktop.org.xml shared-mime-info database)'
s.description = 'Fast mime detection by extension or content in pure ruby (Uses freedesktop.org.xml shared-mime-info database)'
s.homepage = 'https://github.com/mimemagicrb/mimemagic'
s.license = 'MIT'