Skip to content

Commit

Permalink
remove trailing white space
Browse files Browse the repository at this point in the history
  • Loading branch information
jreidinger committed Jan 23, 2013
1 parent 25e24fb commit 42be297
Show file tree
Hide file tree
Showing 11 changed files with 58 additions and 58 deletions.
12 changes: 6 additions & 6 deletions package/yast2-ruby-bindings.changes
Expand Up @@ -2,7 +2,7 @@
Wed Jun 27 08:02:14 UTC 2012 - jreidinger@suse.com

- adapt to changes in yast2-core
- 0.3.13
- 0.3.13

-------------------------------------------------------------------
Tue Jun 12 13:33:01 UTC 2012 - coolo@suse.com
Expand All @@ -13,7 +13,7 @@ Tue Jun 12 13:33:01 UTC 2012 - coolo@suse.com
-------------------------------------------------------------------
Thu Jun 7 15:44:29 UTC 2012 - jreidinger@suse.com

- port to ruby 1.9
- port to ruby 1.9

-------------------------------------------------------------------
Thu Apr 5 10:32:47 CEST 2012 - jsuchome@suse.cz
Expand All @@ -24,7 +24,7 @@ Thu Apr 5 10:32:47 CEST 2012 - jsuchome@suse.cz
Thu Jan 19 12:11:56 UTC 2012 - jreidinger@suse.com

- improve previous fix to allow loading also file in namespace (
e.g. Name::Test in name/test ) (bnc#705417)
e.g. Name::Test in name/test ) (bnc#705417)

-------------------------------------------------------------------
Mon Jan 16 15:16:39 UTC 2012 - coolo@suse.com
Expand Down Expand Up @@ -91,7 +91,7 @@ Thu Apr 9 15:15:09 CEST 2009 - kkaempf@suse.de
-------------------------------------------------------------------
Tue May 6 10:00:50 CEST 2008 - aj@suse.de

- Fix spec file for last change.
- Fix spec file for last change.

-------------------------------------------------------------------
Wed Apr 16 17:27:57 CEST 2008 - dmacvicar@suse.de
Expand All @@ -106,7 +106,7 @@ Wed Apr 16 17:27:57 CEST 2008 - dmacvicar@suse.de
Thu Feb 21 17:56:05 CET 2008 - sh@suse.de

- Added new UI packages to Requires/BuildRequires in .spec file
- V 0.3.1
- V 0.3.1

-------------------------------------------------------------------
Wed Feb 20 14:10:33 CET 2008 - coolo@suse.de
Expand All @@ -129,5 +129,5 @@ Thu Aug 9 12:01:39 CEST 2007 - dmacvicar@suse.de
-------------------------------------------------------------------
Mon Aug 6 13:33:43 CEST 2007 - dmacvicar@suse.de

- Initial release 0.1.0
- Initial release 0.1.0

2 changes: 1 addition & 1 deletion src/binary/CMakeLists.txt
Expand Up @@ -56,7 +56,7 @@ set_target_properties(ycpx PROPERTIES PREFIX "")
# not work.
#
#set_target_properties( ycpx PROPERTIES SKIP_BUILD_RPATH FALSE)
#set_target_properties( ycpx PROPERTIES BUILD_WITH_INSTALL_RPATH FALSE)
#set_target_properties( ycpx PROPERTIES BUILD_WITH_INSTALL_RPATH FALSE)
#set_target_properties( ycpx PROPERTIES INSTALL_RPATH_USE_LINK_PATH FALSE)
#set_target_properties( ycpx PROPERTIES INSTALL_RPATH "${YAST_PLUGIN_DIR}")
#
Expand Down
2 changes: 1 addition & 1 deletion src/binary/Y2CCRuby.cc
Expand Up @@ -51,7 +51,7 @@ Y2Component *Y2CCRuby::provideNamespace (const char *name)
{
module = YCPPathSearch::find (YCPPathSearch::Module, Y2RubyComponent::CamelCase2DelimSepated(name) + ".rb");
}

if (!module.empty ())
{
y2milestone("Find module result: '%s'", module.c_str());
Expand Down
4 changes: 2 additions & 2 deletions src/binary/Y2RubyTypeConv.cc
Expand Up @@ -68,9 +68,9 @@ static YCPMap rbhash_2_ycpmap( VALUE value )

/*
* rbarray_2_ycplist
*
*
* Internal helper for Array -> YCPList
*
*
*/

static YCPList rbarray_2_ycplist( VALUE value )
Expand Down
6 changes: 3 additions & 3 deletions src/binary/Y2RubyUtils.cc
Expand Up @@ -8,13 +8,13 @@ using namespace std;

VALUE y2ruby_nested_const_get(const std::string &name)
{
VALUE module = rb_mKernel;
VALUE module = rb_mKernel;
// to save every component of Foo::Bar::Ehh
vector<string> name_levels;
stringutil::split( name, name_levels, "::", false);

for ( unsigned i = 0; i < name_levels.size(); ++i ) {
module = rb_funcall( module, rb_intern("const_get"), 1, rb_str_new2(name_levels[i].c_str()) );
}
return module;
return module;
}
62 changes: 31 additions & 31 deletions src/binary/YCP.cc
Expand Up @@ -85,22 +85,22 @@ getNs (const char * ns_name)
return ns;
}


/*--------------------------------------------
*
*
* Document-module: YCP::Ui
*
*
*--------------------------------------------
*/

/*
* ui_init()
*
*
* Load and initialize UI component
*
*
* call-seq:
* Ui::init( name = "ncurses" )
*
*
*/

static VALUE
Expand Down Expand Up @@ -151,13 +151,13 @@ ui_init( int argc, VALUE *argv, VALUE self )


/*--------------------------------------------
*
*
* Document-module: YCP
*
*
* The YCP module gives access to primitives of the YCP language.
*
*
* Its here for completeness, you're mostly better off using Ruby library functions.
*
*
*--------------------------------------------
*/

Expand All @@ -167,7 +167,7 @@ ui_init( int argc, VALUE *argv, VALUE self )
* Helper
*
* lookup_namespace_component()
*
*
* looks a component for a namespace
* throws RuntimeError is namespace cannot be found
*
Expand All @@ -186,13 +186,13 @@ lookup_namespace_component(const char *name)
return;
}


