# \[ANN\] rubyforge-0.1.1

**URL:** <https://www.ruby-forum.com/t/ann-rubyforge-0-1-1/53745>\
**Category:** Ruby\
**Created:** [February 14, 2006, 5:09am UTC](https://www.ruby-forum.com/t/ann-rubyforge-0-1-1/53745 "2006-02-14T05:09:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [February 14, 2006, 5:09am UTC](https://www.ruby-forum.com/t/ann-rubyforge-0-1-1/53745/1 "2006-02-14T05:09:35Z")

</div>

SIMPLIFY SHARING YOUR RUBYGEMS ON RUBYFORGE!

~\> gem install rubyforge

SYNOPSIS

rubyforge [options]\* mode [mode\_args]\*

DESCRIPTION

simplistic script which automates a limited set of rubyforge  
operations

MODES

setup()  
initializes your .rubyforge directory. you need to run this first  
before  
doing anything else.

```
 example :
   rubyforge setup

```

login()  
sends username and password from config.yml (or  
–username/–password  
options) and stores login cookie in cookie.dat. this is required  
for  
subsquent operations work.

```
 example :
   rubyforge login
   rubyforge login --username zaphod --password 42

```

create\_package(group\_id, package\_name)  
creates the named package under the specified group.

```
 example :
   rubyforge create_package 1024 traits
   rubyforge login && rubyforge create_package codeforpeople.com 

```

traits

```
 notes :
   in order to use group_ids by name, rather than number, you must 

```

edit the  
rubyforge[group\_ids] translation table in your config.yml.

add\_release(group\_id, package\_id, release\_name, userfile)  
release a file as release\_name under the specified group\_id and  
package\_id.

```
 example :
   rubyforge add_release codeforpeople.com traits 0.8.0 

```

traits-0.8.0.gem  
rubyforge add\_release [codeforpeople.com](http://codeforpeople.com) traits 0.8.0  
traits-0.8.0.tgz  
rubyforge add\_release 1024 1242 0.8.0 traits-0.8.0.gem  
rubyforge login && rubyforge add\_release 1024 1242 0.8.0  
traits-0.8.0.gem

```
 notes :
   in order to use group_ids and package_ids by name, rather than 

```

number,  
you must edit the rubyforge[group\_ids] and rubyforge[package\_ids]  
translation tables in your config.yml.

delete\_package(group\_id, package\_name)  
deletes a package and all it’s files.

```
 example :
   rubyforge delete_package codeforpeople.com traits
   rubyforge delete_package 1024 traits

```

NOTES

- you can determine the group\_id and package\_id of projects and  
packages by

project.  
near the bottom you’ll see links to ‘add a release’ or  
‘edit a  
release’ - hover over the url and you’ll notice the query  
string, which looks something like

```
             ?package_id=1242&group_id=1024

           and that's what you need to know

```

- don’t forget to login! logging in will store a cookie in your  
.rubyforge directory which expires after a time. always run the  
login  
command before any operation that requires authentication, such as  
uploading a package.

TODO

- scrape rubyforge to auto-configure group\_id and package\_ids.

- objectify the script. it’s procedural butchery attm.

- add error checking. this requires screen scraping to see of an  
operation  
succeeded since 200 is returned from rubyforge even for failed  
operations  
and only the html text reveals the status.

- add more functionality.

OPTIONS

global :  
–help , -h  
this message  
–config , -c  
specify a config file (default  
/home/ahoward/.rubyforge/config.yml)  
–username , -u  
specify username, taken from config otherwise  
–password , -p  
specify password, taken from config otherwise  
–cookie\_jar , -C  
specify cookie storage file (default  
/home/ahoward/.rubyforge/cookie.dat)

add\_release :  
–is\_private , -P  
if true, release is not public  
–release\_date , -r  
specify time of release (default ‘now’)  
–type\_id , -t  
specify filetype code (default determined by ext)  
–processor\_id , -o  
specify processor (default ‘Any’)  
–release\_notes , -n  
specify release notes as string or file  
–release\_changes , -a  
specify release changes as string or file  
–preformatted , -f  
specify whether release\_notes/changes are preformatted

enjoy.

-a

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [February 14, 2006, 11:04am UTC](https://www.ruby-forum.com/t/ann-rubyforge-0-1-1/53745/2 "2006-02-14T11:04:02Z")

</div>

Cool, thanks for the script. I’m just starting a project on rubyforge,  
so this may be very useful indeed.

Incidentally, the quote in your signature is just a way of stating the  
Fallacy of Prior Investment. To value something by the investment  
already made ignores the majority of the equation (i.e. potential  
future returns). It is unfortunately a common trap for the human mind  
to fall into. The saying is not nearly as wise as it sounds.

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [February 14, 2006, 3:54pm UTC](https://www.ruby-forum.com/t/ann-rubyforge-0-1-1/53745/3 "2006-02-14T15:54:49Z")

</div>

On Tue, 14 Feb 2006, Timothy G. wrote:

> Cool, thanks for the script. I’m just starting a project on rubyforge, so  
> this may be very useful indeed.

glad to hear it. share and share alike.

> Incidentally, the quote in your signature is just a way of stating the  
> Fallacy of Prior Investment. To value something by the investment already  
> made ignores the majority of the equation (i.e. potential future returns).  
> It is unfortunately a common trap for the human mind to fall into. The  
> saying is not nearly as wise as it sounds.

i’m not sure that’s what he meant. i think it’s more along the lines  
of: if  
you are rich and powerful but you missed out on your childs youth  
working so  
hard to get there, are you really successful?

kind regards.

-a

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [February 19, 2006, 11:36pm UTC](https://www.ruby-forum.com/t/ann-rubyforge-0-1-1/53745/4 "2006-02-19T23:36:12Z")

</div>

On Monday 13 February 2006 23:09, removed\_email\_address@domain.invalid wrote:  
| add\_release(group\_id, package\_id, release\_name, userfile)  
| release a file as release\_name under the specified group\_id and  
| package\_id.  
|  
| example :  
| rubyforge add\_release [codeforpeople.com](http://codeforpeople.com) traits 0.8.0  
| traits-0.8.0.gem rubyforge add\_release [codeforpeople.com](http://codeforpeople.com) traits 0.8.0  
| traits-0.8.0.tgz rubyforge add\_release 1024 1242 0.8.0 traits-0.8.0.gem

For my project, I release 6 files for each release. If I use 6  
add\_release,  
then I get 6 release\_ids.

% rubyforge add\_release xmltv2html xmltv2html 0.7.1  
~/xmltv2html-0.7.1.zip

Example after 2 add\_release:

0.7.1 2006-02-19 17:27  
xmltv2html-0.7.1.zip.md5sum 55 bytes 0 Any text  
0.7.1 2006-02-19 17:27  
xmltv2html-0.7.1.zip 46 KB 0 Any .zip

I want all 6 files under the same release\_id. Can this be done with  
rubyforge?

[http://rubyforge.org/frs/?group\_id=772](http://rubyforge.org/frs/?group_id=772)

Regards,  
Kurt
