[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

[ANN] newgem - Create gems for your libraries and apps

Dr Nic

10/11/2006 11:23:00 AM

Now you can take any library or Rails plugin or command line
application, gemify it, and easily share it with the Ruby world.

With gems you get in-built version support (you can specify which
version of a gem you want when you use it via the require_gem method),
an encapsulated, consistent folder structure for your bin/lib/test
folders, and you get cross-platform support for bin apps. Too much
niftiness to ignore, really.

The New Gem Generator is like the rails command for rails applications,
but it creates the folders and starting files for a new gem. Itâ??s called
newgem.

Installation
> gem install newgem

Create new gem
> newgem map_by_method
creating: map_by_method
creating: map_by_method/CHANGELOG
creating: map_by_method/README
creating: map_by_method/lib
creating: map_by_method/lib/map_by_method
creating: map_by_method/lib/map_by_method.rb
creating: map_by_method/lib/map_by_method/version.rb
creating: map_by_method/Rakefile
creating: map_by_method/test
creating: map_by_method/test/all_tests.rb
creating: map_by_method/test/test_helper.rb
creating: map_by_method/test/map_by_method_test.rb
creating: map_by_method/examples
creating: map_by_method/bin

And away you go. The rest of the tutorial and comments are at:
http://drnicwilliams.com/2006/10/11/generating...

I hope this encourages you to share more code with others (both outside
and inside your own workplace).

Nic

--
Posted via http://www.ruby-....

4 Answers

Dr Nic

10/11/2006 11:59:00 AM

0

Robert MannI wrote:
> This is great. You're cooking up one sweet Ruby library after another.
>
> Calling it "gemify" isn't an option? Sounds sweeter.

Unfortunately all voting on project names happens before the project is
released. That is, I voted alone between: newgem, gemnew, new_gem,
gem_new. You get the jist of my unimaginative options.

I like gemify as a command name though. Perhaps I'll add it in the bin
folder as a duplicate, just for you :)

Nic

--
Posted via http://www.ruby-....

Dr Nic

10/11/2006 3:19:00 PM

0

A new version will come out soon that will include the setup.rb file in
the generated gems

http://i.loveruby.net/en/proje...

I never knew it existed, but if your users can't type the words "gem
install <yourproject>" then running the setup.rb script for your library
will make them very happy.

Nic

--
Posted via http://www.ruby-....

Christian Neukirchen

10/12/2006 11:53:00 AM

0

Dr Nic <drnicwilliams@gmail.com> writes:

> A new version will come out soon that will include the setup.rb file in
> the generated gems
>
> http://i.loveruby.net/en/proje...
>
> I never knew it existed, but if your users can't type the words "gem
> install <yourproject>" then running the setup.rb script for your library
> will make them very happy.
>
> Nic

Thank you.

--
Christian Neukirchen <chneukirchen@gmail.com> http://chneuk...

Teena Khedkar

1/16/2008 5:28:00 AM

0

hi friends,
i need help on creating a gem. Am following the Dr. Nic tutorial
"http://drnicwilliams.com/2006/10/11/generating-new-gems/#newgem_re...

i started with installation of the new gem

step 1)---> gem install newgem

step 2)---> newgem <gem name>
here it creates the folder successfully with the name i gave, n it
allows the manipulation which is required by me.

here comes my problem????????
step 3)---> rake package
while creating a gem with the "rake package command", I came across an
error saying "could'nt find HOME environment --expanding '~/hoerc'"
which is followed by number of error lines.....

c:/ruby/lib/ruby/gems/1.8/gems/hoe-1.4.0/lib/hoe.rb:327:in 'expand_path'
c:/ruby/lib/ruby/gems/1.8/gems/hoe-1.4.0/lib/hoe.rb:327:in 'with_config'
c:/ruby/lib/ruby/gems/1.8/gems/hoe-1.4.0/lib/hoe.rb:363:in
'define_tasks'
c:/ruby/lib/ruby/gems/1.8/gems/hoe-1.4.0/lib/hoe.rb:322:in 'initialize'
/config/hoe.rb:50:in 'new'

please tell me where iam going wrong!!!!!!!!!!!!!!!!!
--
Posted via http://www.ruby-....