Skip to content

Releases: jbreeden/mruby-apr

Toward Passing Ruby Spec's

Choose a tag to compare

@jbreeden jbreeden released this 13 Mar 22:06

Most updates are API additions & bugfixes for the ruby specs. Tagging another release now because globbing was broken.

  • expand_path spec fixes 0ac5362
  • File#path & Pathname#sub 4044fb5
  • pathname.hash is same as pathname.to_s.hash 7d04f87
  • Fix Pathname.join & Pathanme.parent c5617c4
  • Fix Pathname#relative? b85e7d6
  • Call to_path on Dir.entries argument 999d99d
  • Minor bug fixes e245d26
  • Add MRI FileUtils. See next commit for diff. aff681d
  • Initial backport of FileUtils 8a48a46
  • Add Errno classes & fix SystemCallError API a46d7b8
  • Finish glob update to allow multiple patterns c85f836
  • Addressing glob unit test failures 5708fa5
  • Fix observable & dir methods, add File.fnmatch & File.fnmatch? 80037d4
  • Add File.truncate and IO.read 2f48048
  • Add File::Constants module 0505ab3

File system API updates

Choose a tag to compare

@jbreeden jbreeden released this 06 Mar 04:58
  • Start using rubyspec! See results
  • Check for MRB_INT64 when building (currently doesn't understand conf.cc.defines, use conf.cc.flags instead)
  • Add the Pathname module
  • Add File::{basename,dirname,expand_path,absolute_path}
  • Add Find module. (Raises an exception for Find.prune, since MRuby has no throw/catch)
  • Dir.chdir defaults to $HOME
  • Add Dir.open, Dir.new, Dir.read, Dir.close
  • Other minor bugfixes to address some rubyspec results.

Core Cleanup

Choose a tag to compare

@jbreeden jbreeden released this 31 Jan 23:53

Since 1.0.0 I've upgraded mruby-apr to be compatible with the lastest mruby-bindings (sha: 3376122e21611d7cb1c7684230ccea9c94476a22). This means a lot of internal changes, but some public API changes too, hence the major version bump.

Breaking changes

NOTE: If you're only using the Ruby API's (never calling into the APR module) you should see no API changes.

  • All APR types have been renamed as by type_name.sub(/Apr(.*)(T|E)/, "\\1")
    • So APR::AprPoolT becomes APR::Pool, APR::AprFileT becomes APR::File, etc.
  • All APR module functions have had the apr_ prefix stripped
    • APR.apr_pool_create becomes APR.pool_create
  • Some generated bindings that were never tested have been removed. If required, they will be added back more deliberately.

Other Enhancements

  • Library is much smaller now. A lot of pre-generated code that was never used has been removed. For example, mruby_APR.c has gone from 20k+ lines to ~11k (still huge... but mruby-bindings doesn't split up the global functions yet sigh). Many other files have been removed.
  • The generated code is much friendlier than before.
  • Enum values no longer hardcoded in Ruby files. They're assigned at runtime by the current value from the library.

Version 1.0.0

Choose a tag to compare

@jbreeden jbreeden released this 28 Jan 18:37

Version 1!

This version was generated with a very young version of mruby-bindings. The C code generated is sort of clumsy. For example, it performs manual type checking instead of using mrb_get_args's format specifiers (which also sacrifices polymorphic behavior).

That said, the Ruby APIs provided are solid (with the exception of the Sockets API's... they're not quite complete), the test coverage is pretty decent, and it's easy to compile into any MRuby project.

Moving Forward

Before adding any more features, I intended to re-generate the C code with the current mruby-bindings. This poses some challenges, as the manual modifications to the binding code will have to be re-applied. However, that problem will not arise again since mruby-bindings is now smart enough not to overwrite any portions of the generated code that have been modified by the user. The newer mruby-bindings is also much easier to "teach," so hopefully the manual modifications needed will be significantly less than before.

After the mruby-bindings upgrade, I'll go back to adding features.