From cc86b37a24cf52327ec25c7abc3809c7e5e40da5 Mon Sep 17 00:00:00 2001 From: alexgutteridge Date: Tue, 7 Aug 2007 07:29:57 +0000 Subject: [PATCH] Moved version string to lib. git-svn-id: http://igraph.rubyforge.org/svn/trunk@25 71f48855-0bbf-4aa5-930d-4df415e86613 --- Rakefile.rb | 5 +++-- ext/cIGraph.c | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) 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));