ruby-graphviz rpm vs gem

Mamoru Tasaka mtasaka at ioa.s.u-tokyo.ac.jp
Thu Aug 12 20:59:01 UTC 2010


Mohammed Morsi wrote, at 08/12/2010 11:38 PM +9:00:
>    On 08/10/2010 02:11 PM, Guillermo Gómez wrote:
>> I have doubt here... i guess both are different sw... but look...
>>
>> [1] yum install graphviz-ruby
>>
>> vs
>>
>> [2] gem install ruby-graphviz
>>
>> should i start packaging the 2nd, what about the first? (confused)
>
> If I'm understanding it correctly, it seems that the upstream graphviz
> source provides some wrappers for various languages, including ruby
>
> http://cvs.fedoraproject.org/viewvc/rpms/graphviz/F-13/graphviz.spec?view=markup
>
> Where as the ruby-graphviz gem provides a pure-ruby implementation of
> some of this functionality (the specifics of which I'm not sure)
>
> http://github.com/glejeune/Ruby-Graphviz
>
>> This appeared on adopting rubygem-state_machine (testing it):
>>
>> $ ruby unit/state_test.rb
>> Skipping GraphViz StateMachine::State tests. `gem install ruby-graphviz`
>>    >= v0.9.0 and try again.
>> ...
>>
>> Then i tried the existing rpm [1] without luck for state_machine, the i
>> tried the gem version [2], which fixes the output warning.
>>
>>
> I imagine rubygem-state_machine depends on the ruby-graphiz modules and
> api, or if it doesn't it at least has a gem dependency listed for that.
>
> Most likely the best way to proceed is to package the
> rubygem-ruby-graphviz dependency, or perhaps you can get away with
> patching state_machine to work against graphviz-ruby (though this is
> less desirable incase of API discrepancies).
>
>     -Mo

Well, actually I checked graphviz-ruby binary rpm and state_machine-0.9.4.gem,
and
- while graphviz-ruby provides "gv" module
-------------------------------------
$ rpm -qlp graphviz-ruby-2.26.0-4.fc14.i686.rpm 2>/dev/null | grep 'ruby.1\.8.**so$'
/usr/lib/ruby/site_ruby/1.8/i386-linux/gv.so
------------------------------------
- state_machine-0.9.4.gem actually requires "graphviz" module for graphviz related
   tests:
------------------------------------
$ cat -n test/unit/event_test.rb
    761  begin
    762    # Load library
    763    require 'rubygems'
    764    gem 'ruby-graphviz', '>=0.9.0'
    765    require 'graphviz'
    793  rescue LoadError
    794    $stderr.puts 'Skipping GraphViz StateMachine::Event tests. `gem install ruby-graphviz` >= v0.9.0 and try again.'
    795  end
-----------------------------------
   So graphviz-ruby does not provide this dependency.

You can create "rubygem-ruby-graphviz" srpm from ruby-graphviz(-0.9.16).gem
and import it into Fedora if you want to enable all tests.

Regards,
Mamoru


More information about the ruby-sig mailing list