aboutsummaryrefslogtreecommitdiff
path: root/ruby/dep_spec.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ruby/dep_spec.cc')
-rw-r--r--ruby/dep_spec.cc40
1 files changed, 17 insertions, 23 deletions
diff --git a/ruby/dep_spec.cc b/ruby/dep_spec.cc
index aa377fc52..da98fb9f8 100644
--- a/ruby/dep_spec.cc
+++ b/ruby/dep_spec.cc
@@ -704,59 +704,53 @@ namespace
/*
* call-seq:
- * installable_to_repository -> Hash or Nil
+ * installed_at_path_constraint ->
+ * InstalledAtPathConstraint or Nil
*
- * Fetch the installable-to-repository requirement.
+ * Fetch the installed-at-path requirement.
*/
VALUE
- package_dep_spec_installable_to_repository(VALUE self)
+ package_dep_spec_installed_at_path_constraint(VALUE self)
{
std::shared_ptr<WrappedSpecBase> * ptr;
Data_Get_Struct(self, std::shared_ptr<WrappedSpecBase>, ptr);
- std::shared_ptr<const InstallableToRepository> i2r(std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->installable_to_repository_ptr());
- if (! i2r)
+ if (! bool(std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->installed_at_path_constraint()))
return Qnil;
- VALUE result(rb_hash_new());
- rb_hash_aset(result, ID2SYM(rb_intern("repository")),
- rb_str_new2(stringify(i2r->repository()).c_str()));
- rb_hash_aset(result, ID2SYM(rb_intern("include_masked?")),
- i2r->include_masked() ? Qtrue : Qfalse);
- return result;
+ return package_dep_spec_constraint_to_value(std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->installed_at_path_constraint());
}
/*
* call-seq:
- * installed_at_path_constraint ->
- * InstalledAtPathConstraint or Nil
+ * installable_to_path_constraint -> InstallableToPathConstraint or Nil
*
- * Fetch the installed-at-path requirement.
+ * Fetch the installable-to-path constraint.
*/
VALUE
- package_dep_spec_installed_at_path_constraint(VALUE self)
+ package_dep_spec_installable_to_path_constraint(VALUE self)
{
std::shared_ptr<WrappedSpecBase> * ptr;
Data_Get_Struct(self, std::shared_ptr<WrappedSpecBase>, ptr);
- if (! bool(std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->installed_at_path_constraint()))
+ if (! bool(std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->installable_to_path_constraint()))
return Qnil;
- return package_dep_spec_constraint_to_value(std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->installed_at_path_constraint());
+ return package_dep_spec_constraint_to_value(
+ std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->installable_to_path_constraint());
}
/*
* call-seq:
- * installable_to_path_constraint ->
- * InstallableToPathConstraintPool or Nil
+ * installable_to_path_constraint -> InstallableToRepositoryConstraint or Nil
*
* Fetch the installable-to-path constraint.
*/
VALUE
- package_dep_spec_installable_to_path_constraint(VALUE self)
+ package_dep_spec_installable_to_repository_constraint(VALUE self)
{
std::shared_ptr<WrappedSpecBase> * ptr;
Data_Get_Struct(self, std::shared_ptr<WrappedSpecBase>, ptr);
- if (! bool(std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->installable_to_path_constraint()))
+ if (! bool(std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->installable_to_repository_constraint()))
return Qnil;
return package_dep_spec_constraint_to_value(
- std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->installable_to_path_constraint());
+ std::static_pointer_cast<const WrappedSpec<PackageDepSpec> >(*ptr)->spec()->installable_to_repository_constraint());
}
/*
@@ -1112,7 +1106,7 @@ namespace
rb_define_method(c_package_dep_spec, "slot_requirement", RUBY_FUNC_CAST(&package_dep_spec_slot_requirement_ptr), 0);
rb_define_method(c_package_dep_spec, "in_repository_constraint", RUBY_FUNC_CAST(&package_dep_spec_in_repository_constraint), 0);
rb_define_method(c_package_dep_spec, "from_repository_constraint", RUBY_FUNC_CAST(&package_dep_spec_from_repository_constraint), 0);
- rb_define_method(c_package_dep_spec, "installable_to_repository", RUBY_FUNC_CAST(&package_dep_spec_installable_to_repository), 0);
+ rb_define_method(c_package_dep_spec, "installable_to_repository_constraint", RUBY_FUNC_CAST(&package_dep_spec_installable_to_repository_constraint), 0);
rb_define_method(c_package_dep_spec, "installed_at_path_constraint", RUBY_FUNC_CAST(&package_dep_spec_installed_at_path_constraint), 0);
rb_define_method(c_package_dep_spec, "installable_to_path_constraint", RUBY_FUNC_CAST(&package_dep_spec_installable_to_path_constraint), 0);
rb_define_method(c_package_dep_spec, "version_requirements", RUBY_FUNC_CAST(&package_dep_spec_version_requirements_ptr), 0);