Skip to content

Commit

Permalink
Merge pull request #187 from yast/drop_add_api
Browse files Browse the repository at this point in the history
Drop add api
  • Loading branch information
jreidinger committed Jan 9, 2017
2 parents 75bd20c + d72ca81 commit 87cb013
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 30 deletions.
6 changes: 6 additions & 0 deletions package/yast2-ruby-bindings.changes
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Jan 9 12:15:20 UTC 2017 - jreidinger@suse.com

- drop Yast.add_module_dir and Yast.add_include_dir as the only
reliable way is to use Y2DIR env (gh#yast/yast-ruby-bindings#72)

-------------------------------------------------------------------
Wed Jan 4 12:36:06 UTC 2017 - jreidinger@suse.com

Expand Down
31 changes: 1 addition & 30 deletions src/binary/Yast.cc
Expand Up @@ -142,6 +142,7 @@ ycp_find_include_file( VALUE self, VALUE path)
*
* iterates all symbols in a namespace and yields the
* symbol name and category
* Internal API only for defining methods for given namespace
*
* call-seq:
* each_symbol("namespace") { |symbol,category| ... }
Expand Down Expand Up @@ -402,34 +403,6 @@ yast_y2_logger( int argc, VALUE *argv, VALUE self )
return Qnil;
}

/*--------------------------------------------
* Document-method: add_module_path(path)
* call-seq:
* Yast.add_module_path([String]) -> nil
*
* Adds path to module search path. Useful to test modules from specific directory.
*
* For testing recomended way is to set properly Y2DIR ENV.
*/
static VALUE add_module_path( VALUE self, VALUE path )
{
y2debug ("add module path %s", RSTRING_PTR(path));
YCPPathSearch::addPath (YCPPathSearch::Module, RSTRING_PTR(path));
return Qnil;
}

/*
* Adds path to include search path. Useful to test includes from specific directory.
* For testing recomended way is to set properly Y2DIR ENV.
*/
static VALUE
add_include_path( VALUE self, VALUE path )
{
y2debug ("add include path %s", RSTRING_PTR(path));
YCPPathSearch::addPath (YCPPathSearch::Include, RSTRING_PTR(path));
return Qnil;
}

static VALUE
y2dir_paths( VALUE self )
{
Expand Down Expand Up @@ -607,8 +580,6 @@ extern "C"
rb_define_singleton_method( rb_mYast, "call_yast_function", RUBY_METHOD_FUNC(ycp_module_call_ycp_function), -1);

rb_define_singleton_method( rb_mYast, "symbols", RUBY_METHOD_FUNC(ycp_module_symbols), 1);
rb_define_singleton_method( rb_mYast, "add_module_path", RUBY_METHOD_FUNC(add_module_path), 1);
rb_define_singleton_method( rb_mYast, "add_include_path", RUBY_METHOD_FUNC(add_include_path), 1);
rb_define_singleton_method( rb_mYast, "y2paths", RUBY_METHOD_FUNC(y2dir_paths), 0);

rb_define_method( rb_mYast, "y2_logger", RUBY_METHOD_FUNC(yast_y2_logger), -1);
Expand Down

0 comments on commit 87cb013

Please sign in to comment.