Commit Graph

180 Commits

Author SHA1 Message Date
Jon Wood af5a9b1c5b Update the changelog 2021-03-26 17:37:17 +00:00
Jon Wood 0907a5e7a1 Allow the Rakefile to be used in isolation for test runs 2021-03-26 17:10:05 +00:00
Jon Wood fe1e3d563c Release 0.4.2 2021-03-26 16:59:41 +00:00
Jon Wood 286ac30820
Merge pull request #138 from coldnebo/master
fixes gem development environment
2021-03-26 16:51:49 +00:00
Jon Wood 3dd4c8e095
Merge branch 'master' into master 2021-03-26 16:50:57 +00:00
Jon Wood 574ae9e402 Add support for MacPorts
Closes #124
2021-03-26 16:49:11 +00:00
Jon Wood 9128261e0e
Merge pull request #136 from haines/write-path.rb-to-ruby-arch-dir
Write path.rb to Ruby arch dir so that it can be cached by Bundler
2021-03-26 16:45:42 +00:00
Larry Kyrala af947faab9 fixes gem development environment
- load and namespace the ext/mimemagic/Rakefile into the main Rakefile
- update test task to include ext as a prereq
- add the generated path.rb to clobber

and two fixes to ext/mimemagic/Rakefile

- more robust file load (gem dev vs gem install consistency)
- use squiggly HEREDOC to indent generated file properly

update the readme to match
add LICENSE and CHANGELOG to doc

add yardoc settings for doc writers
2021-03-26 11:45:43 -04:00
Andrew Haines a886e96fc9
Write path.rb to Ruby arch dir so that it can be cached by Bundler 2021-03-26 11:05:35 +00:00
Jon Wood ffcff44bc1
Merge pull request #130 from kachick/still-pureruby-or-not
Update gemspec to follow using nokogiri
2021-03-26 10:37:18 +00:00
Jon Wood 49effbd463
Merge pull request #129 from kachick/correct-how-to-test
Correct how to run test
2021-03-26 10:36:40 +00:00
Kenichi Kamiya 8d8c50a5d9 Update gemspec to follow using nokogiri
Follow d75f3ee5dd
2021-03-26 14:50:45 +09:00
Kenichi Kamiya d12f3cc16e Correct how to run test 2021-03-26 14:31:23 +09:00
Jon Wood f14e3bfbcf Release 0.4.2 2021-03-25 22:01:44 +00:00
Jon Wood b5ca538212 Handle the \c escape character in Tex detection (badly).
Its absolutely a hack, but that's what I have the energy for right
now.

Closes #108, #106
2021-03-25 22:00:27 +00:00
Jon Wood bc37f50e6f Rake is now required at runtime 2021-03-25 21:50:57 +00:00
Jon Wood 560ac3d747
Merge pull request #115 from NickLaMuro/ruby-2.2-compliant-Rakefile
[ex/mimemagic/Rakefile] Use older Ruby HEREDOC
2021-03-25 21:47:17 +00:00
Nick LaMuro 73d58ba63f [ex/mimemagic/Rakefile] Use older Ruby HEREDOC
The "squiggly" heredoc was introduced in later versions of Ruby, so
using a more compatible version of them with gsubing (to have the same
effect) to allow this to build on more versions of Ruby.
2021-03-25 14:41:56 -05:00
Jon Wood 00fbbd4c98
Merge pull request #109 from indiebrain/fix-mime-type-package-name-in-documentation
Fix mime type database package name in docs
2021-03-25 17:45:19 +00:00
aaron kuehler 59f46bb532
Fix mime type database package name in docs
Installing this gem on a system which does NOT contain the external
mime-type database fails indicating that the user should install the
shared-mime-types package.

```
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.
/usr/local/bundle/ruby/2.7.0/gems/mimemagic-0.3.7/ext/mimemagic/Rakefile:14:in `locate_mime_database'
/usr/local/bundle/ruby/2.7.0/gems/mimemagic-0.3.7/ext/mimemagic/Rakefile:25:in `block in <top (required)>'
/usr/local/bundle/ruby/2.7.0/gems/rake-13.0.3/exe/rake:27:in `<main>'
Tasks: TOP => default
(See full trace by running task with --trace)

rake failed, exit code 1

Gem files will remain installed in /usr/local/bundle/ruby/2.7.0/gems/mimemagic-0.3.7 for inspection.
Results logged to /usr/local/bundle/ruby/2.7.0/extensions/x86_64-linux/2.7.0/mimemagic-0.3.7/gem_make.out

