Skip to content

Magic, version 0.2.0.

Latest
Compare
Choose a tag to compare
@kwilczynski kwilczynski released this 26 Mar 00:04
v0.2.0

Added

  • Added Gemnasium, plus Coveralls and Code Climate integration (and hence improved code test coverage).
  • Added functionality to handle releasing the GVL for any file and/or I/O operations.
  • Added ability to Magic#flags_array to return name of each flag that is set.
  • Added naïve synchronization via Mutex#lock and Mutex#unlock methods to make interactions with libmagic more thread-safe.
  • Added ability for Travis CI test against multiple versions of vanilla libmagic.
  • Added LLVM (clang) compiler to build with to Travis CI, and fixed various issues reported by clang compiler during build-time.
  • Added ability for Magic#load to take nil as valid argument.
  • Added support for the MAGIC_CONTINUE flag so that Magic#file, Magic#buffer and Magic#descriptor methods will return an array for multiple results when appropriate.
  • Added rudimentary Vagrantfile that can be used to build a development environment.
  • Added the Guard Ruby gem for convenience, with an appropriate Guardfile.

Changed

  • Re-factored the API and cleaned up small portions of code and documentation.
  • Changed Magic#version_array and Magic#version_string methods to be a singleton methods.
  • Renamed the Magic#flags_array method to Magic#flags_to_a.
  • Changed the Magic::new method, so that it accepts an array of paths from which to load the Magic database.
  • Moved integration with File and String core classes into separate namespace.
  • Changed the behaviour not to catch the generic Magic::Error, plus always to raise on errors coming from libmagic. This is to make it more aligned with the standard library, where file and I/O related errors would raise an appropriate exception.
  • Changed behaviour consistent among various versions of libmagic adhering to the POSIX standard. This concerns the following IEEE 1003.1 standards:

Fixed

  • Fixed formatting and white spaces.
  • Fixed Travis CI build against Rubinius.
  • Fixed setting of global errno value to avoid race conditions.
  • Fixed issue with libmagic's regular expression (regex) library not working with UTF-8 (or any other wide-character encoding).
  • Fixed build to make it work with C++ compilers.
  • Fixed any C90 standard related build-time warnings.
  • Fixed version number to comply with Semantic Versioning 2 (http://semver.org/).

Deprecated

  • Retired support for Ruby 1.8.x (no support for MRI, Ruby Enterprise Edition and Rubinius).
  • Retired testing with Ruby 1.9.2 and 2.1.0, and added 2.2.0 on Travis CI.
  • Removed forward declaration of errno as it's not needed on systems with modern C/C++ libraries and compilers.
  • Removed the -Wl,--no-undefined option from LDFLAGS, as they might break on some systems.