aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Richard Brown <rbrown@exherbo.org> 2007-11-06 21:27:08 +0000
committerAvatar Richard Brown <rbrown@exherbo.org> 2007-11-06 21:27:08 +0000
commit587e7d6ca580c9a5fd174cfb9efccd741c8fe33a (patch)
tree82eedf9db1c2cac5fc54711c81817f4fbb25f12d
parent5c85af6997677d4ed24c54fbd864ac61f13cc8a3 (diff)
downloadpaludis-587e7d6ca580c9a5fd174cfb9efccd741c8fe33a.tar.gz
paludis-587e7d6ca580c9a5fd174cfb9efccd741c8fe33a.tar.xz
(ruby) Add missing constants to ruby for example_about.
-rw-r--r--doc/api/ruby/example_about.rb4
-rw-r--r--ruby/paludis_ruby.cc7
2 files changed, 9 insertions, 2 deletions
diff --git a/doc/api/ruby/example_about.rb b/doc/api/ruby/example_about.rb
index 760e479..8cf0a72 100644
--- a/doc/api/ruby/example_about.rb
+++ b/doc/api/ruby/example_about.rb
@@ -4,10 +4,10 @@
require 'Paludis'
print "Built using Paludis ", Paludis::VersionMajor, ".", Paludis::VersionMinor,
- ".", Paludis::VersionMinor, Paludis::VersionSuffix
+ ".", Paludis::VersionMicro, Paludis::VersionSuffix
if not Paludis::SubversionRevision.empty?
- print Paludis::SubversionRevision
+ print ' ', Paludis::SubversionRevision
end
print "\n"
diff --git a/ruby/paludis_ruby.cc b/ruby/paludis_ruby.cc
index 33ce091..a0e86ce 100644
--- a/ruby/paludis_ruby.cc
+++ b/ruby/paludis_ruby.cc
@@ -307,6 +307,13 @@ void PALUDIS_VISIBLE paludis::ruby::init()
rb_define_const(c_paludis_module, "Version", rb_str_new2((stringify(PALUDIS_VERSION_MAJOR) + "."
+ stringify(PALUDIS_VERSION_MINOR) + "." + stringify(PALUDIS_VERSION_MICRO)).c_str()));
+ rb_define_const(c_paludis_module, "VersionMajor", INT2FIX(PALUDIS_VERSION_MAJOR));
+ rb_define_const(c_paludis_module, "VersionMinor", INT2FIX(PALUDIS_VERSION_MINOR));
+ rb_define_const(c_paludis_module, "VersionMicro", INT2FIX(PALUDIS_VERSION_MICRO));
+ rb_define_const(c_paludis_module, "VersionSuffix",
+ rb_str_new2(stringify(PALUDIS_VERSION_SUFFIX).c_str()));
+ rb_define_const(c_paludis_module, "SubversionRevision",
+ rb_str_new2(stringify(PALUDIS_SUBVERSION_REVISION).c_str()));
RegisterRubyClass::get_instance()->execute();
}