Commit 286ac308 by Jon Wood Committed by GitHub

Merge pull request #138 from coldnebo/master

fixes gem development environment
parents 574ae9e4 3dd4c8e0
......@@ -2,6 +2,12 @@
*.gem
Gemfile.lock
.bundle
# doc
.yardoc
doc/
vendor
# don't include generated files
lib/mimemagic/path.rb
--markup-provider=redcarpet
--markup=markdown
--no-private
- README.md
\ No newline at end of file
- README.md
- LICENSE
- CHANGELOG.md
......@@ -48,9 +48,6 @@ Tests
```console
$ bundle install
$ cd ext/mimemagic/
$ bundle exec rake
$ popd
$ bundle exec rake test
```
......@@ -65,4 +62,4 @@ Authors
LICENSE
=======
MIT
{file:LICENSE MIT}
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
......
......@@ -24,15 +24,15 @@ end
desc "Build a file pointing at the database"
task :default do
mime_database_path = locate_mime_database
target_dir = "#{ENV.fetch("RUBYARCHDIR")}/mimemagic"
mkdir_p target_dir
open("#{target_dir}/path.rb", "w") do |f|
f.print(%Q{
f.print(<<~SOURCE
class MimeMagic
DATABASE_PATH="#{mime_database_path}"
end
})
SOURCE
)
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment