forked from drnic/newgem
/
rubyforge.html
282 lines (193 loc) · 9.73 KB
/
rubyforge.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<link rel="stylesheet" href="stylesheets/screen.css" type="text/css" media="screen" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
New Gem Generator
</title>
<script src="javascripts/rounded_corners_lite.inc.js" type="text/javascript"></script>
<style>
</style>
<script type="text/javascript">
window.onload = function() {
settings = {
tl: { radius: 10 },
tr: { radius: 10 },
bl: { radius: 10 },
br: { radius: 10 },
antiAlias: true,
autoPad: true,
validTags: ["div"]
}
var versionBox = new curvyCorners(settings, document.getElementById("version"));
versionBox.applyCornersToAll();
}
</script>
</head>
<body>
<div id="main">
<h1>New Gem Generator</h1>
<div id="version"> <!-- class="clickable" onclick='document.location = "http://rubyforge.org/projects/newgem"; return true' -->
<p>Get Version</p>
<a href="http://rubyforge.org/projects/newgem" class="numbers">0.23.1</a>
<p>Featured in</p>
<a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&location=http%3A%2F%2Fwww.amazon.com%2FBeginning-Ruby-Novice-Professional-Experts%2Fdp%2F1590597664%2F&tag=drnic-20&linkCode=ur2&camp=1789&creative=9325" class="book"><img src="images/beginning-ruby.jpg" /></a>
</div>
<h1>→ using ‘rubyforge’</h1>
<p>The New Gem Generator makes it very easy for you to upload your gems to RubyForge, thanks to the integration of the <code>hoe</code> and <code>rubyforge</code> gems, by <a href="http://blog.zenspider.com/">Ryan Davis</a>.</p>
<p>This page describes how to setup the <em>rubyforge</em> application (lowercase rubyforge = the application), create new RubyForge projects (uppercase RubyForge = the website for hosting gems and homepages), and releasing your gems and their future versions to RubyForge using <em>rubyforge</em>.</p>
<h2>Get a RubyForge project.</h2>
<p>RubyForge is a great site for uploading gems, as the default settings of all RubyGems users is to look for new gems there. You can run your own gem server, but here we’ll assume you’re uploading to RubyForge.</p>
<p>Additionally, you can host more than one gem on each project. The Magic Models project hosts several gems, each with different versions.</p>
<p>To host your gems you’ll need a Project. Apply for it asap as it takes a day or so for the RubyForge admins to accept and generate your project.</p>
<p><strong>Note:</strong> the name of your project does not have to match the name of any of your gems.</p>
<h3>Setup access to RubyForge</h3>
<p>Your new gem will use the rubyforge app to upload your gem. So first we need to set it up.</p>
<pre>$ sudo gem install rubyforge
$ rubyforge setup
$ mate ~/.rubyforge/user-config.yml
</pre>
<p>This creates a configuration folder <code>.rubyforge</code> in your home folder (on Windows it is <span class="caps">XXXXXX</span>). The last line is to edit the config file.</p>
<p>The only two lines to set are your RubyForge <strong>username</strong> and <strong>password</strong>. Ignore the rest.</p>
<pre>$ rubyforge config</pre>
<p>This generates a file <code>~/.rubyforge/auto-config.yml</code> which will be mostly empty now, but one day will be full of projects and all the releases of different versions of gems. One day soon I hope.</p>
<p>Just like the website, all other operations require you to login first.</p>
<pre>$ rubyforge login</pre>
<p>If this fails, check your user-config.yml files for problems with your username/password.</p>
<h3>Preparing for a new gem</h3>
<p>When you first release a new gem, you need to perform one more step.</p>
<pre>$ rubyforge login
$ rubyforge names
</pre>
<p>This will return the name of your new Project, if you forgot it.</p>
<pre>$ rubyforge create_package #project_name# #gem_name#
</pre>
<p>Alternately, if you can’t get this to work, you can create the new package via the website.</p>
<ol>
<li><a href="https://rubyforge.org/account/login.php">Login to RubyForge</a></li>
<li>Go to your project’s page</li>
<li>Click on <strong>Files</strong>.</li>
<li>Click on <strong>To create new release click here</strong>.</li>
<li>Click on <strong>Create a new package</strong>.</li>
<li>Go to the bottom of the page, to the form <strong>New Package Name</strong>.</li>
<li>Enter a package name, without spaces, and generally in all lowercase letters.</li>
<li>Click <strong>Create This Package</strong></li>
</ol>
<p>Now return to the console/terminal, and refresh your rubyforge config files using <code>rubyforge config</code>.</p>
<p>Check that the new package has been successfully added to your local config files using <code>rubyforge name</code>. The new package should appear in the list of package names.</p>
<h2>You are now ready to release gems!</h2>
<p><a href="index.html#setup_rubyforge">Return to releasing your gem</a></p>
<h2>rubyforge docco</h2>
<p>The best rubyforge command documentation is available via the application itself (see below) and the <a href="http://codeforpeople.rubyforge.org/rubyforge/">RDocs</a></p>
<pre>$ rubyforge help
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
config([project])
Helps you populate your auto-config.yml file by scraping rubyforge and
getting your groups, projects, and releases.
example :
rubyforge config
rubyforge config myproject
names()
Prints out the names of your configured groups and projects.
example :
rubyforge names
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
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 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
add_file(group_id, package_id, release_id, userfile)
add a file to an existing release under the specified group_id,
package_id, and release_id
example :
rubyforge add_file codeforpeople.com traits 0.8.0 traits-0.8.0.gem
rubyforge add_file codeforpeople.com traits 0.8.0 traits-0.8.0.tgz
rubyforge add_file 1024 1242 0.8.0 traits-0.8.0.gem
delete_package(group_id, package_name)
deletes a package and all its files.
example :
rubyforge delete_package codeforpeople.com traits
rubyforge delete_package 1024 traits
NOTES
- In order to use group_id, package_id, or release_id by name,
rather than number, you must edit the rubyforge[group_ids] and
rubyforge[package_ids] translation tables in your config.yml. See
the config command for more information and help.
- 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
- 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.
OPTIONS
global :
--help , -h
this message
--config , -c
specify a config file (default /Users/nicwilliams/.rubyforge/user-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 /Users/nicwilliams/.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
</pre>
<p class="coda">
<a href="mailto:drnicwilliams@gmail.com">Dr Nic</a>, 5th March 2008<br>
Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
</p>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-567811-9");
pageTracker._initData();
pageTracker._trackPageview();
</script>
</body>
</html>