An error occurred while installing mimemagic (0.3.7), and Bundler cannot continue.
Make sure that `gem install mimemagic -v '0.3.7' --source 'https://rubygems.org/'` succeeds before bundling.
```

Other places in the documentation this package is referred to as
`shared-mime-info`. This changes the error message to be consistent with
the documentation as to reduce confusion for the consumer.
2021-03-25 12:28:45 -04:00
Jon Wood 78b9da8d91 Remove unused data 2021-03-25 13:52:55 +00:00
Jon Wood dec6d5e8d1 Ensure mimemagic/overlay remains available
This will ensure that end-users who are requiring that file don't
have runtime errors.
2021-03-25 13:43:27 +00:00
Jon Wood 3d303b0a94 Remove GPL warning since all GPL licensed versions are being yanked 2021-03-25 13:12:21 +00:00
Jon Wood 3fbb641d3c Tidy up the authors list 2021-03-25 13:11:35 +00:00
Jon Wood b204f072dd Update repository references 2021-03-25 13:10:26 +00:00
Jon Wood 4259be3fae Update changelog 2021-03-25 13:03:11 +00:00
Jon Wood b14939ce82
Merge pull request #3 from jellybob/externalise-source-data
Resolve issues around GPL compliance by making use of an externally provided database. Revert to MIT license.
2021-03-25 11:28:01 +00:00
Jon Wood ed00cf0c2b Add Windows instructions 2021-03-25 10:18:36 +00:00
Jon Wood 86ed210d1a Iterate on finding a database 2021-03-25 09:28:59 +00:00
Jon Wood 9af2d220bf Clarify macOS instructions slightly 2021-03-24 23:16:02 +00:00
Jon Wood e69150736a More README updates 2021-03-24 23:04:11 +00:00
Jon Wood d52de6d1e5 Update readme for Mac OS 2021-03-24 23:01:18 +00:00
Jon Wood 62fc871983 MimeMagic is a class, not a module 2021-03-24 23:00:32 +00:00
Jon Wood d75f3ee5dd Add a dependency on Nokogiri 2021-03-24 22:55:55 +00:00
Jon Wood 9140f64e60 Remove the C extension, using a Rakefile also works 2021-03-24 22:53:43 +00:00
Jon Wood f007b38209 Add a warning about GPL licensed versions 2021-03-24 22:37:40 +00:00
Jon Wood b58e78f00f Update license referenced in the readme 2021-03-24 21:44:29 +00:00
Jon Wood 82d1bfa994 Check for existence of a MIME type database at build time.
Because we're required to build a C extension in order to do so
(don't ask, its a long story), use that C extension to make the
path provided at build time available at run time.
2021-03-24 21:04:54 +00:00
Jon Wood cd65290a28 Remove freedesktop.org.xml, and re-re-license back to MIT 2021-03-24 17:16:49 +00:00
Jon Wood 641561de3f Support for loading a freedesktop.org.xml that exists locally
Currently looks at the value of `FREEDESKTOP_MIME_TYPES_PATH` and
in `/usr/share/mime/packages/freedesktop.org.xml`, which is the
path you would expect to find that file at on a typical Linux
system.
2021-03-24 17:16:29 +00:00
Jon Wood f95088a05b Parse MIME types at runtime
This is the first step in removing the dependency on distributing
freedesktop.og.xml as part of the gem.
2021-03-24 17:16:29 +00:00
Jon Wood 56298173ca Don't care about the order types are returned in 2021-03-24 17:16:00 +00:00
Jon Wood 6520358f23 Extract table generation to a module
This allows it to be called at runtime.
2021-03-24 17:15:30 +00:00
Daniel Mendler 1c2514c084 v0.3.6 2021-03-24 17:15:05 +00:00
Daniel Mendler f46e0d387a
Update license in the readme 2021-03-24 13:08:50 +01:00
Daniel Mendler a5003ea98f
v0.4.0 2021-03-24 12:47:24 +01:00
Daniel Mendler b084ce8d50
update readme 2021-03-24 12:42:16 +01:00
Daniel Mendler c0f7b6b21a
Change license to GPLv2 (Fix #97) 2021-03-24 12:40:55 +01:00
Daniel Mendler 40dd02bb6b
add back lib/mimemagic/overlay.rb with deprecation warning 2021-01-30 19:31:37 +01:00
Daniel Mendler 0c91321419
remove overlay 2021-01-30 14:24:57 +01:00