diff --git a/Rakefile.rb b/Rakefile.rb index bcf8c0d..bd8f3ae 100644 --- a/Rakefile.rb +++ b/Rakefile.rb @@ -1,9 +1,10 @@ require 'hoe' -$LOAD_PATH.unshift("./lib") $LOAD_PATH.unshift("./ext") -hoe = Hoe.new("igraph",'0.1.1') do |p| +require 'igraph' + +hoe = Hoe.new("igraph",IGraph::VERSION) do |p| p.author = "Alex Gutteridge" p.email = "alexg@kuicr.kyoto-u.ac.jp" diff --git a/ext/cIGraph.c b/ext/cIGraph.c index 93dfe80..c0efbaa 100644 --- a/ext/cIGraph.c +++ b/ext/cIGraph.c @@ -158,6 +158,8 @@ void Init_igraph(){ rb_include_module(cIGraph, rb_mEnumerable); + rb_define_const(cIGraph, "VERSION", rb_str_new2("0.3")); + rb_define_const(cIGraph, "EDGEORDER_ID", INT2NUM(1)); rb_define_const(cIGraph, "EDGEORDER_FROM", INT2NUM(2)); rb_define_const(cIGraph, "EDGEORDER_TO", INT2NUM(3));