[HELP] make samples Ruby 1.9 ready

Hi,

We have sample programs in sample/ directory. If you
installed Ruby/GTK2 as gem, you will find samples in
$GEM_HOME/gems/gtk2-0.90.7/sample/.

Some of samples aren’t Ruby 1.9 ready. We want to make all
samples Ruby 1.9 ready. We want your help. Could you try
all Ruby-GNOME2 (Ruby/GLib2, Ruby/GTK2 and so on) samples,
fix not Ruby 1.9 ready samples and send a patch?

(We don’t have a list of all not Ruby 1.9 ready
samples. Sorry.)

Here are main broken reasons:

  1. not M17N ready
    Solution: add “# -- coding: utf-8 --” at the top.

  2. $LOAD_PATH doesn’t have ‘.’
    Solution: add “$LOAD_PATH.unshift(’.’)”.

We hope your help!

Thanks,

kou

I try to help with that in the coming months but personally I am still
using Ruby 1.8.x so it will take me some time before I manage to migrate
to Ruby 1.9.x successfully :slight_smile:

(I had and still have many problems with the encoding changes in Ruby
1.9.x)

Thanks.

Hi.

Can I find sample codes in svn repo ?
They have eluded me.

(I do not use gems.)


Vincent C.

I have created a page on the hiki :
http://ruby-gnome2.sourceforge.jp/hiki.cgi?Status+of+samples .
I have list all the ruby files I found in samples directories.
I will test the glib2 samples soon.


Vincent C.

Hi,

In [email protected]
“Re: [ruby-gnome2-devel-en] [HELP] make samples Ruby 1.9 ready” on
Sun, 20 Feb 2011 21:50:49 +0100,
Marc H. [email protected] wrote:

I try to help with that in the coming months but personally I am still
using Ruby 1.8.x so it will take me some time before I manage to migrate
to Ruby 1.9.x successfully :slight_smile:

(I had and still have many problems with the encoding changes in Ruby
1.9.x)

Thanks!
We’ll waiting for you!


kou

Hi,

In [email protected]
“Re: [ruby-gnome2-devel-en] [HELP] make samples Ruby 1.9 ready” on
Mon, 21 Feb 2011 16:38:36 +0100,
Vincent C. [email protected] wrote:

Can I find sample codes in svn repo ?

Yes.
You can find sample codes in sample/ directory.

% svn co

ruby-gnome2
% ruby-gnome2
% ls -d */sample
gdk_pixbuf2/sample gstreamer/sample gtksourceview2/sample
rsvg2/sample
glib2/sample gtk2/sample pango/sample vte/sample
goocanvas/sample gtkmozembed/sample poppler/sample

Hmm!? You already found sample codes!
I’m sorry for my late response. :<


kou

Hi,

In [email protected]
“Re: [ruby-gnome2-devel-en] [HELP] make samples Ruby 1.9 ready” on
Tue, 22 Feb 2011 17:36:47 +0100,
Vincent C. [email protected] wrote:

I have created a page on the hiki :
http://ruby-gnome2.sourceforge.jp/hiki.cgi?Status+of+samples .
I have list all the ruby files I found in samples directories.

Thanks! It’s very helpful!

I will test the glib2 samples soon.

Thanks. We’ll waiting for your work.


kou

2011/2/22 Kouhei S. [email protected]:

Thanks! It’s very helpful!

I will test the glib2 samples soon.

Thanks. We’ll waiting for your work.

glib2 tests:

  • bookmarkfile.rb gives a warning
  • completion.rb and keyfile.rb gives an error
  • I am not sure how to use iochannel.rb
  • all other samples are ruby 1.9 ready

See http://ruby-gnome2.sourceforge.jp/hiki.cgi?Status+of+samples#glib2 .


kou


Vincent C.

Hi,

In [email protected]
“Re: [ruby-gnome2-devel-en] [HELP] make samples Ruby 1.9 ready” on
Wed, 23 Feb 2011 00:04:55 +0100,
Vincent C. [email protected] wrote:

glib2 tests:

  • bookmarkfile.rb gives a warning
  • completion.rb and keyfile.rb gives an error
  • I am not sure how to use iochannel.rb
  • all other samples are ruby 1.9 ready

See http://ruby-gnome2.sourceforge.jp/hiki.cgi?Status+of+samples#glib2 .

Thanks for checking Ruby/GLib2 samples.
Could someone fix the warning and error on Ruby 1.9?

Thanks,

kou

Hi.

I have checked all the gtk-demo samples but the cairo ones.
I will try to commit my changes (see diff file). Should I split them
in 2 commits (main.rb and textview.rb).
Does the syntax of Changelog is correct ?

For the commit should I use this URL
svn+ssh://[email protected]/svnroot/ruby-gnome2
or https protocole is enough ?

Hi,

In [email protected]
“Re: [ruby-gnome2-devel-en] [HELP] make samples Ruby 1.9 ready” on
Mon, 28 Feb 2011 20:21:12 +0100,
Vincent C. [email protected] wrote:

I have checked all the gtk-demo samples but the cairo ones.

Thanks!

I will try to commit my changes (see diff file). Should I split them
in 2 commits (main.rb and textview.rb).

I’ve checked your patch. It looks OK to me. Please commit it.

You don’t need to split them in 2 commits because both of
them are fixes for Ruby 1.9. If changes aren’t relative,
please split them in some commits.

Does the syntax of Changelog is correct ?

A line following your name line is missing:

Before:
+2011-02-28 Vincent C.

  •   * sample/gtk-demo/main.rb: Add gtk-demo directory to $: to fix
    
  •   bugs with ruby1.9.
    
  •   * sample/gtk-demo/textview.rb: add coding header.
    

After:
+2011-02-28 Vincent C.
+

  •   * sample/gtk-demo/main.rb: Add gtk-demo directory to $: to fix
    
  •   bugs with ruby1.9.
    
  •   * sample/gtk-demo/textview.rb: add coding header.
    

For the commit should I use this URL
svn+ssh://[email protected]/svnroot/ruby-gnome2
or https protocole is enough ?

You can use https URL:
Ruby-GNOME 2 download | SourceForge.net

Thanks,

kou