This gem was an exploration to see if GLib could solve the issues I had with APR in mruby-apr. While some of the issues were indeed solved, some other were introduced. The minimal (as in none) dependencies of APR and dead simple compilation make it a much better fit for my MRuby needs.
My future developments - for the time being - will be with mruby-apr.
Original readme follows
Bindings to GLib, providing standard library functionality like File.open
& Process.spawn
.
Built as an alternative to mruby-apr, with the same goals in mind.
+1 Glib
GLib maps more directly to the Ruby API's than Apache's APR, thanks mainly to a fuller API and a similar
IO abstraction via GIOStream
s. Along with the absence of awkward memory pool management, this makes
dealing with the code much easier.
While both projects were initially generated with mruby-bindings, the version used for (Update: mruby-apr has since
been upgraded to the latest mruby-bindings version, and these issues have been resolved.)mruby-glib
was more mature, generating more idiomatic binding code.
+1 APR
mruby-apr
does not require linking to LGPL code, and it easier to distribute as a single executable.
mruby-apr
is also much smaller, and the C code is better maintained. mruby-glib
still has a lot of code bloat
leftover from the initial code generation. While this won't hurt you at runtime, your compile times will suffer.
+1 for both
Both libraries will give you familiar file, directory, and environment access methods. Both can spawn processes.
Both are cross platform (at least in theory, though I've yet to build mruby-glib on Windows). Both have a CRuby compatible Dir.glob
implementation. Both are free :)
Class Methods:
::hexdigest
Class Methods:
::hexdigest
Class Methods:
::hexdigest
Class Methods:
::hexdigest
Class Methods:
::[]
::chdir
::delete
::entries
::exist?
::exists?
::foreach
::getcwd
::glob
::home
::mkdir
::mktmpdir
::pwd
::rmdir
::tmpdir
::unlink
Class Methods:
::[]
::[]=
::delete
::each
::keys
Ancestors: IO
Class Methods:
::absolute_path
::basename
::delete
::dirname
::expand_path
::extname
::join
::open
::read
Instance Methods:
#eof
#eof?
#initialize
Class Methods:
::directory?
::executable?
::exist?
::exists?
::file?
::owned?
::readable?
::size
::size?
::symlink?
::writable?
::zero?
Instance Methods:
#directory?
#executable?
#exist?
#exists?
#file?
#owned?
#readable?
#size
#size?
#symlink?
#writable?
#zero?
Class Methods:
::debug
::debug=
Instance Methods:
#def_delegator
#def_delegators
#def_instance_delegator
#def_instance_delegators
#delegate
#instance_delegate
Instance Methods:
#<<
#assert_can_read
#assert_can_write
#close
#closed?
#each
#each_byte
#each_char
#each_line
#eof
#eof?
#flush
#getbyte
#getc
#gets
#initialize
#iostream
#istream
#ostream
#print
#puts
#read
#seek
#tell
#truncate
#write
Instance Methods:
#add_observer
#changed
#changed?
#count_observers
#delete_observer
#delete_observers
#notify_observers
Instance Methods:
#==
#[]
#[]=
#delete_field
#each_pair
#eql?
#hash
#initialize
#initialize_copy
#inspect
#marshal_dump
#marshal_load
#method_missing
#modifiable
#new_ostruct_member
#table
#to_h
#to_s
Class Methods:
::popen2
::popen2e
::popen3
Class Methods:
::escape
::join
::shellescape
::shelljoin
::shellsplit
::shellwords
::split
Instance Methods:
#shellescape
#shelljoin
#shellsplit
#shellwords
Class Methods:
::spawn
::wait
::waitpid
Instance Methods:
#coredump?
#exited?
#exitstatus
#initialize
#pid
#signaled?
#success?
#termsig