aboutsummaryrefslogtreecommitdiff
path: root/ruby
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-04-12 14:28:03 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-04-12 14:45:22 +0100
commit120c58323950219e16d8fe22693af221d2887f9b (patch)
tree2df48534abea1af807750dbbd0ce3ac9922bd44b /ruby
parent271074eb112e276d5ba25f91785431911ee3443f (diff)
downloadpaludis-120c58323950219e16d8fe22693af221d2887f9b.tar.gz
paludis-120c58323950219e16d8fe22693af221d2887f9b.tar.xz
MetadataKey value -> parse_value
Diffstat (limited to 'ruby')
-rw-r--r--ruby/choice_TEST.rb2
-rw-r--r--ruby/contents_TEST.rb16
-rw-r--r--ruby/dep_spec_TEST.rb4
-rw-r--r--ruby/environment_TEST.rb6
-rw-r--r--ruby/metadata_key.cc94
-rw-r--r--ruby/package_id_TEST.rb40
-rw-r--r--ruby/repository_TEST.rb28
7 files changed, 95 insertions, 95 deletions
diff --git a/ruby/choice_TEST.rb b/ruby/choice_TEST.rb
index 20f9ddfa0..0432b06cc 100644
--- a/ruby/choice_TEST.rb
+++ b/ruby/choice_TEST.rb
@@ -37,7 +37,7 @@ module Paludis
end
def choices
- pid.choices_key.value
+ pid.choices_key.parse_value
end
def use_choice
diff --git a/ruby/contents_TEST.rb b/ruby/contents_TEST.rb
index d53b5f9fe..926f85d09 100644
--- a/ruby/contents_TEST.rb
+++ b/ruby/contents_TEST.rb
@@ -59,7 +59,7 @@ module Paludis
def test_name
ce = get_ce
- assert_equal 'test', ce.location_key.value
+ assert_equal 'test', ce.location_key.parse_value
end
end
@@ -93,7 +93,7 @@ module Paludis
def test_name
ce = get_ce
- assert_equal 'test', ce.location_key.value
+ assert_equal 'test', ce.location_key.parse_value
end
end
@@ -127,7 +127,7 @@ module Paludis
def test_name
ce = get_ce
- assert_equal 'test', ce.location_key.value
+ assert_equal 'test', ce.location_key.parse_value
end
end
@@ -170,12 +170,12 @@ module Paludis
def test_name
ce = get_ce
- assert_equal 'test_name', ce.location_key.value
+ assert_equal 'test_name', ce.location_key.parse_value
end
def test_target
ce = get_ce
- assert_equal 'test_target', ce.target_key.value
+ assert_equal 'test_target', ce.target_key.parse_value
end
end
class TestCase_Contents < Test::Unit::TestCase
@@ -216,13 +216,13 @@ module Paludis
c.add(cfe)
assert_equal 1, c.entries.length
- assert_equal cfe.location_key.value, c.entries.first.location_key.value
+ assert_equal cfe.location_key.parse_value, c.entries.first.location_key.parse_value
c.add(cse)
assert_equal 2, c.entries.length
- assert_equal cfe.location_key.value, c.entries.first.location_key.value
- assert_equal cse.location_key.value, c.entries.last.location_key.value
+ assert_equal cfe.location_key.parse_value, c.entries.first.location_key.parse_value
+ assert_equal cse.location_key.parse_value, c.entries.last.location_key.parse_value
end
end
diff --git a/ruby/dep_spec_TEST.rb b/ruby/dep_spec_TEST.rb
index 21fc51956..d8c7f052e 100644
--- a/ruby/dep_spec_TEST.rb
+++ b/ruby/dep_spec_TEST.rb
@@ -262,7 +262,7 @@ module Paludis
end
def test_composites
- spec = env[Selection::RequireExactlyOne.new(Generator::Package.new("foo/bar"))].last.build_dependencies_key.value
+ spec = env[Selection::RequireExactlyOne.new(Generator::Package.new("foo/bar"))].last.build_dependencies_key.parse_value
assert_kind_of AllDepSpec, spec
assert_equal 2, spec.to_a.length
@@ -323,7 +323,7 @@ module Paludis
end
def test_uri_labels_dep_spec
- specs = spec_key.value.to_a
+ specs = spec_key.parse_value.to_a
assert_equal 6, specs.length
specs.each do | spec |
diff --git a/ruby/environment_TEST.rb b/ruby/environment_TEST.rb
index fd348ecdc..d69dd8ec8 100644
--- a/ruby/environment_TEST.rb
+++ b/ruby/environment_TEST.rb
@@ -325,19 +325,19 @@ module Paludis
assert_respond_to env, :format_key
assert_not_nil env.format_key
assert_kind_of MetadataStringKey, env.format_key
- assert_equal 'paludis', env.format_key.value
+ assert_equal 'paludis', env.format_key.parse_value
assert_respond_to ncenv, :format_key
assert_not_nil ncenv.format_key
assert_kind_of MetadataStringKey, ncenv.format_key
- assert_equal 'no_config', ncenv.format_key.value
+ assert_equal 'no_config', ncenv.format_key.parse_value
end
def test_config_location_key
assert_respond_to env, :config_location_key
assert_not_nil env.config_location_key
assert_kind_of MetadataFSPathKey, env.config_location_key
- assert_equal Dir.getwd().to_s + "/environment_TEST_dir/home/.paludis", env.config_location_key.value
+ assert_equal Dir.getwd().to_s + "/environment_TEST_dir/home/.paludis", env.config_location_key.parse_value
assert_respond_to ncenv, :config_location_key
assert_nil ncenv.config_location_key
diff --git a/ruby/metadata_key.cc b/ruby/metadata_key.cc
index 8c4b707b2..43bfb2032 100644
--- a/ruby/metadata_key.cc
+++ b/ruby/metadata_key.cc
@@ -259,7 +259,7 @@ namespace
/*
* call-seq:
- * value -> PackageID
+ * parse_value -> PackageID
*
* Our Value.
* */
@@ -270,7 +270,7 @@ namespace
{
std::shared_ptr<const MetadataKey> * self_ptr;
Data_Get_Struct(self, std::shared_ptr<const MetadataKey>, self_ptr);
- return package_id_to_value((std::static_pointer_cast<const MetadataValueKey<std::shared_ptr<const PackageID> > >(*self_ptr))->value());
+ return package_id_to_value((std::static_pointer_cast<const MetadataValueKey<std::shared_ptr<const PackageID> > >(*self_ptr))->parse_value());
}
catch (const std::exception & e)
{
@@ -280,7 +280,7 @@ namespace
/*
* call-seq:
- * value -> String
+ * parse_value -> String
*
* Our Value.
* */
@@ -291,7 +291,7 @@ namespace
{
std::shared_ptr<const MetadataKey> * self_ptr;
Data_Get_Struct(self, std::shared_ptr<const MetadataKey>, self_ptr);
- return rb_str_new2((std::static_pointer_cast<const MetadataValueKey<std::string> >(*self_ptr))->value().c_str());
+ return rb_str_new2((std::static_pointer_cast<const MetadataValueKey<std::string> >(*self_ptr))->parse_value().c_str());
}
catch (const std::exception & e)
{
@@ -301,7 +301,7 @@ namespace
/*
* call-seq:
- * value -> String
+ * parse_value -> String
*
* Our Value.
* */
@@ -312,7 +312,7 @@ namespace
{
std::shared_ptr<const MetadataKey> * self_ptr;
Data_Get_Struct(self, std::shared_ptr<const MetadataKey>, self_ptr);
- return rb_str_new2(stringify((std::static_pointer_cast<const MetadataValueKey<SlotName> >(*self_ptr))->value()).c_str());
+ return rb_str_new2(stringify((std::static_pointer_cast<const MetadataValueKey<SlotName> >(*self_ptr))->parse_value()).c_str());
}
catch (const std::exception & e)
{
@@ -322,7 +322,7 @@ namespace
/*
* call-seq:
- * value -> Numeric
+ * parse_value -> Numeric
*
* Our Value.
* */
@@ -333,7 +333,7 @@ namespace
{
std::shared_ptr<const MetadataKey> * self_ptr;
Data_Get_Struct(self, std::shared_ptr<const MetadataKey>, self_ptr);
- return LONG2NUM((std::static_pointer_cast<const MetadataValueKey<long> >(*self_ptr))->value());
+ return LONG2NUM((std::static_pointer_cast<const MetadataValueKey<long> >(*self_ptr))->parse_value());
}
catch (const std::exception & e)
{
@@ -343,7 +343,7 @@ namespace
/*
* call-seq:
- * value -> String
+ * parse_value -> String
*
* Our Value.
* */
@@ -354,7 +354,7 @@ namespace
{
std::shared_ptr<const MetadataKey> * self_ptr;
Data_Get_Struct(self, std::shared_ptr<const MetadataKey>, self_ptr);
- return rb_str_new2(stringify((std::static_pointer_cast<const MetadataValueKey<FSPath> >(*self_ptr))->value()).c_str());
+ return rb_str_new2(stringify((std::static_pointer_cast<const MetadataValueKey<FSPath> >(*self_ptr))->parse_value()).c_str());
}
catch (const std::exception & e)
{
@@ -364,7 +364,7 @@ namespace
/*
* call-seq:
- * value -> Time
+ * parse_value -> Time
*
* Our Value.
* */
@@ -375,7 +375,7 @@ namespace
{
std::shared_ptr<const MetadataKey> * self_ptr;
Data_Get_Struct(self, std::shared_ptr<const MetadataKey>, self_ptr);
- return rb_time_new((std::static_pointer_cast<const MetadataTimeKey>(*self_ptr))->value().seconds(), 0);
+ return rb_time_new((std::static_pointer_cast<const MetadataTimeKey>(*self_ptr))->parse_value().seconds(), 0);
}
catch (const std::exception & e)
{
@@ -385,7 +385,7 @@ namespace
/*
* call-seq:
- * value -> Contents
+ * parse_value -> Contents
*
* Our Value.
* */
@@ -396,8 +396,8 @@ namespace
{
std::shared_ptr<const MetadataKey> * self_ptr;
Data_Get_Struct(self, std::shared_ptr<const MetadataKey>, self_ptr);
- if (std::static_pointer_cast<const MetadataValueKey<std::shared_ptr<const Contents> > >(*self_ptr)->value())
- return contents_to_value(std::static_pointer_cast<const MetadataValueKey<std::shared_ptr<const Contents> > >(*self_ptr)->value());
+ if (std::static_pointer_cast<const MetadataValueKey<std::shared_ptr<const Contents> > >(*self_ptr)->parse_value())
+ return contents_to_value(std::static_pointer_cast<const MetadataValueKey<std::shared_ptr<const Contents> > >(*self_ptr)->parse_value());
return Qnil;
}
catch (const std::exception & e)
@@ -408,7 +408,7 @@ namespace
/*
* call-seq:
- * value -> Choices
+ * parse_value -> Choices
*
* Our Value.
* */
@@ -419,7 +419,7 @@ namespace
{
std::shared_ptr<const MetadataKey> * self_ptr;
Data_Get_Struct(self, std::shared_ptr<const MetadataKey>, self_ptr);
- return choices_to_value(std::static_pointer_cast<const MetadataValueKey<std::shared_ptr<const Choices> > >(*self_ptr)->value());
+ return choices_to_value(std::static_pointer_cast<const MetadataValueKey<std::shared_ptr<const Choices> > >(*self_ptr)->parse_value());
}
catch (const std::exception & e)
{
@@ -429,7 +429,7 @@ namespace
/*
* call-seq:
- * value -> Array
+ * parse_value -> Array
*
* Our Value.
* */
@@ -443,7 +443,7 @@ namespace
{
std::shared_ptr<const MetadataKey> * self_ptr;
Data_Get_Struct(self, std::shared_ptr<const MetadataKey>, self_ptr);
- std::shared_ptr<const T_> c = std::static_pointer_cast<const MetadataCollectionKey<T_> >(*self_ptr)->value();
+ std::shared_ptr<const T_> c = std::static_pointer_cast<const MetadataCollectionKey<T_> >(*self_ptr)->parse_value();
VALUE result (rb_ary_new());
for (typename T_::ConstIterator i(c->begin()), i_end(c->end()) ; i != i_end ; ++i)
rb_ary_push(result, rb_str_new2(stringify(*i).c_str()));
@@ -458,7 +458,7 @@ namespace
/*
* call-seq:
- * value -> Hash
+ * parse_value -> Hash
*
* Our Value.
* */
@@ -472,7 +472,7 @@ namespace
{
std::shared_ptr<const MetadataKey> * self_ptr;
Data_Get_Struct(self, std::shared_ptr<const MetadataKey>, self_ptr);
- std::shared_ptr<const T_> c = std::static_pointer_cast<const MetadataCollectionKey<T_> >(*self_ptr)->value();
+ std::shared_ptr<const T_> c = std::static_pointer_cast<const MetadataCollectionKey<T_> >(*self_ptr)->parse_value();
VALUE result (rb_hash_new());
for (typename T_::ConstIterator i(c->begin()), i_end(c->end()) ; i != i_end ; ++i)
rb_hash_aset(result, rb_str_new2(stringify(i->first).c_str()), rb_str_new2(stringify(i->second).c_str()));
@@ -487,7 +487,7 @@ namespace
/*
* call-seq:
- * value -> Array
+ * parse_value -> Array
*
* Our Value.
* */
@@ -502,7 +502,7 @@ namespace
std::shared_ptr<const MetadataKey> * self_ptr;
Data_Get_Struct(self, std::shared_ptr<const MetadataKey>, self_ptr);
std::shared_ptr<const PackageIDSequence> c = std::static_pointer_cast<const MetadataCollectionKey<PackageIDSequence> >(
- *self_ptr)->value();
+ *self_ptr)->parse_value();
VALUE result (rb_ary_new());
for (PackageIDSequence::ConstIterator i(c->begin()), i_end(c->end()) ; i != i_end ; ++i)
rb_ary_push(result, package_id_to_value(*i));
@@ -517,7 +517,7 @@ namespace
/*
* call-seq:
- * value -> Array
+ * parse_value -> spec tree
*
* Our Value.
* */
@@ -531,7 +531,7 @@ namespace
{
std::shared_ptr<const MetadataKey> * self_ptr;
Data_Get_Struct(self, std::shared_ptr<const MetadataKey>, self_ptr);
- std::shared_ptr<const T_> c = std::static_pointer_cast<const MetadataSpecTreeKey<T_> >(*self_ptr)->value();
+ std::shared_ptr<const T_> c = std::static_pointer_cast<const MetadataSpecTreeKey<T_> >(*self_ptr)->parse_value();
return dep_tree_to_value<T_>(c);
}
catch (const std::exception & e)
@@ -639,7 +639,7 @@ namespace
/*
* Document-class: Paludis::MetadataKey
*
- * Base metadata class, subclasses contain a "value" to return the contents of the key.
+ * Base metadata class, subclasses contain a "parse_value" to return the contents of the key.
*/
c_metadata_key = rb_define_class_under(paludis_module(), "MetadataKey", rb_cObject);
rb_funcall(c_metadata_key, rb_intern("private_class_method"), 1, rb_str_new2("new"));
@@ -653,7 +653,7 @@ namespace
* Metadata class for a PackageId.
*/
c_metadata_package_id_key = rb_define_class_under(paludis_module(), "MetadataPackageIDKey", c_metadata_key);
- rb_define_method(c_metadata_package_id_key, "value", RUBY_FUNC_CAST(&metadata_package_id_key_value), 0);
+ rb_define_method(c_metadata_package_id_key, "parse_value", RUBY_FUNC_CAST(&metadata_package_id_key_value), 0);
/*
* Document-class: Paludis::MetadataStringKey
@@ -661,7 +661,7 @@ namespace
* Metadata class for Strings.
*/
c_metadata_string_key = rb_define_class_under(paludis_module(), "MetadataStringKey", c_metadata_key);
- rb_define_method(c_metadata_string_key, "value", RUBY_FUNC_CAST(&metadata_string_key_value), 0);
+ rb_define_method(c_metadata_string_key, "parse_value", RUBY_FUNC_CAST(&metadata_string_key_value), 0);
/*
* Document-class: Paludis::MetadataSlotNameKey
@@ -669,7 +669,7 @@ namespace
* Metadata class for SlotNames.
*/
c_metadata_slot_key = rb_define_class_under(paludis_module(), "MetadataSlotNameKey", c_metadata_key);
- rb_define_method(c_metadata_slot_key, "value", RUBY_FUNC_CAST(&metadata_slot_key_value), 0);
+ rb_define_method(c_metadata_slot_key, "parse_value", RUBY_FUNC_CAST(&metadata_slot_key_value), 0);
/*
* Document-class: Paludis::MetadataSizeKey
@@ -677,7 +677,7 @@ namespace
* Metadata class for file sizes.
*/
c_metadata_size_key = rb_define_class_under(paludis_module(), "MetadataSizeKey", c_metadata_key);
- rb_define_method(c_metadata_size_key, "value", RUBY_FUNC_CAST(&metadata_size_key_value), 0);
+ rb_define_method(c_metadata_size_key, "parse_value", RUBY_FUNC_CAST(&metadata_size_key_value), 0);
/*
* Document-class: Paludis::MetadataFSPathKey
@@ -685,7 +685,7 @@ namespace
* Metadata class for FSPath.
*/
c_metadata_fsentry_key = rb_define_class_under(paludis_module(), "MetadataFSPathKey", c_metadata_key);
- rb_define_method(c_metadata_fsentry_key, "value", RUBY_FUNC_CAST(&metadata_fsentry_key_value), 0);
+ rb_define_method(c_metadata_fsentry_key, "parse_value", RUBY_FUNC_CAST(&metadata_fsentry_key_value), 0);
/*
* Document-class: Paludis::MetadataTimeKey
@@ -693,7 +693,7 @@ namespace
* Metadata class for Time.
*/
c_metadata_time_key = rb_define_class_under(paludis_module(), "MetadataTimeKey", c_metadata_key);
- rb_define_method(c_metadata_time_key, "value", RUBY_FUNC_CAST(&metadata_time_key_value), 0);
+ rb_define_method(c_metadata_time_key, "parse_value", RUBY_FUNC_CAST(&metadata_time_key_value), 0);
/*
* Document-class: Paludis::MetadataContentsKey
@@ -701,7 +701,7 @@ namespace
* Metadata class for Contents.
*/
c_metadata_contents_key = rb_define_class_under(paludis_module(), "MetadataContentsKey", c_metadata_key);
- rb_define_method(c_metadata_contents_key, "value", RUBY_FUNC_CAST(&metadata_contents_key_value), 0);
+ rb_define_method(c_metadata_contents_key, "parse_value", RUBY_FUNC_CAST(&metadata_contents_key_value), 0);
/*
* Document-class: Paludis::MetadataChoicesKey
@@ -709,7 +709,7 @@ namespace
* Metadata class for Contents.
*/
c_metadata_choices_key = rb_define_class_under(paludis_module(), "MetadataChoicesKey", c_metadata_key);
- rb_define_method(c_metadata_choices_key, "value", RUBY_FUNC_CAST(&metadata_choices_key_value), 0);
+ rb_define_method(c_metadata_choices_key, "parse_value", RUBY_FUNC_CAST(&metadata_choices_key_value), 0);
/*
* Document-class: Paludis::MetadataKeywordNameSetKey
@@ -717,7 +717,7 @@ namespace
* Metadata class for keywords.
*/
c_metadata_keyword_name_set_key = rb_define_class_under(paludis_module(), "MetadataKeywordNameSetKey", c_metadata_key);
- rb_define_method(c_metadata_keyword_name_set_key, "value", RUBY_FUNC_CAST((&SetValue<KeywordNameSet>::fetch)), 0);
+ rb_define_method(c_metadata_keyword_name_set_key, "parse_value", RUBY_FUNC_CAST((&SetValue<KeywordNameSet>::fetch)), 0);
/*
* Document-class: Paludis::MetadataPackageIDSequenceKey
@@ -725,7 +725,7 @@ namespace
* Metadata class for package IDs.
*/
c_metadata_package_id_sequence_key = rb_define_class_under(paludis_module(), "MetadataPackageIDSequenceKey", c_metadata_key);
- rb_define_method(c_metadata_package_id_sequence_key, "value", RUBY_FUNC_CAST((&SetValue<PackageIDSequence>::fetch)), 0);
+ rb_define_method(c_metadata_package_id_sequence_key, "parse_value", RUBY_FUNC_CAST((&SetValue<PackageIDSequence>::fetch)), 0);
/*
* Document-class: Paludis::MetadataFSPathSequenceKey
@@ -733,7 +733,7 @@ namespace
* Metadata class for filesystem sequences.
*/
c_metadata_fsentry_sequence_key = rb_define_class_under(paludis_module(), "MetadataFSPathSequenceKey", c_metadata_key);
- rb_define_method(c_metadata_fsentry_sequence_key, "value", RUBY_FUNC_CAST((&SetValue<FSPathSequence>::fetch)), 0);
+ rb_define_method(c_metadata_fsentry_sequence_key, "parse_value", RUBY_FUNC_CAST((&SetValue<FSPathSequence>::fetch)), 0);
/*
* Document-class: Paludis::MetadataStringSetKey
@@ -741,7 +741,7 @@ namespace
* Metadata class for String sets.
*/
c_metadata_string_set_key = rb_define_class_under(paludis_module(), "MetadataStringSetKey", c_metadata_key);
- rb_define_method(c_metadata_string_set_key, "value", RUBY_FUNC_CAST((&SetValue<Set<std::string> >::fetch)), 0);
+ rb_define_method(c_metadata_string_set_key, "parse_value", RUBY_FUNC_CAST((&SetValue<Set<std::string> >::fetch)), 0);
/*
* Document-class: Paludis::MetadataStringStringMapKey
@@ -749,7 +749,7 @@ namespace
* Metadata class for String to String maps.
*/
c_metadata_string_string_map_key = rb_define_class_under(paludis_module(), "MetadataStringStringMapKey", c_metadata_key);
- rb_define_method(c_metadata_string_string_map_key, "value", RUBY_FUNC_CAST((&MapValue<Map<std::string, std::string> >::fetch)), 0);
+ rb_define_method(c_metadata_string_string_map_key, "parse_value", RUBY_FUNC_CAST((&MapValue<Map<std::string, std::string> >::fetch)), 0);
/*
* Document-class: Paludis::MetadataStringSequenceKey
@@ -757,7 +757,7 @@ namespace
* Metadata class for String sequences.
*/
c_metadata_string_sequence_key = rb_define_class_under(paludis_module(), "MetadataStringSequenceKey", c_metadata_key);
- rb_define_method(c_metadata_string_sequence_key, "value", RUBY_FUNC_CAST((&SetValue<Sequence<std::string> >::fetch)), 0);
+ rb_define_method(c_metadata_string_sequence_key, "parse_value", RUBY_FUNC_CAST((&SetValue<Sequence<std::string> >::fetch)), 0);
/*
* Document-class: Paludis::MetadataLicenseSpecTreeKey
@@ -765,7 +765,7 @@ namespace
* Metadata class for license specs.
*/
c_metadata_license_spec_tree_key = rb_define_class_under(paludis_module(), "MetadataLicenseSpecTreeKey", c_metadata_key);
- rb_define_method(c_metadata_license_spec_tree_key, "value", RUBY_FUNC_CAST((&SpecTreeValue<LicenseSpecTree>::fetch)), 0);
+ rb_define_method(c_metadata_license_spec_tree_key, "parse_value", RUBY_FUNC_CAST((&SpecTreeValue<LicenseSpecTree>::fetch)), 0);
/*
* Document-class: Paludis::MetadataProvideSpecTreeKey
@@ -773,7 +773,7 @@ namespace
* Metadata class for provide specs.
*/
c_metadata_provide_spec_tree_key = rb_define_class_under(paludis_module(), "MetadataProvideSpecTreeKey", c_metadata_key);
- rb_define_method(c_metadata_provide_spec_tree_key, "value", RUBY_FUNC_CAST((&SpecTreeValue<ProvideSpecTree>::fetch)), 0);
+ rb_define_method(c_metadata_provide_spec_tree_key, "parse_value", RUBY_FUNC_CAST((&SpecTreeValue<ProvideSpecTree>::fetch)), 0);
/*
* Document-class: Paludis::MetadataPlainTextSpecTreeKey
@@ -781,7 +781,7 @@ namespace
* Metadata class for restrict specs.
*/
c_metadata_plain_text_spec_tree_key = rb_define_class_under(paludis_module(), "MetadataPlainTextSpecTreeKey", c_metadata_key);
- rb_define_method(c_metadata_plain_text_spec_tree_key, "value", RUBY_FUNC_CAST((&SpecTreeValue<PlainTextSpecTree>::fetch)), 0);
+ rb_define_method(c_metadata_plain_text_spec_tree_key, "parse_value", RUBY_FUNC_CAST((&SpecTreeValue<PlainTextSpecTree>::fetch)), 0);
/*
* Document-class: Paludis::MetadataRequiredUseSpecTreeKey
@@ -789,7 +789,7 @@ namespace
* Metadata class for restrict specs.
*/
c_metadata_required_use_spec_tree_key = rb_define_class_under(paludis_module(), "MetadataRequiredUseSpecTreeKey", c_metadata_key);
- rb_define_method(c_metadata_required_use_spec_tree_key, "value", RUBY_FUNC_CAST((&SpecTreeValue<RequiredUseSpecTree>::fetch)), 0);
+ rb_define_method(c_metadata_required_use_spec_tree_key, "parse_value", RUBY_FUNC_CAST((&SpecTreeValue<RequiredUseSpecTree>::fetch)), 0);
/*
* Document-class: Paludis::MetadataDependencySpecTreeKey
@@ -797,7 +797,7 @@ namespace
* Metadata class for dependency specs.
*/
c_metadata_dependency_spec_tree_key = rb_define_class_under(paludis_module(), "MetadataDependencySpecTreeKey", c_metadata_key);
- rb_define_method(c_metadata_dependency_spec_tree_key, "value", RUBY_FUNC_CAST((&SpecTreeValue<DependencySpecTree>::fetch)), 0);
+ rb_define_method(c_metadata_dependency_spec_tree_key, "parse_value", RUBY_FUNC_CAST((&SpecTreeValue<DependencySpecTree>::fetch)), 0);
rb_define_method(c_metadata_dependency_spec_tree_key, "initial_labels", RUBY_FUNC_CAST(&metadata_dependency_spec_tree_key_initial_labels), 0);
/*
@@ -806,7 +806,7 @@ namespace
* Metadata class for fetchable uri specs.
*/
c_metadata_fetchable_uri_spec_tree_key = rb_define_class_under(paludis_module(), "MetadataFetchableURISpecTreeKey", c_metadata_key);
- rb_define_method(c_metadata_fetchable_uri_spec_tree_key, "value", RUBY_FUNC_CAST((&SpecTreeValue<FetchableURISpecTree>::fetch)), 0);
+ rb_define_method(c_metadata_fetchable_uri_spec_tree_key, "parse_value", RUBY_FUNC_CAST((&SpecTreeValue<FetchableURISpecTree>::fetch)), 0);
rb_define_method(c_metadata_fetchable_uri_spec_tree_key, "initial_label", RUBY_FUNC_CAST(&metadata_fetchable_uri_spec_tree_key_initial_label), 0);
/*
@@ -815,7 +815,7 @@ namespace
* Metadata class for simple uri specs.
*/
c_metadata_simple_uri_spec_tree_key = rb_define_class_under(paludis_module(), "MetadataSimpleURISpecTreeKey", c_metadata_key);
- rb_define_method(c_metadata_simple_uri_spec_tree_key, "value", RUBY_FUNC_CAST((&SpecTreeValue<SimpleURISpecTree>::fetch)), 0);
+ rb_define_method(c_metadata_simple_uri_spec_tree_key, "parse_value", RUBY_FUNC_CAST((&SpecTreeValue<SimpleURISpecTree>::fetch)), 0);
/*
* Document-class: Paludis::MetadataSectionKey
diff --git a/ruby/package_id_TEST.rb b/ruby/package_id_TEST.rb
index e230843d9..94dd74d89 100644
--- a/ruby/package_id_TEST.rb
+++ b/ruby/package_id_TEST.rb
@@ -94,8 +94,8 @@ module Paludis
end
def test_value
- assert_respond_to mk, :value
- assert_kind_of String, mk.value
+ assert_respond_to mk, :parse_value
+ assert_kind_of String, mk.parse_value
end
end
@@ -151,7 +151,7 @@ module Paludis
end
def test_subscript
- assert_equal pid_testrepo["DESCRIPTION"].value, "Test package"
+ assert_equal pid_testrepo["DESCRIPTION"].parse_value, "Test package"
assert_nil pid_testrepo["PRESCRIPTION"]
end
@@ -161,7 +161,7 @@ module Paludis
"RESTRICT" => 1, "SRC_URI" => 1, "HOMEPAGE" => 1, "EBUILD" => 1, "PROPERTIES" => 1, "IUSE" => 1,
"PALUDIS_CHOICES" => 1, "DEFINED_PHASES" => 1, "SLOT" => 1 }
pid_testrepo.each_metadata do | key |
- assert keys.has_key?(key.raw_name), "no key #{key.raw_name} -> #{key.value}"
+ assert keys.has_key?(key.raw_name), "no key #{key.raw_name} -> #{key.parse_value}"
keys.delete key.raw_name
end
assert keys.empty?, "keys are #{keys.map { | k, v | k }.join ', '}"
@@ -223,13 +223,13 @@ module Paludis
end
def test_slot
- assert_kind_of String, pid_testrepo.slot_key.value
- assert_equal '0', pid_testrepo.slot_key.value
+ assert_kind_of String, pid_testrepo.slot_key.parse_value
+ assert_equal '0', pid_testrepo.slot_key.parse_value
end
def test_short_description
assert_kind_of MetadataStringKey, pid_testrepo.short_description_key
- assert_equal 'Test package', pid_testrepo.short_description_key.value
+ assert_equal 'Test package', pid_testrepo.short_description_key.parse_value
end
def test_long_description
@@ -247,23 +247,23 @@ module Paludis
def test_keywords_key
assert_kind_of MetadataKeywordNameSetKey, pid_testrepo.keywords_key
- assert_kind_of Array, pid_testrepo.keywords_key.value
- assert_equal ['~test'], pid_testrepo.keywords_key.value
+ assert_kind_of Array, pid_testrepo.keywords_key.parse_value
+ assert_equal ['~test'], pid_testrepo.keywords_key.parse_value
end
def test_build_dependencies_key
assert_kind_of MetadataDependencySpecTreeKey, pid_testrepo.build_dependencies_key
- assert_kind_of AllDepSpec, pid_testrepo.build_dependencies_key.value
+ assert_kind_of AllDepSpec, pid_testrepo.build_dependencies_key.parse_value
end
def test_homepage_key
assert_kind_of MetadataSimpleURISpecTreeKey, pid_testrepo.homepage_key
- assert_kind_of AllDepSpec, pid_testrepo.homepage_key.value
+ assert_kind_of AllDepSpec, pid_testrepo.homepage_key.parse_value
end
def test_fetches_key
assert_kind_of MetadataFetchableURISpecTreeKey, pid_testrepo.fetches_key
- assert_kind_of AllDepSpec, pid_testrepo.fetches_key.value
+ assert_kind_of AllDepSpec, pid_testrepo.fetches_key.parse_value
assert_respond_to pid_testrepo.fetches_key, :initial_label
assert_kind_of URILabel, pid_testrepo.fetches_key.initial_label
assert_kind_of URIMirrorsThenListedLabel, pid_testrepo.fetches_key.initial_label
@@ -290,13 +290,13 @@ module Paludis
end
def test_slot
- assert_kind_of String, pid_installed.slot_key.value
- assert_equal 'test_slot', pid_installed.slot_key.value
+ assert_kind_of String, pid_installed.slot_key.parse_value
+ assert_equal 'test_slot', pid_installed.slot_key.parse_value
end
def test_short_description
assert_kind_of MetadataStringKey, pid_installed.short_description_key
- assert_equal 'a description', pid_installed.short_description_key.value
+ assert_equal 'a description', pid_installed.short_description_key.parse_value
end
def test_long_description
@@ -305,17 +305,17 @@ module Paludis
def test_contents_key
assert_kind_of MetadataContentsKey, pid_installed.contents_key
- assert_kind_of Contents, pid_installed.contents_key.value
+ assert_kind_of Contents, pid_installed.contents_key.parse_value
end
def test_installed_time_key
assert_kind_of MetadataTimeKey, pid_installed.installed_time_key
- assert_kind_of Time, pid_installed.installed_time_key.value
+ assert_kind_of Time, pid_installed.installed_time_key.parse_value
end
def test_from_repositories_key
assert_kind_of MetadataStringSetKey, pid_installed.from_repositories_key
- assert_equal ['origin_test'], pid_installed.from_repositories_key.value
+ assert_equal ['origin_test'], pid_installed.from_repositories_key.parse_value
end
def test_keywords_key
@@ -328,13 +328,13 @@ module Paludis
def test_keywords_key
assert_raise NameError do
- pid_bad.keywords_key.value
+ pid_bad.keywords_key.parse_value
end
end
def test_build_dependencies_key
assert_raise NameError do
- pid_bad.build_dependencies_key.value
+ pid_bad.build_dependencies_key.parse_value
end
end
end
diff --git a/ruby/repository_TEST.rb b/ruby/repository_TEST.rb
index 117f311f7..f11b1f1c7 100644
--- a/ruby/repository_TEST.rb
+++ b/ruby/repository_TEST.rb
@@ -195,7 +195,7 @@ module Paludis
include RepositoryTestCase
def contents
- contents = installed_pid.contents_key.value
+ contents = installed_pid.contents_key.parse_value
end
def entries
@@ -214,20 +214,20 @@ module Paludis
def test_first_entry
assert_kind_of ContentsEntry, entries[0]
assert_kind_of ContentsDirEntry, entries[0]
- assert_equal '/test', entries[0].location_key.value
+ assert_equal '/test', entries[0].location_key.parse_value
end
def test_second_entry
assert_kind_of ContentsEntry, entries[1]
assert_kind_of ContentsFileEntry, entries[1]
- assert_equal '/test/test_file', entries[1].location_key.value
+ assert_equal '/test/test_file', entries[1].location_key.parse_value
end
def test_third_entry
assert_kind_of ContentsEntry, entries[2]
assert_kind_of ContentsSymEntry, entries[2]
- assert_equal '/test/test_file', entries[2].target_key.value
- assert_equal '/test/test_link', entries[2].location_key.value
+ assert_equal '/test/test_file', entries[2].target_key.parse_value
+ assert_equal '/test/test_link', entries[2].location_key.parse_value
end
end
@@ -380,15 +380,15 @@ module Paludis
def test_format_key
assert_kind_of MetadataStringKey, repo.format_key
- assert_equal 'e', repo.format_key.value
+ assert_equal 'e', repo.format_key.parse_value
assert_kind_of MetadataStringKey, installed_repo.format_key
- assert_equal 'vdb', installed_repo.format_key.value
+ assert_equal 'vdb', installed_repo.format_key.parse_value
end
def test_installed_root_key
assert_nil repo.installed_root_key
assert_kind_of MetadataFSPathKey, installed_repo.installed_root_key
- assert_equal '/', installed_repo.installed_root_key.value
+ assert_equal '/', installed_repo.installed_root_key.parse_value
end
def test_each_metadata
@@ -398,17 +398,17 @@ module Paludis
def test_subscript
assert_respond_to repo, :[]
assert_kind_of MetadataStringKey, repo['format']
- assert_equal 'e', repo['format'].value
+ assert_equal 'e', repo['format'].parse_value
assert_nil repo['monkey']
end
def test_sync
assert_kind_of MetadataStringStringMapKey, repo['sync']
- assert_kind_of Hash, repo['sync'].value
- assert_equal 3, repo['sync'].value.size
- assert_equal 'normalsync', repo['sync'].value['']
- assert_equal 'foosync', repo['sync'].value['foo']
- assert_equal 'barsync', repo['sync'].value['bar']
+ assert_kind_of Hash, repo['sync'].parse_value
+ assert_equal 3, repo['sync'].parse_value.size
+ assert_equal 'normalsync', repo['sync'].parse_value['']
+ assert_equal 'foosync', repo['sync'].parse_value['foo']
+ assert_equal 'barsync', repo['sync'].parse_value['bar']
end
end
end