website/index.html in newgem-0.25.0 vs website/index.html in newgem-0.27.0

- old
+ new

@@ -22,56 +22,55 @@ autoPad: true, validTags: ["div"] } var versionBox = new curvyCorners(settings, document.getElementById("version")); versionBox.applyCornersToAll(); + + var twitterBox = new curvyCorners(settings, document.getElementById("twitter_search")); + twitterBox.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.25.0</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 class="sidebar"> + + <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.27.0</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> + + <div id="twitter_search"> + <h3>Heard on twitter ('newgem')...</h3> + <!-- HELP FILE - http://twitterwidget.jazzychad.com/tw/ --> + <script language = "javascript"> + var jtw_search = 'newgem'; + var jtw_widget_background = 'B3ABFF'; + var jtw_widget_border = '0'; + var jtw_tweet_textcolor = 'fff'; + var jtw_tweet_background = '000'; + var jtw_tweet_border = '0px'; + </script> + <script src="http://twitterwidget.jazzychad.com/tw/searchwidget.js" type="text/javascript"></script> + </div> </div> - <h1>&#x2192; &#8216;newgem&#8217;</h1> - - - <h2>What</h2> - - - <p>Quickly bundle any Ruby libraries into a RubyGem and share it with the world, your colleagues, or perhaps just with yourself amongst your projects.</p> - - - <p>RubyGems are centrally stored, versioned, and support dependencies between other gems, so they are the ultimate way to bundle libraries, executables, associated tests, examples, and more.</p> - - - <p>Within this gem, you get one thing &#8211; <code>newgem</code> &#8211; an executable to create your own gems. Your new gems will include designated folders for Ruby code, test files, executables, and even a default website page for you to explain your project, and which instantly uploads to RubyForge website (which looks just like this one by default)</p> - - - <h2>Installing</h2> - - - <p>The <code>newgem</code> application is distributed itself as a RubyGem and is available immediately after installation.</p> - - - <p><pre class='syntax'><span class="ident">sudo</span> <span class="ident">gem</span> <span class="ident">install</span> <span class="ident">newgem</span></pre></p> - - - <p>Alternately, download the gem and install manually.</p> - - - <h2>The basics</h2> - - - <p>Go to the folder where you want to create your new gem folder structure, and run the <code>newgem</code> command to generate your gem scaffolding.</p> - - + <h1>newgem</h1> +<h2>What</h2> +<p>Quickly bundle any Ruby libraries into a RubyGem and share it with the world, your colleagues, or perhaps just with yourself amongst your projects.</p> +<p>RubyGems are centrally stored, versioned, and support dependencies between other gems, so they are the ultimate way to bundle libraries, executables, associated tests, examples, and more.</p> +<p>Within this gem, you get one thing &#8211; <code>newgem</code> &#8211; an executable to create your own gems. Your new gems will include designated folders for Ruby code, test files, executables, and even a default website page for you to explain your project, and which instantly uploads to RubyForge website (which looks just like this one by default)</p> +<h2>Installing</h2> +<p>The <code>newgem</code> application is distributed itself as a RubyGem and is available immediately after installation.</p> +<p><pre class='syntax'><span class="ident">sudo</span> <span class="ident">gem</span> <span class="ident">install</span> <span class="ident">newgem</span></pre></p> +<p>Alternately, download the gem and install manually.</p> +<h2>The basics</h2> +<p>Go to the folder where you want to create your new gem folder structure, and run the <code>newgem</code> command to generate your gem scaffolding.</p> <pre>$ cd ~/ruby_projects $ newgem wizzo create create config create doc @@ -122,244 +121,112 @@ ========= * Open config/hoe.rb * Update missing details (gem description, dependent gems, etc.) </pre> - - <p>As of 0.10.0 &#8211; you can generate test::unit or rspec test stubs via the <code>-T</code> or <code>--test-with</code> options. For example, <code>-T rspec</code> generates a <code>spec</code> folder with some test stubs.</p> - - - <h3>Setup</h3> - - - <p>Now modify the constants at the top of <strong>config/hoe.rb</strong>, with your name, email and the location where you&#8217;ll host your website for the gem. The defaults are tied to RubyForge for uploading the gems and the website (see below).</p> - - - <h3>Create code and tests</h3> - - - <p>Then create your libraries (files in <code>lib</code>) and your tests (files in <code>test</code> that look like <code>test_TESTNAME.rb</code>). <a href="http://blog.grayproductions.net/">James Edward Gray II</a> did a <a href="http://macromates.com/screencasts">nice video</a> on test-driven design, that&#8217;s worth watching if <span class="caps">TDD</span> is new to you.</p> - - - <p>If you create any new files, you need to manually add them to the Manifest.txt. Alphabetical order is optional, but it will make the results of <code>rake check_manifest</code> look clean if you keep them ordered. If a file is not in the Manifest.txt it will not be included in the gem when you package and release it.</p> - - - <h3>Executables</h3> - - - <p>You can include executable Ruby applications in your gem, which will be accessible on Windows and Unix/Linux/MacOS, by creating scripts in the <code>bin</code> folder. When the gem is deployed by users, these executables will be automatically placed within their path.</p> - - - <h3>Website</h3> - - - <p>The final step before releasing your gem to the world is the all-important website. Edit the file <code>website/index.txt</code> using Textile/Redcloth syntax. Syntax highlighting is also supported (see below). If you need more website pages, create more <strong>txt</strong> files in the website folder.</p> - - - <p>Run the rake task <code>rake website_generate</code> to convert all your website txt files into html files.</p> - - - <p><span class="caps">NOTE</span>: Currently, the initial <code>index.txt</code> file includes my details not yours. Currently you need to change this manually.</p> - - - <p>If you don&#8217;t want a website, remove the <code>website</code> related files from the Manifest.txt.</p> - - - <h3>Change the gems version number</h3> - - - <p>The version number is set in the file <code>lib/#gem name#/version.rb</code>. Update it as appropriate with major, minor and bug fix numbers. This value will be used when generating your website, for example.</p> - - - <h3>Check the manifest</h3> - - +<p>As of 0.10.0 &#8211; you can generate test::unit or rspec test stubs via the <code>-T</code> or <code>--test-with</code> options. For example, <code>-T rspec</code> generates a <code>spec</code> folder with some test stubs.</p> +<h3>Setup</h3> +<p>Now modify the constants at the top of <strong>config/hoe.rb</strong>, with your name, email and the location where you&#8217;ll host your website for the gem. The defaults are tied to RubyForge for uploading the gems and the website (see below).</p> +<h3>Create code and tests</h3> +<p>Then create your libraries (files in <code>lib</code>) and your tests (files in <code>test</code> that look like <code>test_TESTNAME.rb</code>). <a href="http://blog.grayproductions.net/">James Edward Gray II</a> did a <a href="http://macromates.com/screencasts">nice video</a> on test-driven design, that&#8217;s worth watching if <span class="caps">TDD</span> is new to you.</p> +<p>If you create any new files, you need to manually add them to the Manifest.txt. Alphabetical order is optional, but it will make the results of <code>rake check_manifest</code> look clean if you keep them ordered. If a file is not in the Manifest.txt it will not be included in the gem when you package and release it.</p> +<h3>Executables</h3> +<p>You can include executable Ruby applications in your gem, which will be accessible on Windows and Unix/Linux/MacOS, by creating scripts in the <code>bin</code> folder. When the gem is deployed by users, these executables will be automatically placed within their path.</p> +<h3>Website</h3> +<p>The final step before releasing your gem to the world is the all-important website. Edit the file <code>website/index.txt</code> using Textile/Redcloth syntax. Syntax highlighting is also supported (see below). If you need more website pages, create more <strong>txt</strong> files in the website folder.</p> +<p>Run the rake task <code>rake website_generate</code> to convert all your website txt files into html files.</p> +<p><span class="caps">NOTE</span>: Currently, the initial <code>index.txt</code> file includes my details not yours. Currently you need to change this manually.</p> +<p>If you don&#8217;t want a website, remove the <code>website</code> related files from the Manifest.txt.</p> +<h3>Change the gems version number</h3> +<p>The version number is set in the file <code>lib/#gem name#/version.rb</code>. Update it as appropriate with major, minor and bug fix numbers. This value will be used when generating your website, for example.</p> +<h3>Check the manifest</h3> <blockquote>Manifest: a customs document listing the contents put on a ship or plane.</blockquote> -<cite><a href="http://www.google.com/search?q=define%3Amanifest">Google &#8211; define:manifest</a></cite> - - <p>Similarly here, a manifest is the log of the files to be packaged into a gem. If its not in the <code>Manifest.txt</code> file, the users won&#8217;t get it.</p> - - - <p>Before you package your gem, you can compared the list of files in your gem folder, with the Manifest.txt:</p> - - +<p><cite><a href="http://www.google.com/search?q=define%3Amanifest">Google &#8211; define:manifest</a></cite></p> +<p>Similarly here, a manifest is the log of the files to be packaged into a gem. If its not in the <code>Manifest.txt</code> file, the users won&#8217;t get it.</p> +<p>Before you package your gem, you can compared the list of files in your gem folder, with the Manifest.txt:</p> <pre>rake check_manifest</pre> - - <p>The results show a <em>diff</em> of the two.</p> - - - <h2>Package and test locally</h2> - - - <p>Before releasing a new version of a gem, it is a great idea to install the gem locally and do some sanity checks. You know, to limit the chance of you looking like a noob.</p> - - +<p>The results show a <em>diff</em> of the two.</p> +<h2>Package and test locally</h2> +<p>Before releasing a new version of a gem, it is a great idea to install the gem locally and do some sanity checks. You know, to limit the chance of you looking like a noob.</p> <pre>rake local_deploy</pre> - - <p>This generates the website html files into your website folder, and locally installs the gem, ready for testing and local use.</p> - - - <p>Now pretend to be a user, and do some tests &#8211; especially of new functionality &#8211; so you are comfortable all the files have been packaged up, and you haven&#8217;t missed anything in the <code>Manifest.txt</code>.</p> - - - <p>One set of tests you should do is to repeat any tutorials you include in your website. If your gem is dependent on other gems that are rapidly changing, its possible your tutorial might be invalid even if your unit tests are successful. Best you find any errors before the users start emailing you!</p> - - - <h2>Releasing your gem to the world</h2> - - - <p>Once you&#8217;re ready for release there are some final steps.</p> - - - <p><a name="setup_rubyforge"></a></p> - - - <h3>Setup your environment to upload to RubyForge.</h3> - - - <p>There are several steps you need to perform initially to <a href="rubyforge.html">setup your environment for uploading gems to RubyForge</a>.</p> - - - <h3>Document changes in History.txt</h3> - - - <p>Between each version of your gem, you probably changed something. You should document this in the <code>History.txt</code> file. For each new release, you need to add two paragraphs that look like this:</p> - - +<p>This generates the website html files into your website folder, and locally installs the gem, ready for testing and local use.</p> +<p>Now pretend to be a user, and do some tests &#8211; especially of new functionality &#8211; so you are comfortable all the files have been packaged up, and you haven&#8217;t missed anything in the <code>Manifest.txt</code>.</p> +<p>One set of tests you should do is to repeat any tutorials you include in your website. If your gem is dependent on other gems that are rapidly changing, its possible your tutorial might be invalid even if your unit tests are successful. Best you find any errors before the users start emailing you!</p> +<h2>Releasing your gem to the world</h2> +<p>Once you&#8217;re ready for release there are some final steps.</p> +<p><a name="setup_rubyforge"></a></p> +<h3>Setup your environment to upload to RubyForge.</h3> +<p>There are several steps you need to perform initially to <a href="rubyforge.html">setup your environment for uploading gems to RubyForge</a>.</p> +<h3>Document changes in History.txt</h3> +<p>Between each version of your gem, you probably changed something. You should document this in the <code>History.txt</code> file. For each new release, you need to add two paragraphs that look like this:</p> <pre>== 0.5.4 14/4/2007 - + * 1 major improvement * 150% more Wizzos * 2 bug fixes * Wizzos are the proper colour * You only get Wizzos when you ask for them </pre> - - <p>The two paragraphs will be automatically picked up by the following release process and documented against the release on RubyForge site. To see an example of the end result, look at the <a href="http://newgem.rubyforge.org/rdoc/files/History_txt.html"><strong>History</strong> page for newgem</a>.</p> - - - <p>The History.txt notes for your first release have already been started for you.</p> - - - <h3>Release the gem and upload the website and rdocs</h3> - - - <p>Run <code>rake deploy VERSION=X.Y.Z</code> after you&#8217;ve done all these steps. It does the following:</p> - - - <ol> +<p>The two paragraphs will be automatically picked up by the following release process and documented against the release on RubyForge site. To see an example of the end result, look at the <a href="http://newgem.rubyforge.org/rdoc/files/History_txt.html"><strong>History</strong> page for newgem</a>.</p> +<p>The History.txt notes for your first release have already been started for you.</p> +<h3>Release the gem and upload the website and rdocs</h3> +<p>Run <code>rake deploy VERSION=X.Y.Z</code> after you&#8217;ve done all these steps. It does the following:</p> +<ol> <li>Uploads your website to rubyforge</li> - <li>Uploads your rdocs to rubyforge</li> - <li>Packages and uploads your gem to RubyForge</li> - </ol> - - - <p>It can take an hour or two before new gem releases are available via the gem installer. But when they are ready, everyone will be able to download and install your gem using:</p> - - + <li>Uploads your rdocs to rubyforge</li> + <li>Packages and uploads your gem to RubyForge</li> +</ol> +<p>It can take an hour or two before new gem releases are available via the gem installer. But when they are ready, everyone will be able to download and install your gem using:</p> <pre>sudo gem install #gem_name#</pre> - - <p>If your <span class="caps">GEM</span>_NAME and <span class="caps">RUBYFORGE</span>_PROJECT name are the same, then:</p> - - - <ul> +<p>If your GEM_NAME and RUBYFORGE_PROJECT name are the same, then:</p> +<ul> <li>http://RUBYFORGE_PROJECT.rubyforge.org is your website, and</li> - <li>http://RUBYFORGE_PROJECT.rubyforge.org/rdoc is your rdocs</li> - </ul> - - - <p>If they are different, then:</p> - - - <ul> + <li>http://RUBYFORGE_PROJECT.rubyforge.org/rdoc is your rdocs</li> +</ul> +<p>If they are different, then:</p> +<ul> <li>http://RUBYFORGE_PROJECT.rubyforge.org/GEM_NAME is your website, and</li> - <li>http://RUBYFORGE_PROJECT.rubyforge.org/GEM_NAME/rdoc is your rdocs</li> - </ul> - - - <h2>Bonus tasks thanks to Hoe</h2> - - - <p>Your gem uses the Hoe gem to provide a dozen or so useful rake tasks for managing your gem, such as <code>release</code>, <code>check_manifest</code> and <code>publish_docs</code>.</p> - - - <p>See them all with:</p> - - + <li>http://RUBYFORGE_PROJECT.rubyforge.org/GEM_NAME/rdoc is your rdocs</li> +</ul> +<h2>Bonus tasks thanks to Hoe</h2> +<p>Your gem uses the Hoe gem to provide a dozen or so useful rake tasks for managing your gem, such as <code>release</code>, <code>check_manifest</code> and <code>publish_docs</code>.</p> +<p>See them all with:</p> <pre>rake -T</pre> - - <p>Remember, the Rakefile is yours to extend as you please with more rake tasks, such as the <code>website</code> tasks which are already added.</p> - - - <p>For more information about each task, see the <a href="http://seattlerb.rubyforge.org/hoe/">Hoe <span class="caps">README</span></a></p> - - - <h2>Related articles</h2> - - - <ul> +<p>Remember, the Rakefile is yours to extend as you please with more rake tasks, such as the <code>website</code> tasks which are already added.</p> +<p>For more information about each task, see the <a href="http://seattlerb.rubyforge.org/hoe/">Hoe <span class="caps">README</span></a></p> +<h2>Related articles</h2> +<ul> <li><a href="http://drnicwilliams.com/2006/10/11/generating-new-gems/">Original blog article and tutorial</a></li> - <li><a href="http://nubyonrails.com/articles/2007/06/15/tutorial-publishing-rubygems-with-hoe">Tutorial: Publishing RubyGems with Hoe</a> by <a href="http://geoffreygrosenbach.com/">Geoffrey Grosenbach</a> </li> - <li><a href="http://codeconversations.blogspot.com/2007/07/using-new-gem-generator-in-windows_8009.html">Using New Gem Generator in Windows</a> by <a href="http://codeconversations.blogspot.com/">Jorge Cangas</a></li> - <li><a href="http://bogojoker.com/blog/2008/05/building-a-ruby-gem/">Building a Ruby Gem</a> by <a href="http://bogojoker.com/">Joseph Pecoraro</a> (includes a Problems/Troubleshooting section!!)</li> - </ul> - - - <h2>Dr Nic&#8217;s Blog</h2> - - - <p><a href="http://www.drnicwilliams.com">http://www.drnicwilliams.com</a> &#8211; for future announcements and + <li><a href="http://nubyonrails.com/articles/2007/06/15/tutorial-publishing-rubygems-with-hoe">Tutorial: Publishing RubyGems with Hoe</a> by <a href="http://geoffreygrosenbach.com/">Geoffrey Grosenbach</a></li> + <li><a href="http://codeconversations.blogspot.com/2007/07/using-new-gem-generator-in-windows_8009.html">Using New Gem Generator in Windows</a> by <a href="http://codeconversations.blogspot.com/">Jorge Cangas</a></li> + <li><a href="http://bogojoker.com/blog/2008/05/building-a-ruby-gem/">Building a Ruby Gem</a> by <a href="http://bogojoker.com/">Joseph Pecoraro</a> (includes a Problems/Troubleshooting section!!)</li> +</ul> +<h2>Dr Nic&#8217;s Blog</h2> +<p><a href="http://www.drnicwilliams.com">http://www.drnicwilliams.com</a> &#8211; for future announcements and<br /> other stories and things.</p> - - - <h2>Forum</h2> - - - <p><a href="http://groups.google.com/group/new-gem-generator">http://groups.google.com/group/new-gem-generator</a></p> - - - <h2>How to submit patches</h2> - - - <p>Read the <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/">8 steps for fixing other people&#8217;s code</a> and for section <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/#8b-google-groups">8b: Submit patch to Google Groups</a>, use the Google Group above.</p> - - - <p>You can fetch the source from either:</p> - - - <ul> - <li>rubyforge: <a href="http://rubyforge.org/scm/?group_id">http://rubyforge.org/scm/?group_id=</a>=</li> - </ul> - - +<h2>Forum</h2> +<p><a href="http://groups.google.com/group/new-gem-generator">http://groups.google.com/group/new-gem-generator</a></p> +<h2>How to submit patches</h2> +<p>Read the <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/">8 steps for fixing other people&#8217;s code</a> and for section <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/#8b-google-groups">8b: Submit patch to Google Groups</a>, use the Google Group above.</p> +<p>You can fetch the source from either:</p> +<ul> + <li>rubyforge: <a href="http://rubyforge.org/scm/?group_id=2340">http://rubyforge.org/scm/?group_id=2340</a></li> +</ul> <pre>git clone git://rubyforge.org/newgem.git</pre> - - <ul> +<ul> <li>github: <a href="http://github.com/drnic/newgem/tree/master">http://github.com/drnic/newgem/tree/master</a></li> - </ul> - - +</ul> <pre>git clone git://github.com/drnic/newgem.git</pre> - - <h3>Build and test instructions</h3> - - +<h3>Build and test instructions</h3> <pre>cd newgem rake test rake install_gem</pre> - - <h2>License</h2> - - - <p>This code is free to use under the terms of the <span class="caps">MIT</span> license.</p> - - - <h2>Contact</h2> - - - <p>Comments are welcome. Send an email to <a href="mailto:drnicwilliams@gmail.com">Dr Nic Williams</a>.</p> +<h2>License</h2> +<p>This code is free to use under the terms of the <span class="caps">MIT</span> license.</p> +<h2>Contact</h2> +<p>Comments are welcome. Send an email to <a href="mailto:drnicwilliams@gmail.com">Dr Nic Williams</a>.</p> <p class="coda"> - <a href="mailto:drnicwilliams@gmail.com">Dr Nic</a>, 17th June 2008<br> + <a href="mailto:drnicwilliams@gmail.com">Dr Nic</a>, 24th September 2008<br> Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a> </p> </div> <script type="text/javascript">