[ANN] Ruby Refactoring Browser 0.0.3

  • Thread starter OHBAYASHI Ippei
  • Start date
O

OHBAYASHI Ippei

Hello,

Ruby Refactoring Browser 0.0.3 has been released.
This tool helps developers to modify code like renaming variables
and extracting method.

http://www.kmc.gr.jp/proj/rrb/index-en.html

Features:
* Emacs interface and FreeRIDE plugin
* Suitable undo on Emacs interface
* And here is available refactorings
* Rename local/instance/global/class variable
* Rename method
* Rename constant, including class name and module name
* Pull up/Push down method
* Extract method
* Extract superclass
 
R

Rich

http://raa.ruby-lang.org/project/ezexerb/

<snippet from the RAA entry>

After Exerb (3.2.0) is installed this tool makes the creation of EXE files
easier.

Support for referencing a Ruby install directory other than the default.

EXR and MAK files deleted automatically.

User can define a 32x32 4 bit icon to use as the application icon.

Nullsoft NSIS packaged installer/uninstaller.

Tested on: 98, NT, 2000, and XP

2.0.0 - Release date: 10.06.04
1.1.0 - Release date: 14.05.04
1.0.0 - Release date: 18.02.04
0.9.0 - Release date: 15.02.04

-Richard
 
L

Lothar Scholz

Rich said:
http://raa.ruby-lang.org/project/ezexerb/

<snippet from the RAA entry>

After Exerb (3.2.0) is installed this tool makes the creation of EXE files
easier.

Support for referencing a Ruby install directory other than the default.

EXR and MAK files deleted automatically.

User can define a 32x32 4 bit icon to use as the application icon.

Nullsoft NSIS packaged installer/uninstaller.

Tested on: 98, NT, 2000, and XP

2.0.0 - Release date: 10.06.04
1.1.0 - Release date: 14.05.04
1.0.0 - Release date: 18.02.04
0.9.0 - Release date: 15.02.04

-Richard


Installed on XP and got a crash on startup

private method `split' called for nil:NilClass
init.rb:97:in `get_exerb_version'
init.rb:79:in `test_for_correct_version_of_exerb'
init.rb:218:in `initialize'
init.rb:258:in `new'
init.rb:258
 
R

Rich

Thanks for the feedback!

The lines in question were:

command_to_execute='ruby '(e-mail address removed)+'/bin/exerb -V'
begin
f = IO.popen(command_to_execute)
rescue
end
begin
@exerb_version=f.readlines.join()
rescue
@exerb_version="Nothing 0.0.0"
end
@exerb_major_version=@exerb_version.split(" ")[1].split(".")[0] # Line
97 - where the error occured

The purpose of that method is to see if exerb is installed... maybe there's
a better way, but for now I've changed those lines by adding a new one:

command_to_execute='ruby '(e-mail address removed)+'/bin/exerb -V'
begin
f = IO.popen(command_to_execute)
rescue
end
@exerb_version="Nothing 0.0.0" # The new line
begin
@exerb_version=f.readlines.join()
rescue
@exerb_version="Nothing 0.0.0"
end
@exerb_major_version=@exerb_version.split(" ")[1].split(".")[0]

I've compiled and uploaded the additions - would you mind testing it again?

-Rich

----- Original Message -----
From: "Lothar Scholz" <[email protected]>
Newsgroups: comp.lang.ruby
To: "ruby-talk ML" <[email protected]>
Sent: Friday, June 11, 2004 8:58 AM
Subject: Re: [ANN] EZExerb 2.0
 
L

Lothar Scholz

Hello Rich,

R> Thanks for the feedback!

R> I've compiled and uploaded the additions - would you mind testing it again?

R> -Rich

Not much better,

private method `split' called for nil:NilClass
init.rb:98:in `get_exerb_version'
init.rb:79:in `test_for_correct_version_of_exerb'
init.rb:219:in `initialize'
init.rb:259:in `new'
init.rb:259

The reason is that i don't have the binary files from exerb installed.
This is also not necessary to use exerb, you only can trust that the
"lib" files are somewhere in the library path. At least this is what i
found in the doc files, and it works perfectly. Using

ruby -r exerb/mkexr foo.rb

is enough to get a recipe file.
So your code should be:

require 'exerb/version'
@exerb_major_version=Exerb::VERSION.split(".")[0]

And of course use a begin/rescue if exerb is not installed.
 
R

Rich

