aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-07-14 03:06:13 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-07-14 03:13:57 +0100
commitb3e1304b97c130f1b470627eeaee5abbe714cc3b (patch)
tree561d04fdd12fe4c7eedd02e5ebda43c5fcca7ce7
parent95dc39cb76e5652aabfba76707840330274efd2e (diff)
downloadpaludis-b3e1304b97c130f1b470627eeaee5abbe714cc3b.tar.gz
paludis-b3e1304b97c130f1b470627eeaee5abbe714cc3b.tar.xz
(ruby) Update Ruby for previous (continued)
-rw-r--r--ruby/package_id.cc18
-rw-r--r--ruby/package_id_TEST.rb21
2 files changed, 8 insertions, 31 deletions
diff --git a/ruby/package_id.cc b/ruby/package_id.cc
index a33c7b4..0dd35e2 100644
--- a/ruby/package_id.cc
+++ b/ruby/package_id.cc
@@ -328,22 +328,14 @@ namespace
* Our installed time
*/
/*
- * Document-method: source_origin_key
+ * Document-method: from_repositories_key
*
* call-seq:
- * source_origin_key -> MetadataStringKey
+ * from_repositories_key -> MetadataCollectionKey
*
* Our source origin repository
*/
/*
- * Document-method: binary_origin_key
- *
- * call-seq:
- * binary_origin_key -> MetadataStringKey
- *
- * Our binary origin repository
- */
- /*
* Document-method: virtual_for_key
*
* call-seq:
@@ -467,10 +459,8 @@ namespace
rb_define_method(c_package_id, "contents_key", RUBY_FUNC_CAST((&KeyValue<MetadataValueKey<std::tr1::shared_ptr<const Contents> >,
&PackageID::contents_key>::fetch)), 0);
rb_define_method(c_package_id, "installed_time_key", RUBY_FUNC_CAST((&KeyValue<MetadataTimeKey,&PackageID::installed_time_key>::fetch)), 0);
- rb_define_method(c_package_id, "source_origin_key", RUBY_FUNC_CAST((&KeyValue<MetadataValueKey<std::string>,
- &PackageID::source_origin_key>::fetch)), 0);
- rb_define_method(c_package_id, "binary_origin_key", RUBY_FUNC_CAST((&KeyValue<MetadataValueKey<std::string>,
- &PackageID::binary_origin_key>::fetch)), 0);
+ rb_define_method(c_package_id, "from_repositories_key", RUBY_FUNC_CAST((&KeyValue<MetadataCollectionKey<Set<std::string> >,
+ &PackageID::from_repositories_key>::fetch)), 0);
rb_define_method(c_package_id, "fs_location_key", RUBY_FUNC_CAST((
&KeyValue<MetadataValueKey<FSEntry>, &PackageID::fs_location_key>::fetch)), 0);
rb_define_method(c_package_id, "fetches_key", RUBY_FUNC_CAST((
diff --git a/ruby/package_id_TEST.rb b/ruby/package_id_TEST.rb
index 24486fa..437758f 100644
--- a/ruby/package_id_TEST.rb
+++ b/ruby/package_id_TEST.rb
@@ -113,8 +113,7 @@ module Paludis
:keywords_key => MetadataKeywordNameSetKey, :iuse_key => MetadataIUseFlagSetKey,
:short_description_key => MetadataStringKey, :long_description_key => MetadataStringKey,
:contents_key => MetadataContentsKey, :installed_time_key => MetadataTimeKey,
- :source_origin_key => MetadataStringKey, :binary_origin_key => MetadataStringKey,
- :masks => Array
+ :from_repositories_key => Array, :masks => Array
}.each_pair do | method, type |
assert_respond_to pid_testrepo, method
@@ -237,14 +236,6 @@ module Paludis
assert_nil pid_testrepo.installed_time_key
end
- def test_source_origin_key
- assert_nil pid_testrepo.source_origin_key
- end
-
- def test_binary_origin_key
- assert_nil pid_testrepo.binary_origin_key
- end
-
def test_keywords_key
assert_kind_of MetadataKeywordNameSetKey, pid_testrepo.keywords_key
assert_kind_of Array, pid_testrepo.keywords_key.value
@@ -331,13 +322,9 @@ module Paludis
assert_kind_of Time, pid_installed.installed_time_key.value
end
- def test_source_origin_key
- assert_kind_of MetadataStringKey, pid_installed.source_origin_key
- assert_equal 'origin_test', pid_installed.source_origin_key.value
- end
-
- def test_binary_origin_key
- assert_nil pid_installed.binary_origin_key
+ def test_from_repositories_key
+ assert_kind_of MetadataStringSetKey, pid_installed.from_repositories_key
+ assert_equal ['origin_test'], pid_installed.from_repositories_key.value
end
def test_keywords_key