/*
* import_namespace
*
*
* tries to import a namespace
* throws a NameError if failed
*
*
*/
static VALUE
import_namespace( const char *name)
Expand All @@ -213,14 +213,14 @@ import_namespace( const char *name)

/*
* import( name )
*
*
* Tries to import a YCP namespace
*
* call-seq:
* YCP::import("name")
*
*
*/

static VALUE
ycp_module_import( VALUE self, VALUE name)
{
Expand All @@ -229,18 +229,18 @@ ycp_module_import( VALUE self, VALUE name)
return import_namespace(s);
}


/*
* ycp_module_each_symbol(namespace) -> iterator
*
*
* iterates all symbols in a namespace and yields the
* symbol name and category
*
*
* call-seq:
* each_symbol("namespace") { |symbol,category| ... }
*
*
*/

static VALUE
ycp_module_each_symbol(VALUE self, VALUE namespace_name)
{
Expand Down Expand Up @@ -286,11 +286,11 @@ ycp_module_call_ycp_function(int argc, VALUE *argv, VALUE self)
const char *function_name;
VALUE symbol = argv[1];

if (SYMBOL_P(symbol))
if (SYMBOL_P(symbol))
function_name = (const char *)rb_id2name( SYM2ID( symbol ) );
else
function_name = StringValuePtr( symbol );

y2internal("Dynamic Proxy: [%s::%s] with [%d] params\n", namespace_name, function_name, argc);

//Data_Get_Struct( self, class Y2Namespace, ns );
Expand Down Expand Up @@ -362,7 +362,7 @@ ycp_module_call_ycp_function(int argc, VALUE *argv, VALUE self)

/*
* helper for call_ycp_builtin
*
*
*/

YCPValue
Expand All @@ -375,7 +375,7 @@ _call_ycp_builtin ( const string &module_name, const string &func_name, int argc
const char *qualified_name = qualified_name_s.c_str ();

y2milestone("qualified name '%s', %d args", qualified_name, argc);

declaration_t *bi_dt = static_declarations.findDeclaration (qualified_name);
if (bi_dt == NULL)
{
Expand Down Expand Up @@ -457,11 +457,11 @@ _call_ycp_builtin ( const string &module_name, const string &func_name, int argc


/*--------------------------------------------
*
*
* Document-module: YaST
*
*
* The YaST module gives access to the YaST infrastructure, mostly implemented in the YCP language.
*
*
*--------------------------------------------
*/

Expand Down Expand Up @@ -493,10 +493,10 @@ extern "C"
{
/*
* Ruby module initializer
*
*
* "require 'ycpx'" will call Init_ycpx()
*/

void
Init_ycpx()
{
Expand Down
8 changes: 4 additions & 4 deletions src/binary/YRuby.cc
Expand Up @@ -75,7 +75,7 @@ bool YRuby::_y_ruby_finalized = false;
YRuby::YRuby()
{
y2milestone( "Initializing ruby interpreter." );

RUBY_INIT_STACK;
ruby_init();
ruby_script("yast");
Expand Down Expand Up @@ -162,7 +162,7 @@ static VALUE
protected_call(VALUE args)
{
VALUE *values = (VALUE *)args;
return rb_funcall3(values[0], values[1], (int)values[2], values+3);
return rb_funcall3(values[0], values[1], (int)values[2], values+3);
}

/**
Expand All @@ -179,10 +179,10 @@ YRuby::callInner (string module_name, string function, bool method,
y2error ("The Ruby module '%s' is not provided by its rb file", module_name.c_str());
return YCPVoid();
}

// first element of the list is ignored
int size = argList.size();

// make rooms for size-1 arguments to
// the ruby function
// +3 for module, function, and number of args
Expand Down
6 changes: 3 additions & 3 deletions src/binary/YRuby.h
Expand Up @@ -67,7 +67,7 @@ class YRuby
**/
static YCPValue destroy();


protected:

/**
Expand All @@ -80,7 +80,7 @@ class YRuby
* Protected constructor. Use one of the static methods rather than
* instantiate an object of this class yourself.
**/

/**
* Destructor.
**/
Expand All @@ -106,7 +106,7 @@ class YRuby
* YCPValueReps
*/
typedef std::map<VALUE, int> refcount_map_t;

private:
static void gc_mark(void *object);
static void gc_free(void *object);
Expand Down
8 changes: 4 additions & 4 deletions src/binary/YRubyNamespace.cc
Expand Up @@ -183,13 +183,13 @@ YRubyNamespace::YRubyNamespace (string name)
VALUE moduleklassmethods = rb_funcall( rb_cModule, rb_intern("methods"), 0);
VALUE mymodulemethods = rb_funcall( module, rb_intern("methods"), 0);
VALUE methods = rb_funcall( mymodulemethods, rb_intern("-"), 1, moduleklassmethods );

if (methods == Qnil)
{
y2error ("Can't see methods in module '%s'", name.c_str());
return;
}

int i;
for(i = 0; i < RARRAY_LEN(methods); i++)
{
Expand All @@ -198,7 +198,7 @@ YRubyNamespace::YRubyNamespace (string name)
current = rb_funcall( current, rb_intern("to_s"), 0);
}
y2milestone("New method: '%s'", RSTRING_PTR(current));

// figure out arity.
Check_Type(module,T_MODULE);
VALUE methodobj = rb_funcall( module, rb_intern("method"), 1, current );
Expand All @@ -219,7 +219,7 @@ YRubyNamespace::YRubyNamespace (string name)
signature += ")";
y2internal("going to parse signature: '%s'", signature.c_str());
constTypePtr sym_tp = Type::fromSignature(signature);

constFunctionTypePtr fun_tp = (constFunctionTypePtr) sym_tp;

// symbol entry for the function
Expand Down
4 changes: 2 additions & 2 deletions tests/ruby/term_test.rb
Expand Up @@ -9,10 +9,10 @@ def test_initialize
assert_equal [], YCP::Term.new(:HBox).params
assert_equal ["test"], YCP::Term.new(:HBox, "test").params
assert_equal "test", YCP::Term.new(:HBox, "test").params.first

assert_equal :VBox, YCP::Term.new(:HBox, YCP::Term.new(:VBox)).params.first.value
end

def test_update
t = YCP::Term.new(:HBox, 1, 2)
t.params[0] = 0
Expand Down
2 changes: 1 addition & 1 deletion tests/ycp/URI.rb
@@ -1,7 +1,7 @@
require 'uri'
module URI
# URI::parse works even without glue

def self.scheme(instance)
instance.scheme
end
Expand Down

0 comments on commit 42be297

Please sign in to comment.