I've implemented your suggestions, and they're a lot better than what I
had - thanks!

I hope the latest works now... thanks for helping me work this out.

-Rich
 
R

Rich

Scratch that.

I'm testing it on WinXP and it's saying that it found ver. 3.2.0, when the
test box doesn't have a bit of ruby on it.

All - Sorry for this noise, let me figure out what's going on and send more
in a bit.

-Rich

----- Original Message -----
From: "Rich" <[email protected]>
To: "ruby-talk ML" <[email protected]>
Sent: Friday, June 11, 2004 3:58 PM
Subject: Re: [ANN] EZExerb 2.0

I've implemented your suggestions, and they're a lot better than what I
had - thanks!

I hope the latest works now... thanks for helping me work this out.

-Rich
The reason is that i don't have the binary files from exerb installed.
This is also not necessary to use exerb, you only can trust that the
"lib" files are somewhere in the library path. At least this is what i
found in the doc files, and it works perfectly. Using

ruby -r exerb/mkexr foo.rb

is enough to get a recipe file.
So your code should be:

require 'exerb/version'
@exerb_major_version=Exerb::VERSION.split(".")[0]

And of course use a begin/rescue if exerb is not installed.
 
L

Lothar Scholz

Hello Rich,

R> I'm testing it on WinXP and it's saying that it found ver. 3.2.0, when the
R> test box doesn't have a bit of ruby on it.

R> All - Sorry for this noise, let me figure out what's going on and send more
R> in a bit.

Think that this simply means that for some reasons you embedded the
exerb/version file into your .exe file. Don't know why you want to do
this.

You can simply call exerb as a ruby command line script as you did
before but this time with the following code

command_to_execute="ruby -e \'require \"exerb/version\"; puts Exerb::VERSION"
begin
@exerb_major_version = IO.popen(command_to_execute).gets.split(".")[0]
rescue
@exerb_major_version = "0"
end

or you deliver the complete exerb package together with your
extensions. Then you don't need to check anything.

Mixing both styles seems like a bad idea and i guess what you want is the
former.

By the way. On the website i couldn't find the source code. Only zip
files containing binaries.
 
R

Rich

Thanks again for working with me - I really haven't written that much Ruby
(much less distributed anything that more than a handfull of people have
used).

(Reply embedded and following)

----- Original Message -----
From: "Lothar Scholz" <[email protected]>
To: "ruby-talk ML" <[email protected]>; <[email protected]>
Cc: "ruby-talk ML" <[email protected]>
Sent: Friday, June 11, 2004 6:24 PM
Subject: Re: [ANN] EZExerb 2.0

Hello Rich,

R> I'm testing it on WinXP and it's saying that it found ver. 3.2.0, when the
R> test box doesn't have a bit of ruby on it.

R> All - Sorry for this noise, let me figure out what's going on and send more
R> in a bit.

Think that this simply means that for some reasons you embedded the
exerb/version file into your .exe file. Don't know why you want to do
this.

I noticed that too - you're solution is perfect - it's kinda what I wanted
You can simply call exerb as a ruby command line script as you did
before but this time with the following code

command_to_execute="ruby -e \'require \"exerb/version\"; puts Exerb::VERSION"
begin
@exerb_major_version = IO.popen(command_to_execute).gets.split(".")[0]
rescue
@exerb_major_version = "0"
end

or you deliver the complete exerb package together with your
extensions. Then you don't need to check anything.

There are only two things that are holding me back from distributing Exerb
embedded in my application since I want the source to be 'semi-closed'.

One: I can't figure out how to embed the mkexr script in my application, and
generate my exr file internally. Right now I have to generate it externally
and output the exr file in the same location as the base Ruby script, then
delete it when I'm done. I don't like this solution, since it still makes me
dependant on exerb being installed.

Two: I haven't looked into the license for Exerb, and I haven't really
decided on a license for my product. I know I don't really care if someone
get's the source, but I want to be the only one who messes with this
program. I guess I really haven't figured out what I'm going to do...
Mixing both styles seems like a bad idea and i guess what you want is the
former.

By the way. On the website i couldn't find the source code. Only zip
files containing binaries.

Again - the license issue - I still haven't figured out what I'm doing.
Would you think it ok to not release the source? I really like the idea of
just having a pre-packaged one-click install program where everything just
works... it reminds me of the one-click installer for Ruby on Windows by the
Prag. Prog. and how I started in Ruby... it was easy and it just worked.

-Richard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top