aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS2
-rw-r--r--ruby/version_metadata.cc21
-rw-r--r--ruby/version_metadata_TEST.rb3
3 files changed, 26 insertions, 0 deletions
diff --git a/AUTHORS b/AUTHORS
index 5e21fa4c7..1eb7f06f9 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -43,3 +43,5 @@ Richard Brown <mynamewasgone@gmail.com>
Baptiste Daroussin <baptux@free.fr>
Contributor, zsh completion
+Alexander H. Færøy <eroyf@gentoo.org>
+ Contributer
diff --git a/ruby/version_metadata.cc b/ruby/version_metadata.cc
index de14cc3d3..c2d0100f1 100644
--- a/ruby/version_metadata.cc
+++ b/ruby/version_metadata.cc
@@ -2,6 +2,7 @@
/*
* Copyright (c) 2006 Ciaran McCreesh <ciaranm@ciaranm.org>
+ * Copyright (c) 2007 Alexander H. Færøy <eroyf@gentoo.org>
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -292,6 +293,14 @@ namespace
* Fetches run_depend information as a DepAtom
*/
/*
+ * Document-method: suggested_depend
+ *
+ * call-seq:
+ * suggested_depend -> DepAtom
+ *
+ * Fetches sugest_depend information as a DepAtom
+ */
+ /*
* Document-method: post_depend
*
* call-seq:
@@ -329,6 +338,14 @@ namespace
* Fetches run_depend information as a String
*/
/*
+ * Document-method: suggested_depend_string
+ *
+ * call-seq:
+ * suggested_depend_string -> String
+ *
+ * Fetches suggested_depend information as a String
+ */
+ /*
* Document-method: post_depend_string
*
* call-seq:
@@ -467,6 +484,8 @@ namespace
&VersionMetadataDeps::build_depend>::fetch)), 0);
rb_define_method(c_version_metadata, "run_depend", RUBY_FUNC_CAST((&DependValue<
&VersionMetadataDeps::run_depend>::fetch)), 0);
+ rb_define_method(c_version_metadata, "suggested_depend", RUBY_FUNC_CAST((&DependValue<
+ &VersionMetadataDeps::suggested_depend>::fetch)), 0);
rb_define_method(c_version_metadata, "post_depend", RUBY_FUNC_CAST((&DependValue<
&VersionMetadataDeps::post_depend>::fetch)), 0);
@@ -474,6 +493,8 @@ namespace
&VersionMetadataDeps::build_depend_string>::fetch)), 0);
rb_define_method(c_version_metadata, "run_depend_string", RUBY_FUNC_CAST((&DependValueString<
&VersionMetadataDeps::run_depend_string>::fetch)), 0);
+ rb_define_method(c_version_metadata, "suggested_depend_string", RUBY_FUNC_CAST((&DependValueString<
+ &VersionMetadataDeps::suggested_depend_string>::fetch)), 0);
rb_define_method(c_version_metadata, "post_depend_string", RUBY_FUNC_CAST((&DependValueString<
&VersionMetadataDeps::post_depend_string>::fetch)), 0);
diff --git a/ruby/version_metadata_TEST.rb b/ruby/version_metadata_TEST.rb
index 0a8226544..e589ba6a0 100644
--- a/ruby/version_metadata_TEST.rb
+++ b/ruby/version_metadata_TEST.rb
@@ -83,14 +83,17 @@ module Paludis
def test_deps
assert_kind_of AllDepAtom, vmd("1.0").build_depend
assert_kind_of AllDepAtom, vmd("1.0").run_depend
+ assert_kind_of AllDepAtom, vmd("1.0").suggested_depend
assert_kind_of AllDepAtom, vmd("1.0").post_depend
assert_equal 1, vmd("1.0").build_depend.to_a.length
assert vmd("1.0").run_depend.to_a.empty?
+ assert vmd("1.0").suggested_depend.to_a.empty?
assert vmd("1.0").post_depend.to_a.empty?
assert_equal "foo/bar", vmd("1.0").build_depend_string.gsub(/\s/, "")
assert_equal "", vmd("1.0").run_depend_string.gsub(/\s/, "")
+ assert_equal "", vmd("1.0").suggested_depend_string.gsub(/\s/, "")
assert_equal "", vmd("1.0").post_depend_string.gsub(/\s/, "")
end