Closed drbrain closed 10 years ago
ready for primetime? if so i'll release a new gem...
I think so, other than missing tests. It seems your testing framework requires removed test/unit internals that I was too lazy to figure out.
strange. it worked for me? i released v1.7.0 - thank you!
-- a - http://dojo4.com - 303.747.3468 - @drawohara
life is too short to give up -- ole einar bjorndalen
On Thu, Apr 3, 2014 at 12:13 PM, Eric Hodel notifications@github.comwrote:
I think so, other than missing tests. It seems your testing framework requires removed test/unit internals that I was too lazy to figure out.
— Reply to this email directly or view it on GitHubhttps://github.com/ahoward/macaddr/pull/23#issuecomment-39485299 .
It works up to Ruby 1.9.3, with 2.0.0 and 2.1.1:
$ ruby -v
ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-darwin13.0]
$ rake test
=======================================================================================================================
@1 => /usr/local/bin/ruby -w -I ./lib -I ./test/lib /Users/drbrain/Work/git/macaddr/test/mac_test.rb
-----------------------------------------------------------------------------------------------------------------------
[warnings trimmed]
/usr/local/lib/ruby/2.1.0/test/unit.rb:676:in `<class:Runner>': undefined method `_run_suite' for class `Test::Unit::Runner' (NameError)
from /usr/local/lib/ruby/2.1.0/test/unit.rb:261:in `<module:Unit>'
from /usr/local/lib/ruby/2.1.0/test/unit.rb:15:in `<module:Test>'
from /usr/local/lib/ruby/2.1.0/test/unit.rb:7:in `<top (required)>'
from /usr/local/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/drbrain/Work/git/macaddr/test/testing.rb:1:in `<top (required)>'
from /usr/local/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/drbrain/Work/git/macaddr/test/mac_test.rb:29:in `<main>'
-----------------------------------------------------------------------------------------------------------------------
@1 <= FAILURE
-----------------------------------------------------------------------------------------------------------------------
Socket.getifaddrs is new API in ruby that gives all the available interfaces in a cross-platform manner. This is easier and faster than attempting to shell out.