aboutsummaryrefslogtreecommitdiff
path: root/ruby
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-03-25 18:05:34 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-03-25 18:05:34 +0000
commit394ca5b5149869e774c8664c034dd9d35c75273f (patch)
treebad35cf42b1a033746599c7d14396da21872dc7d /ruby
parentbf3ada970ee7a445868c6763d2e6e2d036aea608 (diff)
downloadpaludis-394ca5b5149869e774c8664c034dd9d35c75273f.tar.gz
paludis-394ca5b5149869e774c8664c034dd9d35c75273f.tar.xz
No need for favourite_repository
Diffstat (limited to 'ruby')
-rw-r--r--ruby/package_database.cc24
-rw-r--r--ruby/package_database_TEST.rb12
2 files changed, 2 insertions, 34 deletions
diff --git a/ruby/package_database.cc b/ruby/package_database.cc
index 16f9ad582..2b59680ce 100644
--- a/ruby/package_database.cc
+++ b/ruby/package_database.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2006, 2007, 2008, 2009 Ciaran McCreesh
+ * Copyright (c) 2006, 2007, 2008, 2009, 2011 Ciaran McCreesh
*
* 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
@@ -33,27 +33,6 @@ namespace
/*
* call-seq:
- * favourite_repository -> String
- *
- * Fetch the name of our 'favourite' repository
- */
- VALUE
- package_database_favourite_repository(VALUE self)
- {
- try
- {
- std::shared_ptr<PackageDatabase> * self_ptr;
- Data_Get_Struct(self, std::shared_ptr<PackageDatabase>, self_ptr);
- return rb_str_new2(stringify((*self_ptr)->favourite_repository()).c_str());
- }
- catch (const std::exception & e)
- {
- exception_to_ruby_exception(e);
- }
- }
-
- /*
- * call-seq:
* fetch_unique_qualified_package_name(package_name) -> QualifiedPackageName
* fetch_unique_qualified_package_name(package_name, filter) -> QualifiedPackageName
*
@@ -218,7 +197,6 @@ namespace
*/
c_package_database = rb_define_class_under(paludis_module(), "PackageDatabase", rb_cObject);
rb_funcall(c_package_database, rb_intern("private_class_method"), 1, rb_str_new2("new"));
- rb_define_method(c_package_database, "favourite_repository", RUBY_FUNC_CAST(&package_database_favourite_repository), 0);
rb_define_method(c_package_database, "fetch_unique_qualified_package_name",
RUBY_FUNC_CAST(&package_database_fetch_unique_qualified_package_name), -1);
rb_define_method(c_package_database, "repositories",
diff --git a/ruby/package_database_TEST.rb b/ruby/package_database_TEST.rb
index a15f8af00..fe4087fd6 100644
--- a/ruby/package_database_TEST.rb
+++ b/ruby/package_database_TEST.rb
@@ -2,7 +2,7 @@
# vim: set sw=4 sts=4 et tw=80 :
#
-# Copyright (c) 2006, 2007, 2008, 2009 Ciaran McCreesh
+# Copyright (c) 2006, 2007, 2008, 2009, 2011 Ciaran McCreesh
# Copyright (c) 2007 Richard Brown
#
# This file is part of the Paludis package manager. Paludis is free software;
@@ -35,16 +35,6 @@ module Paludis
end
end
- class TestCase_PackageDatabaseFavouriteRepository < Test::Unit::TestCase
- def env
- @env or @env = EnvironmentFactory.instance.create("")
- end
-
- def test_package_database_favourite_repository
- assert_equal "testrepo", env.package_database.favourite_repository
- end
- end
-
class TestCase_PackageDatabaseFetchUniqueQualifiedPackageName < Test::Unit::TestCase
def env
@env or @env = EnvironmentFactory.instance.create("")